22 #ifndef _BLAZE_MATH_INTRINSICS_LOAD_H_
23 #define _BLAZE_MATH_INTRINSICS_LOAD_H_
74 template<
typename T >
79 typedef sse_int16_t Type;
83 static inline Type
load(
const T* address )
86 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 16UL ),
"Invalid alignment detected" );
87 return _mm_load_si128( reinterpret_cast<const __m128i*>( address ) );
108 template<
typename T >
113 typedef sse_int32_t Type;
117 static inline Type
load(
const T* address )
120 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 64UL ),
"Invalid alignment detected" );
121 return _mm512_load_epi32( address );
122 #elif BLAZE_SSE2_MODE
123 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 16UL ),
"Invalid alignment detected" );
124 return _mm_load_si128( reinterpret_cast<const __m128i*>( address ) );
145 template<
typename T >
150 typedef sse_int64_t Type;
154 static inline Type
load(
const T* address )
157 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 64UL ),
"Invalid alignment detected" );
158 return _mm512_load_epi64( address );
159 #elif BLAZE_SSE2_MODE
160 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 16UL ),
"Invalid alignment detected" );
161 return _mm_load_si128( reinterpret_cast<const __m128i*>( address ) );
192 template<
typename T >
193 inline typename EnableIf< IsIntegral<T>, Load<T,sizeof(T)> >::Type::Type
211 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 64UL ),
"Invalid alignment detected" );
212 return _mm512_load_ps( address );
214 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 32UL ),
"Invalid alignment detected" );
215 return _mm256_load_ps( address );
217 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 16UL ),
"Invalid alignment detected" );
218 return _mm_load_ps( address );
236 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 64UL ),
"Invalid alignment detected" );
237 return _mm512_load_pd( address );
239 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 32UL ),
"Invalid alignment detected" );
240 return _mm256_load_pd( address );
241 #elif BLAZE_SSE2_MODE
242 BLAZE_INTERNAL_ASSERT( !( reinterpret_cast<size_t>( address ) % 16UL ),
"Invalid alignment detected" );
243 return _mm_load_pd( address );