flâneur — a map of the web's best reading

OpenMP - Scheduling(static, dynamic, guided, runtime, auto) - Yiling's Tech Zone | 风逝无殇的瞎逼逼基地

610yilingliu.github.io · 1,709 words · saved by 1 readers

Tech blogger, postgraduate student in the University of Western Australia. Tech stack: Machine Learning/Python/C#/Web backend/JS/JAVA/R

What is Scheduling in OpenMP Scheduling is a method in OpenMP to distribute iterations to different threads in for loop. The basic form of OpenMP scheduling is #pragma omp parallel for schedule(scheduling-type) for ( conditions ){ do something } Of course you can use #pragma omp parallel for directly without scheduling, it is equal to #pragma omp parallel for schedule(static,1) [1] If you run int main () { #pragma omp parallel for schedule(static,1) for ( int i = 0 ; i < 20 ; i ++ ) { printf ( "Thread %d is running number %d \n " , omp_get_thread_num (), i ); } return 0 ; } and int main () { #

Explore this link on the map →

saved by

related reading