basepi / redblue

Parallel Programming Project -- Red/Blue Computation
2 stars 0 forks source link

OpenMP version #1

Open morris821028 opened 8 years ago

morris821028 commented 8 years ago

https://github.com/basepi/redblue/blob/master/redblue_omp.cpp#L91

I thinks that OpenMP default setting for sharing variable, so int rightpos, botpos; will be shared between different thread.

#pragma omp parallel for num_threads(NUMTHREADS)

Another confuse problem in function int converges (int** grid, int rows, int cols, double conv, int tiles):

Thanks a lot.

basepi commented 8 years ago

I haven't looked at this code in years, it was a university project. If you think there are ways to improve it, you're welcome to submit a pull request. I don't think I have time to improve it myself right now.