diff options
Diffstat (limited to 'vec_avx_double4.h')
-rw-r--r-- | vec_avx_double4.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vec_avx_double4.h b/vec_avx_double4.h index 9d60b3d..f45855c 100644 --- a/vec_avx_double4.h +++ b/vec_avx_double4.h @@ -533,7 +533,11 @@ namespace vecmathlib { } real_t prod() const { - return (*this)[0] * (*this)[1] * (*this)[2] * (*this)[3]; + // return (*this)[0] * (*this)[1] * (*this)[2] * (*this)[3]; + realvec_t x0123 = *this; + realvec_t x1032 = _mm256_shuffle_pd(x0123, x0123, 0b0101); + realvec_t y0022 = x0123 * x1032; + return y0022[0] * y0022[2]; } real_t sum() const { |