From: Maximilian Bergbauer Date: Mon, 22 May 2023 13:28:41 +0000 (+0200) Subject: Use intrinsics for vertical addition X-Git-Tag: v9.5.0-rc1~196^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a2b35e47f8a99ba155526cbd4d364c37316e026;p=dealii.git Use intrinsics for vertical addition --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 06a29e0d96..e81ab787e7 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -4971,7 +4971,7 @@ inline double VectorizedArray::horizontal_add() { VectorizedArray t1; - t1.data = this->get_low() + this->get_high(); + t1.data = _mm_add_pd(this->get_low(), this->get_high()); return t1.horizontal_add(); } @@ -4981,7 +4981,7 @@ inline float VectorizedArray::horizontal_add() { VectorizedArray t1; - t1.data = this->get_low() + this->get_high(); + t1.data = _mm_add_ps(this->get_low(), this->get_high()); return t1.horizontal_add(); } #endif @@ -4993,7 +4993,7 @@ inline double VectorizedArray::horizontal_add() { VectorizedArray t1; - t1.data = this->get_low() + this->get_high(); + t1.data = _mm256_add_pd(this->get_low(), this->get_high()); return t1.horizontal_add(); } @@ -5003,7 +5003,7 @@ inline float VectorizedArray::horizontal_add() { VectorizedArray t1; - t1.data = this->get_low() + this->get_high(); + t1.data = _mm256_add_ps(this->get_low(), this->get_high()); return t1.horizontal_add(); } #endif