cython openmp single, barrier
问题 I'm trying to use openmp in cython. I need to do two things in cython: i) use the #pragma omp single{} scope in my cython code. ii) use the #pragma omp barrier{} Does anyone know how to do this in cython? Here are more details. I have a nogil cdef-function my_fun() which I call in an omp for-loop: from cython.parallel cimport prange cimport openmp cdef int i with nogil: for i in prange(10,schedule='static', num_threads=10): my_func(i) Inside my_func I need to place a barrier to wait for all