Created
February 20, 2014 01:59
-
-
Save soravux/9105620 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <omp.h> | |
| int main(int argc, char *argv[]) { | |
| const int N = 1000; | |
| unsigned int i, a[N+10]; | |
| unsigned int j; | |
| for (j = 0; j < 100; j++) { | |
| #pragma omp parallel for num_threads(4) | |
| for (i = N; i < j; i++) { | |
| printf("i: %i, j: %i\n", i, j); | |
| a[i] = 2 * i; | |
| } | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment