35#ifndef _BLAZE_MATH_SIMD_ABS_H_
36#define _BLAZE_MATH_SIMD_ABS_H_
67#if BLAZE_AVX512BW_MODE
69 return _mm512_abs_epi8( a.value );
73 return _mm256_abs_epi8( a.value );
77 return _mm_abs_epi8( a.value );
103#if BLAZE_AVX512BW_MODE
105 return _mm512_abs_epi16( a.value );
109 return _mm256_abs_epi16( a.value );
111#elif BLAZE_SSSE3_MODE
113 return _mm_abs_epi16( a.value );
139#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
141 return _mm512_abs_epi32( a.value );
145 return _mm256_abs_epi32( a.value );
147#elif BLAZE_SSSE3_MODE
149 return _mm_abs_epi32( a.value );
175#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
177 return _mm512_abs_epi64( a.value );
202template<
typename T >
204#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
206 return _mm512_abs_ps( (*a).eval().value );
210 const __m256 mask( _mm256_castsi256_ps( _mm256_set1_epi32( 0x80000000 ) ) );
211 return _mm256_andnot_ps( mask, (*a).eval().value );
215 const __m128 mask( _mm_castsi128_ps( _mm_set1_epi32( 0x80000000 ) ) );
216 return _mm_andnot_ps( mask, (*a).eval().value );
241template<
typename T >
243#if ( BLAZE_AVX512F_MODE || BLAZE_MIC_MODE ) && BLAZE_GNU_COMPILER
245#elif BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
247 return _mm512_abs_pd( (*a).eval().value );
251 const __m256d mask( _mm256_castsi256_pd(
252 _mm256_set_epi32( 0x80000000, 0x0, 0x80000000, 0x0, 0x80000000, 0x0, 0x80000000, 0x0 ) ) );
253 return _mm256_andnot_pd( mask, (*a).eval().value );
257 const __m128d mask( _mm_castsi128_pd( _mm_set_epi32( 0x80000000, 0x0, 0x80000000, 0x0 ) ) );
258 return _mm_andnot_pd( mask, (*a).eval().value );
Header file for the basic SIMD types.
Compiler-specific system settings.
SIMD type for 64-bit double precision floating point data values.
SIMD type for 32-bit single precision floating point data values.
SIMD type for 16-bit signed integral data values.
SIMD type for 32-bit signed integral data values.
SIMD type for 64-bit integral data values.
SIMD type for 8-bit signed integral data values.
BLAZE_ALWAYS_INLINE const SIMDdouble abs(const SIMDf64< T > &a) noexcept=delete
Absolute of a vector of double precision floating point values.
#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.