Commit 87fe82a0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

kdtree: added omp array reduction for min/max.

parent 0e584f3d
......@@ -195,9 +195,8 @@ void *gs_create_kdtree(size_t n, const double *restrict lons, const double *rest
kdata_t min[3], max[3];
min[0] = min[1] = min[2] = 1e9;
max[0] = max[1] = max[2] = -1e9;
#if defined(HAVE_OPENMP4)
// failed with INTEL CC: error: 'min' has invalid type for 'reduction'
// #pragma omp parallel for reduction(min: min) reduction(max: max)
#if defined(HAVE_OPENMP45)
#pragma omp parallel for reduction(min: min[:3]) reduction(max: max[:3])
#endif
for ( size_t i = 0; i < n; i++ )
{
......@@ -237,9 +236,8 @@ void *gs_create_nanoflann(size_t n, const double *restrict lons, const double *r
max[0] = max[1] = max[2] = -1e9;
// Generating Point Cloud
pointcloud->pts.resize(n);
#if defined(HAVE_OPENMP4)
// failed with INTEL CC: error: 'min' has invalid type for 'reduction'
// #pragma omp parallel for reduction(min: min) reduction(max: max)
#if defined(HAVE_OPENMP45)
#pragma omp parallel for reduction(min: min[:3]) reduction(max: max[:3])
#endif
for ( size_t i = 0; i < n; i++ )
{
......
Markdown is supported
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