35#ifndef _BLAZE_MATH_SIMD_HYPOT_H_
36#define _BLAZE_MATH_SIMD_HYPOT_H_
75# if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
77 return _mm512_hypot_ps( (*a).eval().value, (*b).eval().value );
81 return _mm256_hypot_ps( (*a).eval().value, (*b).eval().value );
85 return _mm_hypot_ps( (*a).eval().value, (*b).eval().value );
89# if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
91 return Sleef_hypotf16_u05avx512f( (*a).eval().value, (*b).eval().value );
95 return Sleef_hypotf8_u05avx2( (*a).eval().value, (*b).eval().value );
99 return Sleef_hypotf8_u05avx( (*a).eval().value, (*b).eval().value );
103 return Sleef_hypotf4_u05( (*a).eval().value, (*b).eval().value );
106#elif BLAZE_XSIMD_MODE
108 return SIMDfloat{ xsimd::hypot( xsimd::batch<float>{ (*a).eval().value },
109 xsimd::batch<float>{ (*b).eval().value } ).
data };
138template<
typename T >
141# if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
143 return _mm512_hypot_pd( (*a).eval().value, (*b).eval().value );
147 return _mm256_hypot_pd( (*a).eval().value, (*b).eval().value );
151 return _mm_hypot_pd( (*a).eval().value, (*b).eval().value );
154#elif BLAZE_SLEEF_MODE
155# if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
157 return Sleef_hypotd8_u05avx512f( (*a).eval().value, (*b).eval().value );
159# elif BLAZE_AVX2_MODE
161 return Sleef_hypotd4_u05avx2( (*a).eval().value, (*b).eval().value );
165 return Sleef_hypotd4_u05avx( (*a).eval().value, (*b).eval().value );
169 return Sleef_hypotd2_u05( (*a).eval().value, (*b).eval().value );
172#elif BLAZE_XSIMD_MODE
174 return SIMDdouble{ xsimd::hypot( xsimd::batch<double>{ (*a).eval().value },
175 xsimd::batch<double>{ (*b).eval().value } ).
data };
Header file for the basic SIMD types.
SIMD type for 64-bit double precision floating point data values.
SIMD type for 32-bit single precision floating point data values.
decltype(auto) hypot(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise hypotenous for the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1412
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition DenseMatrix.h:182
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
System settings for the inline keywords.
System settings for the SSE mode.