typo in pragma omp

master
leonnicolas 5 years ago
parent b00282e47e
commit d89090409e
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -160,7 +160,6 @@ int main(int argc, char **argv) {
if(arguments.verbose && !arguments.silent){ if(arguments.verbose && !arguments.silent){
printf("using threads: %d\n", omp_get_max_threads()); printf("using threads: %d\n", omp_get_max_threads());
//printf("using %d threads\n", OMP_NUM_THREADS);
} }
//iterate //iterate
for (size_t j = 0; j < arguments.iterations ; j++){ for (size_t j = 0; j < arguments.iterations ; j++){
@ -177,9 +176,11 @@ int main(int argc, char **argv) {
} }
} }
else { else {
#pragma omp parraled for private(float_buffer) #pragma omp parallel for
for (size_t i = 0 ; i < arguments.buffer_size_kb * 128 ; i++ ){ for (size_t i = 0 ; i < arguments.buffer_size_kb * 128 ; i++ ){
float_buffer[i] = float_buffer[i] * float_buffer[i]; float_buffer[i] = float_buffer[i] * float_buffer[i];
//printf("thread: %i of %i\n", omp_get_thread_num() ,omp_get_num_threads()); //for debugging
} }
} }
clock_gettime(CLOCK_MONOTONIC, &t2); clock_gettime(CLOCK_MONOTONIC, &t2);

Loading…
Cancel
Save