Parallel Triangulation of a Triangle

I am trying to parallelize the triangulation of a Guibas Stolfi trick using openmp .

There are two things here: mergesort () , which I did, and divide () , where I was stuck. I tried all possible approaches, but in vain.

The approach following (divide n conquer) in divide () is the same as for mergesort (), but using the same parallelization technique (omp sections) works only for mergesort.

I tried the parallelization method shown here , but even this does not work. I read about nested parallelism, but I'm not sure how to implement it. Can someone explain how separation and subjugation algorithms are parallelized?

CODE: Merge is called twice in the main function and in the constructions of the application sections. The same thing for the division function does not work

#pragma omp parallel
{
#pragma omp sections nowait
{
#pragma omp section
{
merge_sort(p_sorted, p_temp, 0, n/2);
}
#pragma omp section
{
merge_sort(p_sorted, p_temp, (n/2)+1, n-1);
}
}
}
+3
source share
1 answer

I managed to parallelize the use of CreateThread calls in Windows, the trick is to split the points into 2 ^ n buffers, process each buffer in a separate thread, and then merge adjacent edges, one by one, to one final merge.

( ). , .zip. . , .

+1