Update CN-GPU integration
This commit is contained in:
parent
0e5b54b80a
commit
be26d56f66
19 changed files with 144 additions and 142 deletions
|
@ -48,16 +48,16 @@ size_t inline generate<Algorithm::CN>(Threads<CpuThreads> &threads, uint32_t lim
|
|||
size_t count = 0;
|
||||
|
||||
count += generate(Algorithm::kCN, threads, Algorithm::CN_1, limit);
|
||||
count += generate(Algorithm::kCN_2, threads, Algorithm::CN_2, limit);
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
count += generate(Algorithm::kCN_GPU, threads, Algorithm::CN_GPU, limit);
|
||||
# endif
|
||||
|
||||
if (!threads.isExist(Algorithm::CN_0)) {
|
||||
threads.disable(Algorithm::CN_0);
|
||||
++count;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
count += generate(Algorithm::kCN_GPU, threads, Algorithm::CN_GPU, limit);
|
||||
# endif
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -181,20 +181,19 @@ bool xmrig::CpuWorker<N>::selfTest()
|
|||
verify(Algorithm::CN_RWZ, test_output_rwz) &&
|
||||
verify(Algorithm::CN_ZLS, test_output_zls) &&
|
||||
verify(Algorithm::CN_CCX, test_output_ccx) &&
|
||||
verify(Algorithm::CN_DOUBLE, test_output_double)
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
verify(Algorithm::CN_GPU, test_output_gpu) &&
|
||||
&&
|
||||
verify(Algorithm::CN_GPU, test_output_gpu)
|
||||
# endif
|
||||
verify(Algorithm::CN_DOUBLE, test_output_double);
|
||||
;
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (!rc || N > 1) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
return verify(Algorithm::CN_GPU, test_output_gpu);
|
||||
# else
|
||||
return rc;
|
||||
if (! (!rc || N > 1)) {
|
||||
return verify(Algorithm::CN_GPU, test_output_gpu);
|
||||
} else
|
||||
# endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
|
|
|
@ -340,6 +340,12 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return count_limit;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
if (f == Algorithm::RANDOM_X) {
|
||||
if (algorithm == Algorithm::RX_WOW) {
|
||||
|
@ -374,12 +380,6 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return count_limit;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_GHOSTRIDER
|
||||
if (f == Algorithm::GHOSTRIDER) {
|
||||
return CpuThreads(std::max<size_t>(count / 2, 1), 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue