1 #include <omp.h> 2 main () { 3 int var1, var2, var3; 4 Serial code 5 Beginning of parallel section. Fork a team of threads 6 Specify variable scoping 7 #pragma omp parallel private(var1, var2) shared(var3) 8 { 9 Parallel section executed by all threads 10 All threads join master thread and disband 11 } 12 Resume serial code 13 } |