From b1ac2e1b0be2e0b1ab171e692d854a51fd38939b Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 29 Mar 2017 11:18:44 +0200 Subject: [PATCH] Avoid overly cautious assertions in scatter --- include/deal.II/base/vectorization.h | 22 ---------------------- 1 file changed, 22 deletions(-) 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); } -- 2.39.5