diff --git a/image_analysis/indexing/IndexerThreadPool.cpp b/image_analysis/indexing/IndexerThreadPool.cpp index 1a845497..ee6ff3ff 100644 --- a/image_analysis/indexing/IndexerThreadPool.cpp +++ b/image_analysis/indexing/IndexerThreadPool.cpp @@ -69,11 +69,14 @@ std::future IndexerThreadPool::Run(const DiffractionExperiment &e void IndexerThreadPool::Worker(int32_t threadIndex, const NUMAHWPolicy &numa_policy, const IndexingSettings &settings) { try { - // IndexerThreadPool is bound to GPU, but not to CPU choice #ifdef JFJOCH_USE_CUDA auto gpu_count = get_gpu_count(); if (gpu_count > 0) - set_gpu(threadIndex % gpu_count); + 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.