|
for (int i=omp_get_thread_num(); i<N; i+=num_threads) |
hi!
I think this for loop is not correct because
- the loop counter is set to start with thread ID - I see no reason why I should write a loop like this
- the
#pragma omp parallel for is missing - this lead to version essentially being a cpu version. infact, their speed is very similar. on my machine
I am currently working on a version with GPU offloading (clang-9, gcc-8)
saxpy-benchmark/src/saxpy_omp.cpp
Line 22 in fb811ad
hi!
I think this for loop is not correct because
#pragma omp parallel foris missing - this lead to version essentially being a cpu version. infact, their speed is very similar. on my machineI am currently working on a version with GPU offloading (clang-9, gcc-8)