Fix a race in get_dark_channel()
This commit is contained in:
parent
c85dc2811b
commit
e2154f9feb
@ -66,7 +66,7 @@ int get_dark_channel(const array2D<float> &R, const array2D<float> &G, const arr
|
|||||||
int npatches = 0;
|
int npatches = 0;
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for if (multithread)
|
#pragma omp parallel for reduction(+:npatches) if (multithread)
|
||||||
#endif
|
#endif
|
||||||
for (int y = 0; y < H; y += patchsize) {
|
for (int y = 0; y < H; y += patchsize) {
|
||||||
int pH = min(y+patchsize, H);
|
int pH = min(y+patchsize, H);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user