I\'ve been calling this in OpenMP
#pragma omp parallel for num_threads(totalThreads)
for(unsigned i=0; i
Where does totalThreads
come from in your OpenMP version? I bet it's not startIndex.size()
.
The OpenMP version queues the requests onto totalThreads
worker threads. It looks like the C++11 version creates, startIndex.size()
threads, which involves a ridiculous amount of overhead if that's a big number.