Hi,
I have the following snippet of code and would like to know what I am doing wrong below.
Without parallelizing, if this loop look takes 0.01 seconds. When I use k threads, this function is taking k*0.01 seconds.
(1) Is there a faster way to evaluate a local expansion at a bunch of points. Or i must assess them 1by1
(2) I tried num threads from k=2 to k=10. This behavior is consistent. always takes (k*0.01). Is this behavior consistent?
#pragma omp parallel num_threads(k)
for (int i =0 ; i < values.num_elements(); i++)
{
values[i] = lexp->PhysEvaluate(glCoords.at(i),el_Phys);
}
// Info lexp is localExpansionShPtr;
// num_elements ~21
// In the program, I am replacing k with 2 .. 10 number
Ashok.