Reputation: 3165
I have a CPU-intensive code (it uses Semi-Global Stereo Matching) that runs multicore, since I've enabled WITH_OPENMP
flag when compiling OpenCV for Visual Studio 2013 x64.
However, this code runs on all of my 8 logical cores (I have a 4-cores CPU with HyperThreading). I want to restrict the used cores to just Core #1, #3, #5, #7. I know that, with some OpenMP implementations, one can set the affinity at compile-time using environment variables (example for Intel, GCC).
So how can I configure OpenCV to use threads with this affinity?
Upvotes: 0
Views: 437
Reputation: 1927
Microsoft compiler can use only openmp 2.0 and don't support an affinity mask - only OMP_NUM_THREADS.
Upvotes: 0