35 #ifndef _BLAZE_MATH_SIMD_SET_H_
36 #define _BLAZE_MATH_SIMD_SET_H_
73 template<
typename T >
75 , If_< IsSigned<T>, SIMDint8, SIMDuint8 > >
76 set( T value ) noexcept
79 return _mm256_set1_epi8( value );
81 return _mm_set1_epi8( value );
96 template<
typename T >
98 , If_< IsSigned<T>, SIMDcint8, SIMDcuint8 > >
99 set( complex<T> value ) noexcept
102 return _mm256_set_epi8( value.imag(), value.real(), value.imag(), value.real(),
103 value.imag(), value.real(), value.imag(), value.real(),
104 value.imag(), value.real(), value.imag(), value.real(),
105 value.imag(), value.real(), value.imag(), value.real(),
106 value.imag(), value.real(), value.imag(), value.real(),
107 value.imag(), value.real(), value.imag(), value.real(),
108 value.imag(), value.real(), value.imag(), value.real(),
109 value.imag(), value.real(), value.imag(), value.real() );
110 #elif BLAZE_SSE2_MODE
111 return _mm_set_epi8( value.imag(), value.real(), value.imag(), value.real(),
112 value.imag(), value.real(), value.imag(), value.real(),
113 value.imag(), value.real(), value.imag(), value.real(),
114 value.imag(), value.real(), value.imag(), value.real() );
138 template<
typename T >
140 , If_< IsSigned<T>, SIMDint16, SIMDuint16 > >
144 return _mm256_set1_epi16( value );
145 #elif BLAZE_SSE2_MODE
146 return _mm_set1_epi16( value );
161 template<
typename T >
163 , If_< IsSigned<T>, SIMDcint16, SIMDcuint16 > >
164 set( complex<T> value ) noexcept
167 return _mm256_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
168 value.imag(), value.real(), value.imag(), value.real(),
169 value.imag(), value.real(), value.imag(), value.real(),
170 value.imag(), value.real(), value.imag(), value.real() );
171 #elif BLAZE_SSE2_MODE
172 return _mm_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
173 value.imag(), value.real(), value.imag(), value.real() );
197 template<
typename T >
199 , If_< IsSigned<T>, SIMDint32, SIMDuint32 > >
203 return _mm512_set1_epi32( value );
204 #elif BLAZE_AVX2_MODE
205 return _mm256_set1_epi32( value );
206 #elif BLAZE_SSE2_MODE
207 return _mm_set1_epi32( value );
222 template<
typename T >
224 , If_< IsSigned<T>, SIMDcint32, SIMDcuint32 > >
225 set( complex<T> value ) noexcept
228 return _mm512_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
229 value.imag(), value.real(), value.imag(), value.real(),
230 value.imag(), value.real(), value.imag(), value.real(),
231 value.imag(), value.real(), value.imag(), value.real() );
232 #elif BLAZE_AVX2_MODE
233 return _mm256_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
234 value.imag(), value.real(), value.imag(), value.real() );
235 #elif BLAZE_SSE2_MODE
236 return _mm_set_epi32( value.imag(), value.real(), value.imag(), value.real() );
260 template<
typename T >
262 , If_< IsSigned<T>, SIMDint64, SIMDuint64 > >
266 return _mm512_set1_epi64( value );
267 #elif BLAZE_AVX2_MODE
268 return _mm256_set1_epi64x( value );
269 #elif BLAZE_SSE2_MODE
270 return _mm_set1_epi64( value );
285 template<
typename T >
287 , If_< IsSigned<T>, SIMDcint64, SIMDcuint64 > >
288 set( complex<T> value ) noexcept
291 return _mm512_set_epi64( value.imag(), value.real(), value.imag(), value.real(),
292 value.imag(), value.real(), value.imag(), value.real() );
293 #elif BLAZE_AVX2_MODE
294 return _mm256_set_epi64( value.imag(), value.real(), value.imag(), value.real() );
295 #elif BLAZE_SSE2_MODE
296 return _mm_set_epi64( value.imag(), value.real() );
323 return _mm512_set1_ps( value );
325 return _mm256_set1_ps( value );
327 return _mm_set1_ps( value );
345 return _mm512_set_ps( value.imag(), value.real(), value.imag(), value.real(),
346 value.imag(), value.real(), value.imag(), value.real(),
347 value.imag(), value.real(), value.imag(), value.real(),
348 value.imag(), value.real(), value.imag(), value.real() );
350 return _mm256_set_ps( value.imag(), value.real(), value.imag(), value.real(),
351 value.imag(), value.real(), value.imag(), value.real() );
353 return _mm_set_ps( value.imag(), value.real(), value.imag(), value.real() );
380 return _mm512_set1_pd( value );
382 return _mm256_set1_pd( value );
383 #elif BLAZE_SSE2_MODE
384 return _mm_set1_pd( value );
402 return _mm512_set_pd( value.imag(), value.real(), value.imag(), value.real(),
403 value.imag(), value.real(), value.imag(), value.real() );
405 return _mm256_set_pd( value.imag(), value.real(), value.imag(), value.real() );
406 #elif BLAZE_SSE2_MODE
407 return _mm_set_pd( value.imag(), value.real() );
Header file for basic type definitions.
Header file for the IsIntegral type trait.
Header file for the And class template.
SIMD 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
Header file for the If class template.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the basic SIMD types.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
Header file for run time assertion macros.
Header file for the HasSize type trait.
SIMD type for 32-bit single precision 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 double 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:112
System settings for the inline keywords.