From: Martin Kronbichler Date: Wed, 29 Mar 2017 09:18:44 +0000 (+0200) Subject: Avoid overly cautious assertions in scatter X-Git-Tag: v9.0.0-rc1~1768^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1ac2e1b0be2e0b1ab171e692d854a51fd38939b;p=dealii.git Avoid overly cautious assertions in scatter --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 8597851012..7d42955f64 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -1482,12 +1482,6 @@ public: void scatter (const unsigned int *offsets, double *base_ptr) const { - for (unsigned int i=0; i<4; ++i) - for (unsigned int j=i+1; j<4; ++j) - Assert(offsets[i] != offsets[j], - ExcMessage("Result of scatter undefined if two offset elements" - " point to the same position")); - // no scatter operation in AVX/AVX2 for (unsigned int i=0; i<4; ++i) base_ptr[offsets[i]] = *(reinterpret_cast(&data)+i); @@ -1853,12 +1847,6 @@ public: void scatter (const unsigned int *offsets, float *base_ptr) const { - for (unsigned int i=0; i<8; ++i) - for (unsigned int j=i+1; j<8; ++j) - Assert(offsets[i] != offsets[j], - ExcMessage("Result of scatter undefined if two offset elements" - " point to the same position")); - // no scatter operation in AVX/AVX2 for (unsigned int i=0; i<8; ++i) base_ptr[offsets[i]] = *(reinterpret_cast(&data)+i); @@ -2243,10 +2231,6 @@ public: void scatter (const unsigned int *offsets, double *base_ptr) const { - Assert(offsets[0] != offsets[1], - ExcMessage("Result of scatter undefined if two offset elements" - " point to the same position")); - for (unsigned int i=0; i<2; ++i) base_ptr[offsets[i]] = *(reinterpret_cast(&data)+i); } @@ -2567,12 +2551,6 @@ public: void scatter (const unsigned int *offsets, float *base_ptr) const { - for (unsigned int i=0; i<4; ++i) - for (unsigned int j=i+1; j<4; ++j) - Assert(offsets[i] != offsets[j], - ExcMessage("Result of scatter undefined if two offset elements" - " point to the same position")); - for (unsigned int i=0; i<4; ++i) base_ptr[offsets[i]] = *(reinterpret_cast(&data)+i); }