v1.0.0-rc.91
This commit is contained in:
@@ -67,9 +67,17 @@ std::future<std::optional<CrystalLattice> > IndexerThreadPool::Run(const Diffrac
|
||||
return result;
|
||||
}
|
||||
|
||||
void IndexerThreadPool::Worker(size_t threadIndex, const NUMAHWPolicy &numa_policy, const IndexingSettings &settings) {
|
||||
void IndexerThreadPool::Worker(int32_t threadIndex, const NUMAHWPolicy &numa_policy, const IndexingSettings &settings) {
|
||||
try {
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
auto gpu_count = get_gpu_count();
|
||||
if (gpu_count > 0)
|
||||
NUMAHWPolicy::SelectGPUAndItsNUMA(threadIndex % gpu_count);
|
||||
else
|
||||
numa_policy.Bind(threadIndex);
|
||||
#else
|
||||
numa_policy.Bind(threadIndex);
|
||||
#endif
|
||||
} catch (...) {
|
||||
// NUMA policy errors are not critical and should be ignored for the time being.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user