v1.0.0-rc.91

This commit is contained in:
2025-10-20 20:43:44 +02:00
parent 6524365ffa
commit 061152279c
260 changed files with 4856 additions and 1063 deletions

View File

@@ -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.
}