Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <omp.h>
- #include <stdio.h>
- int main(){
- int b = 18;
- omp_set_num_threads(5);
- #pragma omp parallel reduction(+:b)
- {
- b+=2;
- }
- printf("after reduction b=%d\n",b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement