MenTaLguY wrote:
This looks reasonable for the most part. As long as you're sticking to manipulating data in the buffers and not manipulating the object model from the OMP threads, you shouldn't hit any of the threading problems that I would ordinarily be concerned about.
Exactly, that's the idea.
I'm not sure about having a minimum of 8 threads, though
It's not a minimum, it's a maximum :) min(8,x) returns the minimum of 8 and x, so 8 is the largest value it will return.
-- on a system with many less CPUs than that you're just losing by adding more threads. For a wholly CPU-bound task like this, the number of threads to use should be the number of CPUs.
I agree completely, that's why I tried using the default of omp_get_num_procs(). As this doesn't work properly on my system (as far as I can tell) I recommend setting it through the preferences though. However, hopefully this will work better with future versions of GCC (perhaps it will even work on Linux, as GCC has had OpenMP support for a bit longer there).