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 >
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 >
141 set( T value ) noexcept
144 return _mm256_set1_epi16( value );
145 #elif BLAZE_SSE2_MODE 146 return _mm_set1_epi16( value );
161 template<
typename T >
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 >
200 set( T value ) noexcept
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 >
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 >
263 set( T value ) noexcept
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 >
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() );
SIMD type for 16-bit signed integral data values.
SIMD type for 32-bit unsigned integral complex values.
Header file for basic type definitions.
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.
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:57
#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.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the basic SIMD types.
Header file for run time assertion macros.
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.
#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.