35 #ifndef _BLAZE_MATH_SIMD_LOADU_H_ 36 #define _BLAZE_MATH_SIMD_LOADU_H_ 74 template<
typename T >
76 , If_< IsSigned<T>, SIMDint8, SIMDuint8 > >
77 loadu(
const T* address ) noexcept
79 #if BLAZE_AVX512BW_MODE 80 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
82 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
84 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
102 template<
typename T >
105 loadu(
const complex<T>* address ) noexcept
109 #if BLAZE_AVX512BW_MODE 110 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
111 #elif BLAZE_AVX2_MODE 112 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
113 #elif BLAZE_SSE2_MODE 114 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
116 return If_< IsSigned<T>, SIMDcint8,
SIMDcuint8 >( *address );
140 template<
typename T >
145 #if BLAZE_AVX512BW_MODE 146 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
147 #elif BLAZE_AVX2_MODE 148 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
149 #elif BLAZE_SSE2_MODE 150 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
168 template<
typename T >
171 loadu(
const complex<T>* address ) noexcept
175 #if BLAZE_AVX512BW_MODE 176 return _mm512_loadu_si512( reinterpret_cast<const __m512i*>( address ) );
177 #elif BLAZE_AVX2_MODE 178 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
179 #elif BLAZE_SSE2_MODE 180 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
182 return If_< IsSigned<T>, SIMDcint16,
SIMDcuint16 >( *address );
206 template<
typename T >
211 #if BLAZE_AVX512F_MODE 212 return _mm512_maskz_loadu_epi32( 0xFFFF, reinterpret_cast<const __m512i*>( address ) );
214 __m512i v1 = _mm512_setzero_epi32();
215 v1 = _mm512_loadunpacklo_epi32( v1, address );
216 v1 = _mm512_loadunpackhi_epi32( v1, address+16UL );
218 #elif BLAZE_AVX2_MODE 219 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
220 #elif BLAZE_SSE2_MODE 221 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
223 return If_< IsSigned<T>, SIMDint32,
SIMDuint32 >( *address );
239 template<
typename T >
242 loadu(
const complex<T>* address ) noexcept
246 #if BLAZE_AVX512F_MODE 247 return _mm512_maskz_loadu_epi32( 0xFFFF, address );
249 __m512i v1 = _mm512_setzero_epi32();
250 v1 = _mm512_loadunpacklo_epi32( v1, address );
251 v1 = _mm512_loadunpackhi_epi32( v1, address+8UL );
253 #elif BLAZE_AVX2_MODE 254 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
255 #elif BLAZE_SSE2_MODE 256 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
282 template<
typename T >
287 #if BLAZE_AVX512F_MODE 288 return _mm512_maskz_loadu_epi64( 0xFF, address );
290 __m512i v1 = _mm512_setzero_epi32();
291 v1 = _mm512_loadunpacklo_epi64( v1, address );
292 v1 = _mm512_loadunpackhi_epi64( v1, address+8UL );
294 #elif BLAZE_AVX2_MODE 295 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
296 #elif BLAZE_SSE2_MODE 297 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
315 template<
typename T >
318 loadu(
const complex<T>* address ) noexcept
322 #if BLAZE_AVX512F_MODE 323 return _mm512_maskz_loadu_epi64( 0xFF, address );
325 __m512i v1 = _mm512_setzero_epi32();
326 v1 = _mm512_loadunpacklo_epi64( v1, address );
327 v1 = _mm512_loadunpackhi_epi64( v1, address+4UL );
329 #elif BLAZE_AVX2_MODE 330 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
331 #elif BLAZE_SSE2_MODE 332 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
334 return If_< IsSigned<T>, SIMDcint64,
SIMDcuint64 >( *address );
360 #if BLAZE_AVX512F_MODE 361 return _mm512_loadu_ps( address );
363 __m512 v1 = _mm512_setzero_ps();
364 v1 = _mm512_loadunpacklo_ps( v1, address );
365 v1 = _mm512_loadunpackhi_ps( v1, address+16UL );
368 return _mm256_loadu_ps( address );
370 return _mm_loadu_ps( address );
392 #if BLAZE_AVX512F_MODE 393 return _mm512_loadu_ps( address );
395 __m512 v1 = _mm512_setzero_ps();
396 v1 = _mm512_loadunpacklo_ps( v1, reinterpret_cast<const float*>( address ) );
397 v1 = _mm512_loadunpackhi_ps( v1, reinterpret_cast<const float*>( address+8UL ) );
400 return _mm256_loadu_ps( reinterpret_cast<const float*>( address ) );
402 return _mm_loadu_ps( reinterpret_cast<const float*>( address ) );
430 #if BLAZE_AVX512F_MODE 431 return _mm512_loadu_pd( address );
433 __m512d v1 = _mm512_setzero_pd();
434 v1 = _mm512_loadunpacklo_pd( v1, address );
435 v1 = _mm512_loadunpackhi_pd( v1, address+8UL );
438 return _mm256_loadu_pd( address );
439 #elif BLAZE_SSE2_MODE 440 return _mm_loadu_pd( address );
462 #if BLAZE_AVX512F_MODE 463 return _mm512_loadu_pd( address );
465 __m512d v1 = _mm512_setzero_pd();
466 v1 = _mm512_loadunpacklo_pd( v1, reinterpret_cast<const double*>( address ) );
467 v1 = _mm512_loadunpackhi_pd( v1, reinterpret_cast<const double*>( address+4UL ) );
470 return _mm256_loadu_pd( reinterpret_cast<const double*>( address ) );
471 #elif BLAZE_SSE2_MODE 472 return _mm_loadu_pd( reinterpret_cast<const double*>( address ) );
SIMD type for 16-bit signed integral data values.
SIMD type for 32-bit unsigned integral complex values.
SIMD type for 16-bit unsigned integral complex values.
SIMD type for 32-bit signed integral complex values.
Header file for the IsIntegral type trait.
Header file for the And class template.
SIMD type for 32-bit unsigned integral data values.
SIMD type for 64-bit double precision floating point data values.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
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 16-bit unsigned integral data values.
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 64-bit unsigned integral data values.
SIMD type for 64-bit integral 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.