35 #ifndef _BLAZE_MATH_SIMD_LOADU_H_ 36 #define _BLAZE_MATH_SIMD_LOADU_H_ 73 template<
typename T >
75 , If_t< IsSigned_v<T>, SIMDint8, SIMDuint8 > >
76 loadu(
const T* address ) noexcept
78 #if BLAZE_AVX512BW_MODE 79 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
81 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
83 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
101 template<
typename T >
103 , If_t< IsSigned_v<T>, SIMDcint8, SIMDcuint8 > >
104 loadu(
const complex<T>* address ) noexcept
108 #if BLAZE_AVX512BW_MODE 109 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
110 #elif BLAZE_AVX2_MODE 111 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
112 #elif BLAZE_SSE2_MODE 113 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
139 template<
typename T >
141 , If_t< IsSigned_v<T>, SIMDint16, SIMDuint16 > >
144 #if BLAZE_AVX512BW_MODE 145 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
146 #elif BLAZE_AVX2_MODE 147 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
148 #elif BLAZE_SSE2_MODE 149 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
167 template<
typename T >
169 , If_t< IsSigned_v<T>, SIMDcint16, SIMDcuint16 > >
170 loadu(
const complex<T>* address ) noexcept
174 #if BLAZE_AVX512BW_MODE 175 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
176 #elif BLAZE_AVX2_MODE 177 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
178 #elif BLAZE_SSE2_MODE 179 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
205 template<
typename T >
207 , If_t< IsSigned_v<T>, SIMDint32, SIMDuint32 > >
210 #if BLAZE_AVX512F_MODE 211 return _mm512_maskz_loadu_epi32( 0xFFFF, reinterpret_cast<const __m512i*>( address ) );
213 __m512i v1 = _mm512_setzero_si512();
214 v1 = _mm512_loadunpacklo_epi32( v1, address );
215 v1 = _mm512_loadunpackhi_epi32( v1, address+16UL );
217 #elif BLAZE_AVX2_MODE 218 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
219 #elif BLAZE_SSE2_MODE 220 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
238 template<
typename T >
240 , If_t< IsSigned_v<T>, SIMDcint32, SIMDcuint32 > >
241 loadu(
const complex<T>* address ) noexcept
245 #if BLAZE_AVX512F_MODE 246 return _mm512_maskz_loadu_epi32( 0xFFFF, address );
248 __m512i v1 = _mm512_setzero_si512();
249 v1 = _mm512_loadunpacklo_epi32( v1, address );
250 v1 = _mm512_loadunpackhi_epi32( v1, address+8UL );
252 #elif BLAZE_AVX2_MODE 253 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
254 #elif BLAZE_SSE2_MODE 255 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
281 template<
typename T >
283 , If_t< IsSigned_v<T>, SIMDint64, SIMDuint64 > >
286 #if BLAZE_AVX512F_MODE 287 return _mm512_maskz_loadu_epi64( 0xFF, address );
289 __m512i v1 = _mm512_setzero_si512();
290 v1 = _mm512_loadunpacklo_epi64( v1, address );
291 v1 = _mm512_loadunpackhi_epi64( v1, address+8UL );
293 #elif BLAZE_AVX2_MODE 294 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
295 #elif BLAZE_SSE2_MODE 296 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
314 template<
typename T >
316 , If_t< IsSigned_v<T>, SIMDcint64, SIMDcuint64 > >
317 loadu(
const complex<T>* address ) noexcept
321 #if BLAZE_AVX512F_MODE 322 return _mm512_maskz_loadu_epi64( 0xFF, address );
324 __m512i v1 = _mm512_setzero_si512();
325 v1 = _mm512_loadunpacklo_epi64( v1, address );
326 v1 = _mm512_loadunpackhi_epi64( v1, address+4UL );
328 #elif BLAZE_AVX2_MODE 329 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
330 #elif BLAZE_SSE2_MODE 331 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
359 #if BLAZE_AVX512F_MODE 360 return _mm512_loadu_ps( address );
362 __m512 v1 = _mm512_setzero_ps();
363 v1 = _mm512_loadunpacklo_ps( v1, address );
364 v1 = _mm512_loadunpackhi_ps( v1, address+16UL );
367 return _mm256_loadu_ps( address );
369 return _mm_loadu_ps( address );
391 #if BLAZE_AVX512F_MODE 392 return _mm512_loadu_ps( address );
394 __m512 v1 = _mm512_setzero_ps();
395 v1 = _mm512_loadunpacklo_ps( v1, reinterpret_cast<const float*>( address ) );
396 v1 = _mm512_loadunpackhi_ps( v1, reinterpret_cast<const float*>( address+8UL ) );
399 return _mm256_loadu_ps( reinterpret_cast<const float*>( address ) );
401 return _mm_loadu_ps( reinterpret_cast<const float*>( address ) );
429 #if BLAZE_AVX512F_MODE 430 return _mm512_loadu_pd( address );
432 __m512d v1 = _mm512_setzero_pd();
433 v1 = _mm512_loadunpacklo_pd( v1, address );
434 v1 = _mm512_loadunpackhi_pd( v1, address+8UL );
437 return _mm256_loadu_pd( address );
438 #elif BLAZE_SSE2_MODE 439 return _mm_loadu_pd( address );
461 #if BLAZE_AVX512F_MODE 462 return _mm512_loadu_pd( address );
464 __m512d v1 = _mm512_setzero_pd();
465 v1 = _mm512_loadunpacklo_pd( v1, reinterpret_cast<const double*>( address ) );
466 v1 = _mm512_loadunpackhi_pd( v1, reinterpret_cast<const double*>( address+4UL ) );
469 return _mm256_loadu_pd( reinterpret_cast<const double*>( address ) );
470 #elif BLAZE_SSE2_MODE 471 return _mm_loadu_pd( reinterpret_cast<const double*>( address ) );
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
SIMD type for 16-bit unsigned integral complex values.
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:76
Header file for the IsIntegral type trait.
SIMD type for 32-bit unsigned integral data values.
SIMD type for 64-bit double precision floating point data values.
SIMD type for 64-bit unsigned integral complex values.
SIMD type for 16-bit signed integral complex values.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the If class template.
SIMD type for 32-bit signed integral data values.
Header file for the EnableIf class template.
Header file for the basic SIMD types.
SIMD type for 8-bit signed integral complex values.
Header file for the HasSize type trait.
SIMD type for 32-bit single precision complex values.
SIMD type for 64-bit signed integral complex values.
Header file for the IsSigned type trait.
SIMD type for 32-bit single precision floating point data values.
SIMD type for 8-bit unsigned integral complex values.
SIMD type for 64-bit double precision complex values.
System settings for the SSE mode.
Header file for the complex data type.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
System settings for the inline keywords.