Skip to content

Instantly share code, notes, and snippets.

@jangedoo
Last active March 5, 2016 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jangedoo/520dd86270170232469c to your computer and use it in GitHub Desktop.
Save jangedoo/520dd86270170232469c to your computer and use it in GitHub Desktop.
Static Scheduling in OpenMP with chunk size
void static_scheduling(){
printf("Static Scheduling demo...\n");
int N = 30;
int i;
#pragma omp parallel for num_threads(7) schedule(static, 2)
for (i = 0; i < N; i++){
printf("Rank is %d, i is %d\n", omp_get_thread_num(), i);
}
printf("Static Scheduling demo END...\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment