Sep 1, 2015 at 7:40am
Hi Forum,
I have a section of my code running in parallel using
My question is, how do I 'merge' the data from different threads into one. A simple example is below.
omp_set_num_threads(2);
#pragma omp parallel
{
// Some code to determine x1 y1 x2 y2
double gradient = findGradientOfLine( x1, y1, x2, y2);
// Merge gradient from both threads
// find intersection point if it exists
}
Thanks,
RuiQi
Sep 8, 2015 at 7:07am
Bump ~
No one knows how to do it ?