Commit afb69e00 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

remapGradients: don't init bool vectors in OpenMP Loops (bug fix).

parent 30674588
......@@ -221,7 +221,7 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
auto src_grid_size = src_grid->size;
std::vector<bool> src_grid_mask(src_grid_size);
/* doesn't work with bool arrays!!!
/* doesn't work with bool vector!!!
#ifdef _OPENMP
#pragma omp parallel for default(none) schedule(static) shared(src_grid_size, src_array, src_grid_mask, missval)
#endif
......
......@@ -284,9 +284,11 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
auto src_grid_size = src_grid->size;
std::vector<bool> src_grid_mask(src_grid_size);
/* doesn't work with bool vector!!!
#ifdef _OPENMP
#pragma omp parallel for default(none) schedule(static) shared(src_grid_size, src_array, src_grid_mask, missval)
#endif
*/
for (size_t i = 0; i < src_grid_size; ++i) src_grid_mask[i] = !DBL_IS_EQUAL(src_array[i], missval);
// Compute mappings from source to target grid
......
......@@ -788,9 +788,11 @@ remapConserv(NormOpt normOpt, RemapSearch &rsearch, const double *restrict src_a
auto tgt_grid_size = tgt_grid->size;
std::vector<bool> src_grid_mask(src_grid_size);
/* doesn't work with bool vector!!!
#ifdef _OPENMP
#pragma omp parallel for default(none) schedule(static) shared(src_grid_size, src_array, src_grid_mask, missval)
#endif
*/
for (size_t i = 0; i < src_grid_size; ++i) src_grid_mask[i] = !DBL_IS_EQUAL(src_array[i], missval);
auto src_num_cell_corners = src_grid->num_cell_corners;
......
......@@ -1022,7 +1022,7 @@ remapGradients(RemapGrid &grid, const double *restrict array, RemapGradients &gr
{
size_t grid_size = grid.size;
std::vector<bool> mask(grid_size);
/* doesn't work with bool arrays!!!
/* doesn't work with bool vector!!!
#ifdef _OPENMP
#pragma omp parallel for default(none) schedule(static) shared(grid_size, grid, mask)
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment