Commit 27c06835 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

pragma omp simd min/max reduction doesn't work with ICC19.

parent c228ccae
......@@ -79,8 +79,10 @@ varrayMinMaxSum(const size_t len, const Varray<T> &array, MinMaxSum mms)
auto rmax = mms.max;
auto rsum = mms.sum;
#ifndef __ICC // wrong result with icc19
#ifdef HAVE_OPENMP4
#pragma omp simd reduction(min:rmin) reduction(max:rmax) reduction(+:rsum)
#endif
#endif
for (size_t i = 0; i < len; ++i)
{
......@@ -122,8 +124,10 @@ varrayMinMaxSumMV(const size_t len, const Varray<T> &array, const double missval
}
else
{
#ifndef __ICC // wrong result with icc19
#ifdef HAVE_OPENMP4
#pragma omp simd reduction(min:rmin) reduction(max:rmax) reduction(+:rsum) reduction(+:nvals)
#endif
#endif
for (size_t i = 0; i < len; ++i)
{
......@@ -278,8 +282,10 @@ varrayMinMax(const size_t len, const double *restrict array)
double vmin = DBL_MAX;
double vmax = -DBL_MAX;
#ifndef __ICC // wrong result with icc19
#ifdef HAVE_OPENMP4
#pragma omp simd reduction(min:vmin) reduction(max:vmax)
#endif
#endif
for (size_t i = 0; i < len; ++i)
{
......@@ -304,8 +310,10 @@ varrayMinMax(const Varray<T> &v)
double vmax = -DBL_MAX;
const size_t len = v.size();
#ifndef __ICC // wrong result with icc19
#ifdef HAVE_OPENMP4
#pragma omp simd reduction(min:vmin) reduction(max:vmax)
#endif
#endif
for (size_t i = 0; i < len; ++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