diff --git a/A2/algorithm.c b/A2/algorithm.c index a522536..b6f4762 100755 --- a/A2/algorithm.c +++ b/A2/algorithm.c @@ -1,52 +1,62 @@ /* ============================================================================ Filename : algorithm.c Author : Your names go here SCIPER : Your SCIPER numbers ============================================================================ */ #include #define INPUT(I,J) input[(I)*length+(J)] #define OUTPUT(I,J) output[(I)*length+(J)] #define CACHE_SIZE 8 #define COORD(I,J,K) (I) = K / length; (J) = (K) - (I) * length; void simulate(double *input, double *output, int threads, int length, int iterations) { double *temp; omp_set_num_threads(threads); int i; int j; const int matsize = length*length; + double horiz_block[3]; for(int n=0; n < iterations; n++) { printf("Loop: %d\n", n); - #pragma omp parallel for private(i,j) + #pragma omp parallel for private(i,j, horiz_block) for(int k=1; k