Basically I have a program that needs to go over several individual pictures I do this by:
#pragma omp paralell num_threads(4) #pragma omp paralell for for(picture = 0; picture < 4; picture++){ for(int row = 0; row < 1000; row++){ for(int col = 0; col < 1000; col++){ //do stuff with pixel[picture][row][col] } } } I just want to split the work among 4 cores (1 core per picture) so that each core/thread is working on a specific picture. That way core 0 is working on picture 0, core 1 on picture 1, and so on. The machine it is being tested on only has 4 cores as well. What is the best way to use openmp declarations for this scenario. The one I posted is what I think would be the best performance for this scenario.
keep in mind this is pseudo code. The goal of the program is not important, parallelizing these loops efficiently is the goal.