OpenMP with C++ 프로그램이 있습니다. 병렬 영역 내에는 #pragma omp task
을 포함하는 병렬 영역이 있습니다. 이제 실행중인 스레드가 만나는 조건에 따라 병렬 영역을 종료하는 방법을 알고 싶습니다.OpenMP에서 병렬 영역을 조건부로 종료하려면 어떻게합니까?
#pragma omp parallel
{
#pragma omp task
{
//upon reaching a condition i would like to break out of the parallel region. (all threads should exit this parallel region)
}
}