35 #ifndef _BLAZE_MATH_INTRINSICS_SET_H_
36 #define _BLAZE_MATH_INTRINSICS_SET_H_
71 template<
typename T >
72 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,2UL> >, simd_int16_t >::Type
76 return _mm256_set1_epi16( value );
78 return _mm_set1_epi16( value );
93 template<
typename T >
94 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,4UL> >, simd_int32_t >::Type
98 return _mm512_set1_epi32( value );
100 return _mm256_set1_epi32( value );
101 #elif BLAZE_SSE2_MODE
102 return _mm_set1_epi32( value );
117 template<
typename T >
118 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,8UL> >, simd_int64_t >::Type
122 return _mm512_set1_epi64( value );
123 #elif BLAZE_AVX2_MODE
124 return _mm256_set1_epi64x( value );
125 #elif BLAZE_SSE2_MODE
126 return _mm_set1_epi64( value );
144 return _mm512_set1_ps( value );
146 return _mm256_set1_ps( value );
148 return _mm_set1_ps( value );
166 return _mm512_set1_pd( value );
168 return _mm256_set1_pd( value );
169 #elif BLAZE_SSE2_MODE
170 return _mm_set1_pd( value );
185 template<
typename T >
186 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,2UL> >, simd_cint16_t >::Type
190 return _mm256_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
191 value.imag(), value.real(), value.imag(), value.real(),
192 value.imag(), value.real(), value.imag(), value.real(),
193 value.imag(), value.real(), value.imag(), value.real() );
194 #elif BLAZE_SSE2_MODE
195 return _mm_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
196 value.imag(), value.real(), value.imag(), value.real() );
212 template<
typename T >
213 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,4UL> >, simd_cint32_t >::Type
217 return _mm512_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
218 value.imag(), value.real(), value.imag(), value.real(),
219 value.imag(), value.real(), value.imag(), value.real(),
220 value.imag(), value.real(), value.imag(), value.real() );
221 #elif BLAZE_AVX2_MODE
222 return _mm256_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
223 value.imag(), value.real(), value.imag(), value.real() );
224 #elif BLAZE_SSE2_MODE
225 return _mm_set_epi32( value.imag(), value.real(), value.imag(), value.real() );
241 template<
typename T >
242 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsIntegral<T>, HasSize<T,8UL> >, simd_cint64_t >::Type
246 return _mm512_set_epi64( value.imag(), value.real(), value.imag(), value.real(),
247 value.imag(), value.real(), value.imag(), value.real() );
248 #elif BLAZE_AVX2_MODE
249 return _mm256_set_epi64( value.imag(), value.real(), value.imag(), value.real() );
250 #elif BLAZE_SSE2_MODE
251 return _mm_set_epi64( value.imag(), value.real() );
270 return _mm512_set_ps( value.imag(), value.real(), value.imag(), value.real(),
271 value.imag(), value.real(), value.imag(), value.real(),
272 value.imag(), value.real(), value.imag(), value.real(),
273 value.imag(), value.real(), value.imag(), value.real() );
275 return _mm256_set_ps( value.imag(), value.real(), value.imag(), value.real(),
276 value.imag(), value.real(), value.imag(), value.real() );
278 return _mm_set_ps( value.imag(), value.real(), value.imag(), value.real() );
297 return _mm512_set_pd( value.imag(), value.real(), value.imag(), value.real(),
298 value.imag(), value.real(), value.imag(), value.real() );
300 return _mm256_set_pd( value.imag(), value.real(), value.imag(), value.real() );
301 #elif BLAZE_SSE2_MODE
302 return _mm_set_pd( value.imag(), value.real() );
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Header file for basic type definitions.
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.
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
Constraint on the data type.
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 run time assertion macros.
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.
#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.