35 #ifndef _BLAZE_MATH_INTRINSICS_LOADU_H_
36 #define _BLAZE_MATH_INTRINSICS_LOADU_H_
72 template<
typename T >
73 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,2UL> >, simd_int16_t >::Type
77 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
79 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
97 template<
typename T >
98 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,4UL> >, simd_int32_t >::Type
102 __m512i v1 = _mm512_setzero_epi32();
103 v1 = _mm512_loadunpacklo_epi32( v1, address );
104 v1 = _mm512_loadunpackhi_epi32( v1, address+16UL );
106 #elif BLAZE_AVX2_MODE
107 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
108 #elif BLAZE_SSE2_MODE
109 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
127 template<
typename T >
128 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,8UL> >, simd_int64_t >::Type
132 __m512i v1 = _mm512_setzero_epi32();
133 v1 = _mm512_loadunpacklo_epi64( v1, address );
134 v1 = _mm512_loadunpackhi_epi64( v1, address+8UL );
136 #elif BLAZE_AVX2_MODE
137 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
138 #elif BLAZE_SSE2_MODE
139 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
160 __m512 v1 = _mm512_setzero_ps();
161 v1 = _mm512_loadunpacklo_ps( v1, address );
162 v1 = _mm512_loadunpackhi_ps( v1, address+16UL );
165 return _mm256_loadu_ps( address );
167 return _mm_loadu_ps( address );
188 __m512d v1 = _mm512_setzero_pd();
189 v1 = _mm512_loadunpacklo_pd( v1, address );
190 v1 = _mm512_loadunpackhi_pd( v1, address+8UL );
193 return _mm256_loadu_pd( address );
194 #elif BLAZE_SSE2_MODE
195 return _mm_loadu_pd( address );
213 template<
typename T >
214 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,2UL> >, simd_cint16_t >::Type
220 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
221 #elif BLAZE_SSE2_MODE
222 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
240 template<
typename T >
241 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,4UL> >, simd_cint32_t >::Type
247 __m512i v1 = _mm512_setzero_epi32();
248 v1 = _mm512_loadunpacklo_epi32( v1, address );
249 v1 = _mm512_loadunpackhi_epi32( v1, address+16UL );
251 #elif BLAZE_AVX2_MODE
252 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
253 #elif BLAZE_SSE2_MODE
254 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
272 template<
typename T >
273 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,8UL> >, simd_cint64_t >::Type
279 __m512i v1 = _mm512_setzero_epi32();
280 v1 = _mm512_loadunpacklo_epi64( v1, address );
281 v1 = _mm512_loadunpackhi_epi64( v1, address+8UL );
283 #elif BLAZE_AVX2_MODE
284 return _mm256_loadu_si256( reinterpret_cast<const __m256i*>( address ) );
285 #elif BLAZE_SSE2_MODE
286 return _mm_loadu_si128( reinterpret_cast<const __m128i*>( address ) );
309 __m512 v1 = _mm512_setzero_ps();
310 v1 = _mm512_loadunpacklo_ps( v1, reinterpret_cast<const float*>( address ) );
311 v1 = _mm512_loadunpackhi_ps( v1, reinterpret_cast<const float*>( address+8UL ) );
314 return _mm256_loadu_ps( reinterpret_cast<const float*>( address ) );
316 return _mm_loadu_ps( reinterpret_cast<const float*>( address ) );
339 __m512d v1 = _mm512_setzero_pd();
340 v1 = _mm512_loadunpacklo_pd( v1, reinterpret_cast<const double*>( address ) );
341 v1 = _mm512_loadunpackhi_pd( v1, reinterpret_cast<const double*>( address+4UL ) );
344 return _mm256_loadu_pd( reinterpret_cast<const double*>( address ) );
345 #elif BLAZE_SSE2_MODE
346 return _mm_loadu_pd( reinterpret_cast<const double*>( address ) );
Header file for the IsIntegral type trait.
Header file for the And class template.
Intrinsic type for 64-bit double precision floating point data values.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:74
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the EnableIf class template.
Header file for the basic intrinsic types.
Intrinsic type for 32-bit single precision floating point data values.
Header file for the HasSize type trait.
Intrinsic type for 64-bit double precision complex values.
Intrinsic type for 32-bit single 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:143
System settings for the inline keywords.