Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
double good_openmp_cache_opt(int ** matrix, long int size, int blocksize){
double total_begin = omp_get_wtime();
#pragma omp parallel for
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
You can’t perform that action at this time.