diff options
Diffstat (limited to 'vec_avx_float8.h')
-rw-r--r-- | vec_avx_float8.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vec_avx_float8.h b/vec_avx_float8.h index 3bb13ec..02a1ec8 100644 --- a/vec_avx_float8.h +++ b/vec_avx_float8.h @@ -526,9 +526,15 @@ namespace vecmathlib { } real_t prod() const { - return - (*this)[0] * (*this)[1] * (*this)[2] * (*this)[3] * - (*this)[4] * (*this)[5] * (*this)[6] * (*this)[7]; + // return + // (*this)[0] * (*this)[1] * (*this)[2] * (*this)[3] * + // (*this)[4] * (*this)[5] * (*this)[6] * (*this)[7]; + realvec_t x01234567 = *this; + realvec_t x10325476 = _mm256_shuffle_ps(x01234567, x01234567, 0b10110001); + realvec_t y00224466 = x01234567 * x10325476; + realvec_t y22006644 = _mm256_shuffle_ps(y00224466, y00224466, 0b01001110); + realvec_t z00004444 = y00224466 * y22006644; + return z00004444[0] * z00004444[4]; } real_t sum() const { |