mirror of
https://github.com/xmrig/xmrig.git
synced 2026-06-22 04:09:33 -04:00
Compare commits
16 Commits
v6.21.2
...
ebc334b8af
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebc334b8af | ||
|
|
471fae0927 | ||
|
|
531657cb45 | ||
|
|
d170db1ed3 | ||
|
|
7ad834de92 | ||
|
|
e051564d73 | ||
|
|
7897f10c48 | ||
|
|
da2fb331b3 | ||
|
|
57f3e9c3da | ||
|
|
1efe7e9562 | ||
|
|
caae7c64f0 | ||
|
|
9fbdcc0ef0 | ||
|
|
c7c26d97fe | ||
|
|
1f7e635b04 | ||
|
|
1c5786e3c5 | ||
|
|
44eb4f0038 |
25
.vscode/settings.json
vendored
Normal file
25
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"chrono": "cpp",
|
||||
"functional": "cpp",
|
||||
"memory": "cpp",
|
||||
"optional": "cpp",
|
||||
"sstream": "cpp",
|
||||
"*.ipp": "cpp",
|
||||
"array": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"bitset": "cpp",
|
||||
"tuple": "cpp",
|
||||
"fstream": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"mutex": "cpp",
|
||||
"ostream": "cpp",
|
||||
"numeric": "cpp",
|
||||
"stop_token": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"utility": "cpp",
|
||||
"variant": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
# v6.21.3
|
||||
- [#3462](https://github.com/xmrig/xmrig/pull/3462) RandomX: correct memcpy size for JIT initialization.
|
||||
|
||||
# v6.21.2
|
||||
- The dependencies of all prebuilt releases have been updated. Support for old Ubuntu releases has been dropped.
|
||||
- [#2800](https://github.com/xmrig/xmrig/issues/2800) Fixed donation with GhostRider algorithm for builds without KawPow algorithm.
|
||||
|
||||
0
sccache.log
Normal file
0
sccache.log
Normal file
@@ -1,6 +1,6 @@
|
||||
/* XMRig
|
||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "base/crypto/keccak.h"
|
||||
#include "base/io/Env.h"
|
||||
#include "base/io/json/Json.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "base/io/log/Tags.h"
|
||||
#include "base/kernel/Base.h"
|
||||
#include "base/tools/Chrono.h"
|
||||
#include "base/tools/Cvt.h"
|
||||
@@ -39,7 +41,6 @@
|
||||
|
||||
|
||||
#include <thread>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -81,8 +82,7 @@ static rapidjson::Value getResources(rapidjson::Document &doc)
|
||||
|
||||
xmrig::Api::Api(Base *base) :
|
||||
m_base(base),
|
||||
m_timestamp(Chrono::currentMSecsSinceEpoch()),
|
||||
m_httpd(nullptr)
|
||||
m_timestamp(Chrono::currentMSecsSinceEpoch())
|
||||
{
|
||||
base->addListener(this);
|
||||
|
||||
@@ -118,7 +118,8 @@ void xmrig::Api::start()
|
||||
if (!m_httpd) {
|
||||
m_httpd = new Httpd(m_base);
|
||||
if (!m_httpd->start()) {
|
||||
std::cerr << "HTTP server failed to start." << std::endl;
|
||||
LOG_ERR("%s " RED_BOLD("HTTP API server failed to start."), Tags::network());
|
||||
|
||||
delete m_httpd; // Properly handle failure to start
|
||||
m_httpd = nullptr;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* XMRig
|
||||
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2024 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2024 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <algorithm>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "core/Miner.h"
|
||||
#include "core/Taskbar.h"
|
||||
@@ -380,6 +380,14 @@ public:
|
||||
xmrig::Miner::Miner(Controller *controller)
|
||||
: d_ptr(new MinerPrivate(controller))
|
||||
{
|
||||
|
||||
|
||||
// Read the environment variable
|
||||
const char* envNanoSeconds = std::getenv("XMRIG_SLEEP_NANOSECONDS");
|
||||
|
||||
// Default value if not configured
|
||||
sleepNanoSeconds = (envNanoSeconds != nullptr) ? std::atoi(envNanoSeconds) : 0;
|
||||
|
||||
const int priority = controller->config()->cpu().priority();
|
||||
if (priority >= 0) {
|
||||
Platform::setProcessPriority(priority);
|
||||
@@ -449,6 +457,8 @@ const std::vector<xmrig::IBackend *> &xmrig::Miner::backends() const
|
||||
|
||||
xmrig::Job xmrig::Miner::job() const
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::nanoseconds(sleepNanoSeconds));
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
|
||||
return d_ptr->job;
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
Miner(Controller *controller);
|
||||
~Miner() override;
|
||||
|
||||
int sleepNanoSeconds;
|
||||
|
||||
bool isEnabled() const;
|
||||
bool isEnabled(const Algorithm &algorithm) const;
|
||||
const Algorithms &algorithms() const;
|
||||
|
||||
@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* https://github.com/P-H-C/phc-winner-argon2
|
||||
* Copyright 2015
|
||||
* Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <new>
|
||||
#include <algorithm>
|
||||
@@ -40,6 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <cstring>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
#include "crypto/randomx/common.hpp"
|
||||
#include "crypto/randomx/dataset.hpp"
|
||||
@@ -54,31 +56,35 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "3rdparty/argon2/include/argon2.h"
|
||||
#include "3rdparty/argon2/lib/core.h"
|
||||
|
||||
//static_assert(RANDOMX_ARGON_MEMORY % (RANDOMX_ARGON_LANES * ARGON2_SYNC_POINTS) == 0, "RANDOMX_ARGON_MEMORY - invalid value");
|
||||
// static_assert(RANDOMX_ARGON_MEMORY % (RANDOMX_ARGON_LANES * ARGON2_SYNC_POINTS) == 0, "RANDOMX_ARGON_MEMORY - invalid value");
|
||||
static_assert(ARGON2_BLOCK_SIZE == randomx::ArgonBlockSize, "Unexpected value of ARGON2_BLOCK_SIZE");
|
||||
|
||||
namespace randomx {
|
||||
namespace randomx
|
||||
{
|
||||
|
||||
template<class Allocator>
|
||||
void deallocCache(randomx_cache* cache) {
|
||||
if (cache->memory != nullptr) {
|
||||
template <class Allocator>
|
||||
void deallocCache(randomx_cache *cache)
|
||||
{
|
||||
if (cache->memory != nullptr)
|
||||
{
|
||||
Allocator::freeMemory(cache->memory, RANDOMX_CACHE_MAX_SIZE);
|
||||
}
|
||||
|
||||
delete cache->jit;
|
||||
}
|
||||
|
||||
template void deallocCache<DefaultAllocator>(randomx_cache* cache);
|
||||
template void deallocCache<LargePageAllocator>(randomx_cache* cache);
|
||||
template void deallocCache<DefaultAllocator>(randomx_cache *cache);
|
||||
template void deallocCache<LargePageAllocator>(randomx_cache *cache);
|
||||
|
||||
void initCache(randomx_cache* cache, const void* key, size_t keySize) {
|
||||
void initCache(randomx_cache *cache, const void *key, size_t keySize)
|
||||
{
|
||||
argon2_context context;
|
||||
|
||||
context.out = nullptr;
|
||||
context.outlen = 0;
|
||||
context.pwd = CONST_CAST(uint8_t *)key;
|
||||
context.pwd = CONST_CAST(uint8_t *) key;
|
||||
context.pwdlen = (uint32_t)keySize;
|
||||
context.salt = CONST_CAST(uint8_t *)RandomX_CurrentConfig.ArgonSalt;
|
||||
context.salt = CONST_CAST(uint8_t *) RandomX_CurrentConfig.ArgonSalt;
|
||||
context.saltlen = (uint32_t)strlen(RandomX_CurrentConfig.ArgonSalt);
|
||||
context.secret = nullptr;
|
||||
context.secretlen = 0;
|
||||
@@ -96,25 +102,28 @@ namespace randomx {
|
||||
argon2_ctx_mem(&context, Argon2_d, cache->memory, RandomX_CurrentConfig.ArgonMemory * 1024);
|
||||
|
||||
randomx::Blake2Generator gen(key, keySize);
|
||||
for (uint32_t i = 0; i < RandomX_CurrentConfig.CacheAccesses; ++i) {
|
||||
for (uint32_t i = 0; i < RandomX_CurrentConfig.CacheAccesses; ++i)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
randomx::generateSuperscalar(cache->programs[i], gen);
|
||||
}
|
||||
}
|
||||
|
||||
void initCacheCompile(randomx_cache* cache, const void* key, size_t keySize) {
|
||||
void initCacheCompile(randomx_cache *cache, const void *key, size_t keySize)
|
||||
{
|
||||
initCache(cache, key, keySize);
|
||||
|
||||
# ifdef XMRIG_SECURE_JIT
|
||||
#ifdef XMRIG_SECURE_JIT
|
||||
cache->jit->enableWriting();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
cache->jit->generateSuperscalarHash(cache->programs);
|
||||
cache->jit->generateDatasetInitCode();
|
||||
cache->datasetInit = cache->jit->getDatasetInitFunc();
|
||||
cache->datasetInit = cache->jit->getDatasetInitFunc();
|
||||
|
||||
# ifdef XMRIG_SECURE_JIT
|
||||
#ifdef XMRIG_SECURE_JIT
|
||||
cache->jit->enableExecution();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
constexpr uint64_t superscalarMul0 = 6364136223846793005ULL;
|
||||
@@ -126,14 +135,16 @@ namespace randomx {
|
||||
constexpr uint64_t superscalarAdd6 = 3398623926847679864ULL;
|
||||
constexpr uint64_t superscalarAdd7 = 9549104520008361294ULL;
|
||||
|
||||
static inline uint8_t* getMixBlock(uint64_t registerValue, uint8_t *memory) {
|
||||
static inline uint8_t *getMixBlock(uint64_t registerValue, uint8_t *memory)
|
||||
{
|
||||
const uint32_t mask = (RandomX_CurrentConfig.ArgonMemory * randomx::ArgonBlockSize) / CacheLineSize - 1;
|
||||
return memory + (registerValue & mask) * CacheLineSize;
|
||||
}
|
||||
|
||||
void initDatasetItem(randomx_cache* cache, uint8_t* out, uint64_t itemNumber) {
|
||||
void initDatasetItem(randomx_cache *cache, uint8_t *out, uint64_t itemNumber)
|
||||
{
|
||||
int_reg_t rl[8];
|
||||
uint8_t* mixBlock;
|
||||
uint8_t *mixBlock;
|
||||
uint64_t registerValue = itemNumber;
|
||||
rl[0] = (itemNumber + 1) * superscalarMul0;
|
||||
rl[1] = rl[0] ^ superscalarAdd1;
|
||||
@@ -143,15 +154,22 @@ namespace randomx {
|
||||
rl[5] = rl[0] ^ superscalarAdd5;
|
||||
rl[6] = rl[0] ^ superscalarAdd6;
|
||||
rl[7] = rl[0] ^ superscalarAdd7;
|
||||
for (unsigned i = 0; i < RandomX_CurrentConfig.CacheAccesses; ++i) {
|
||||
for (unsigned i = 0; i < RandomX_CurrentConfig.CacheAccesses; ++i)
|
||||
{
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
|
||||
mixBlock = getMixBlock(registerValue, cache->memory);
|
||||
rx_prefetch_nta(mixBlock);
|
||||
SuperscalarProgram& prog = cache->programs[i];
|
||||
SuperscalarProgram &prog = cache->programs[i];
|
||||
|
||||
executeSuperscalar(rl, prog);
|
||||
|
||||
for (unsigned q = 0; q < 8; ++q)
|
||||
{
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
|
||||
rl[q] ^= load64_native(mixBlock + 8 * q);
|
||||
}
|
||||
|
||||
registerValue = rl[prog.getAddressRegister()];
|
||||
}
|
||||
@@ -159,8 +177,12 @@ namespace randomx {
|
||||
memcpy(out, &rl, CacheLineSize);
|
||||
}
|
||||
|
||||
void initDataset(randomx_cache* cache, uint8_t* dataset, uint32_t startItem, uint32_t endItem) {
|
||||
void initDataset(randomx_cache *cache, uint8_t *dataset, uint32_t startItem, uint32_t endItem)
|
||||
{
|
||||
for (uint32_t itemNumber = startItem; itemNumber < endItem; ++itemNumber, dataset += CacheLineSize)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
initDatasetItem(cache, dataset, itemNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1078,6 +1078,6 @@ void JitCompilerA64::h_NOP(Instruction& instr, uint32_t& codePos)
|
||||
{
|
||||
}
|
||||
|
||||
InstructionGeneratorA64 JitCompilerA64::engine[257] = {};
|
||||
InstructionGeneratorA64 JitCompilerA64::engine[256] = {};
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace randomx {
|
||||
void enableWriting() const;
|
||||
void enableExecution() const;
|
||||
|
||||
static InstructionGeneratorA64 engine[257];
|
||||
static InstructionGeneratorA64 engine[256];
|
||||
|
||||
private:
|
||||
const bool hugePages;
|
||||
|
||||
@@ -1443,6 +1443,6 @@ namespace randomx {
|
||||
emitByte(0x90, code, codePos);
|
||||
}
|
||||
|
||||
alignas(64) InstructionGeneratorX86 JitCompilerX86::engine[257] = {};
|
||||
alignas(64) InstructionGeneratorX86 JitCompilerX86::engine[256] = {};
|
||||
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace randomx {
|
||||
void enableWriting() const;
|
||||
void enableExecution() const;
|
||||
|
||||
alignas(64) static InstructionGeneratorX86 engine[257];
|
||||
alignas(64) static InstructionGeneratorX86 engine[256];
|
||||
|
||||
private:
|
||||
int registerUsage[RegistersCount] = {};
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
;# .section .data
|
||||
;# nanosecs:
|
||||
;# .quad 0, 10000
|
||||
|
||||
;# .extern usleep
|
||||
|
||||
.intel_syntax noprefix
|
||||
#if defined(__APPLE__)
|
||||
.text
|
||||
@@ -173,6 +179,17 @@ DECL(randomx_dataset_init):
|
||||
push rcx ;# max. block index
|
||||
#endif
|
||||
init_block_loop:
|
||||
|
||||
;# mov rax, 35
|
||||
;# mov rdi, nanosecs
|
||||
;# xor rsi, rsi
|
||||
;# syscall
|
||||
|
||||
;# push 100000
|
||||
;# call usleep
|
||||
;# add esp,4
|
||||
|
||||
|
||||
prefetchw byte ptr [rsi]
|
||||
mov rbx, rbp
|
||||
.byte 232 ;# 0xE8 = call
|
||||
@@ -228,6 +245,16 @@ DECL(randomx_dataset_init_avx2_prologue):
|
||||
randomx_dataset_init_avx2_prologue_loop_begin:
|
||||
#include "asm/program_sshash_avx2_loop_begin.inc"
|
||||
|
||||
;# mov rax, 35
|
||||
;# mov rdi, nanosecs
|
||||
;# xor rsi, rsi
|
||||
;# syscall
|
||||
|
||||
;# push 100000
|
||||
;# call usleep
|
||||
;# add esp,4
|
||||
|
||||
|
||||
;# init integer registers (lane 0)
|
||||
lea r8, [rbp+1]
|
||||
imul r8, qword ptr [r0_avx2_mul+rip]
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
; section .data
|
||||
; secs dq 5,0
|
||||
|
||||
IFDEF RAX
|
||||
|
||||
_RANDOMX_JITX86_STATIC SEGMENT PAGE READ EXECUTE
|
||||
@@ -166,6 +169,13 @@ randomx_dataset_init PROC
|
||||
mov rbp, r8 ;# block index
|
||||
push r9 ;# max. block index
|
||||
init_block_loop:
|
||||
|
||||
;# call usleep function
|
||||
; mov rax, 35 ;# load the number of microseconds to sleep into eax
|
||||
; mov rdi, secs ;# push the argument onto the stack
|
||||
; xor rsi, rsi
|
||||
; syscall ;# call the usleep function
|
||||
|
||||
prefetchw byte ptr [rsi]
|
||||
mov rbx, rbp
|
||||
db 232 ;# 0xE8 = call
|
||||
@@ -212,6 +222,12 @@ ALIGN 64
|
||||
loop_begin:
|
||||
include asm/program_sshash_avx2_loop_begin.inc
|
||||
|
||||
;# call usleep function
|
||||
; mov rax, 35 ;# load the number of microseconds to sleep into eax
|
||||
; mov rdi, secs ;# push the argument onto the stack
|
||||
; xor rsi, rsi
|
||||
; syscall ;# call the usleep function
|
||||
|
||||
;# init integer registers (lane 0)
|
||||
lea r8, [rbp+1]
|
||||
imul r8, qword ptr [r0_avx2_mul]
|
||||
|
||||
@@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "crypto/common/VirtualMemory.h"
|
||||
#include <mutex>
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <cassert>
|
||||
|
||||
#include "crypto/rx/Profiler.h"
|
||||
@@ -260,7 +262,7 @@ typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx
|
||||
|
||||
#define JIT_HANDLE(x, prev) do { \
|
||||
const InstructionGeneratorX86_2 p = &randomx::JitCompilerX86::h_##x; \
|
||||
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \
|
||||
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(randomx::JitCompilerX86::engine[k])); \
|
||||
} while (0)
|
||||
|
||||
#elif (XMRIG_ARM == 8)
|
||||
@@ -387,6 +389,12 @@ extern "C" {
|
||||
cache->initialize = &randomx::initCacheCompile;
|
||||
cache->datasetInit = nullptr;
|
||||
cache->memory = memory;
|
||||
|
||||
|
||||
// cache->jit = nullptr;
|
||||
// cache->initialize = &randomx::initCache;
|
||||
// cache->datasetInit = &randomx::initDataset;
|
||||
// cache->memory = memory;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -573,6 +581,7 @@ extern "C" {
|
||||
machine->initScratchpad(&tempHash);
|
||||
machine->resetRoundingMode();
|
||||
for (uint32_t chain = 0; chain < RandomX_CurrentConfig.ProgramCount - 1; ++chain) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
machine->run(&tempHash);
|
||||
rx_blake2b_wrapper::run(tempHash, sizeof(tempHash), machine->getRegisterFile(), sizeof(randomx::RegisterFile));
|
||||
}
|
||||
@@ -590,6 +599,7 @@ extern "C" {
|
||||
|
||||
machine->resetRoundingMode();
|
||||
for (uint32_t chain = 0; chain < RandomX_CurrentConfig.ProgramCount - 1; ++chain) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
machine->run(&tempHash);
|
||||
rx_blake2b_wrapper::run(tempHash, sizeof(tempHash), machine->getRegisterFile(), sizeof(randomx::RegisterFile));
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
#include "crypto/randomx/configuration.h"
|
||||
#include "crypto/randomx/program.hpp"
|
||||
#include "crypto/randomx/blake2/endian.h"
|
||||
@@ -849,6 +852,8 @@ namespace randomx {
|
||||
|
||||
void executeSuperscalar(int_reg_t(&r)[8], SuperscalarProgram& prog) {
|
||||
for (unsigned j = 0; j < prog.getSize(); ++j) {
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
|
||||
Instruction& instr = prog(j);
|
||||
switch ((SuperscalarInstructionType)instr.opcode)
|
||||
{
|
||||
|
||||
@@ -108,11 +108,12 @@ bool xmrig::RxDataset::init(const Buffer &seed, uint32_t numThreads, int priorit
|
||||
const uint32_t a = (datasetItemCount * i) / numThreads;
|
||||
const uint32_t b = (datasetItemCount * (i + 1)) / numThreads;
|
||||
threads.emplace_back(init_dataset_wrapper, m_dataset, m_cache->get(), a, b - a, priority);
|
||||
threads[i].join(); // force it to be sequential
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < numThreads; ++i) {
|
||||
threads[i].join();
|
||||
}
|
||||
// for (uint32_t i = 0; i < numThreads; ++i) {
|
||||
// threads[i].join();
|
||||
// }
|
||||
}
|
||||
else {
|
||||
init_dataset_wrapper(m_dataset, m_cache->get(), 0, datasetItemCount, priority);
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
* If you plan on changing donations to 0%, please consider making a one-off donation to my wallet:
|
||||
* XMR: 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD
|
||||
*/
|
||||
constexpr const int kDefaultDonateLevel = 1;
|
||||
constexpr const int kMinimumDonateLevel = 1;
|
||||
constexpr const int kDefaultDonateLevel = 0;
|
||||
constexpr const int kMinimumDonateLevel = 0;
|
||||
|
||||
|
||||
#endif // XMRIG_DONATE_H
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define APP_ID "xmrig"
|
||||
#define APP_NAME "XMRig"
|
||||
#define APP_DESC "XMRig miner"
|
||||
#define APP_VERSION "6.21.2"
|
||||
#define APP_VERSION "6.21.3"
|
||||
#define APP_DOMAIN "xmrig.com"
|
||||
#define APP_SITE "www.xmrig.com"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define APP_VER_MAJOR 6
|
||||
#define APP_VER_MINOR 21
|
||||
#define APP_VER_PATCH 2
|
||||
#define APP_VER_PATCH 3
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER >= 1930)
|
||||
|
||||
Reference in New Issue
Block a user