You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file of examples ncnn/examples/rfcn.cpp
Recursive calls function with support OpenMP didn't work correct with "#pragma omp parallel sections" and produce core fault error on x86.
#pragma omp parallel sections
{
#pragma omp section
{
if (left < j) qsort_descent_inplace(faceobjects, left, j);
}
#pragma omp section
{
if (i < right) qsort_descent_inplace(faceobjects, i, right);
}
}
Need use OpenMP tasks "#pragma omp task shared(faceobjects)" instead of sections "#pragma omp section".
And "#pragma omp taskq" instead "#pragma omp parallel sections"
I made changes for correct working with OpenMP support enable without fault error.
#pragma omp taskq
{
#pragma omp task shared(faceobjects)
{
if (left < j) qsort_descent_inplace(faceobjects, left, j);
}
#pragma omp task shared(faceobjects)
{
if (i < right) qsort_descent_inplace(faceobjects, i, right);
}
}
The text was updated successfully, but these errors were encountered:
Also I think there are more errors in the sources with #pragma and OpenMP support, because after building the NCNN library with OpenMP support, I always get a segmentation fault error in my applications using the lbncnn.a library
In file of examples ncnn/examples/rfcn.cpp
Recursive calls function with support OpenMP didn't work correct with "#pragma omp parallel sections" and produce core fault error on x86.
Need use OpenMP tasks "#pragma omp task shared(faceobjects)" instead of sections "#pragma omp section".
And "#pragma omp taskq" instead "#pragma omp parallel sections"
I made changes for correct working with OpenMP support enable without fault error.
The text was updated successfully, but these errors were encountered: