Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created March 19, 2015 00:53
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 lettergram/9f7ed796058279ac10ef to your computer and use it in GitHub Desktop.
Save lettergram/9f7ed796058279ac10ef to your computer and use it in GitHub Desktop.
double possible_thrash_openmp(int ** matrix, long int size){
double total_begin = omp_get_wtime();
#pragma omp parallel for schedule(dynamic)
for(int x = 0; x < size; x++){
for(int y = 0; y < size; y++){
matrix[x][y] = matrix[x][y] * 2;
}
}
double total_end = omp_get_wtime();
return double(total_end - total_begin);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment