Is it much faster to re-initialize a vector using OpenMP threads?
I'm using OpenMP libraries for parallel computing. I use C++ vectors, whose size is usually in the order of 1*10^5. While going through iteration process, I need to re-initialize a bunch of these large vectors(not thread private but global scope) to a initial value. which is the faster way to do this?, using #pragma omp for or #pragma omp single? The general answer would need to be "it depends, you have to measure" since initialization in C++ can be, depending on the type, trivial or very expensive. You did not provide an awful lot of detail, so one has to guess a bit. If a class has a