0

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?

TheUnexpected
  • 3,077
  • 6
  • 32
  • 62

1 Answers1

0

Microsoft compiler can use only openmp 2.0 and don't support an affinity mask - only OMP_NUM_THREADS.

Nuzhny
  • 1,869
  • 1
  • 7
  • 13