35#ifndef _BLAZE_MATH_SIMD_SET_H_
36#define _BLAZE_MATH_SIMD_SET_H_
75 set( T value )
noexcept
78 return _mm512_set1_epi8( value );
80 return _mm256_set1_epi8( value );
82 return _mm_set1_epi8( value );
100 set( complex<T> value )
noexcept
102#if BLAZE_AVX512F_MODE
103 return _mm512_set1_epi16(
reinterpret_cast<const int16_t&
>( value ) );
105 return _mm256_set_epi8( 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 value.imag(), value.real(), value.imag(), value.real(),
111 value.imag(), value.real(), value.imag(), value.real(),
112 value.imag(), value.real(), value.imag(), value.real() );
114 return _mm_set_epi8( value.imag(), value.real(), value.imag(), value.real(),
115 value.imag(), value.real(), value.imag(), value.real(),
116 value.imag(), value.real(), value.imag(), value.real(),
117 value.imag(), value.real(), value.imag(), value.real() );
141template<
typename T >
146#if BLAZE_AVX512F_MODE
147 return _mm512_set1_epi16( value );
149 return _mm256_set1_epi16( value );
151 return _mm_set1_epi16( value );
166template<
typename T >
169 set( complex<T> value )
noexcept
171#if BLAZE_AVX512F_MODE
172 return _mm512_set1_epi32(
reinterpret_cast<const int32_t&
>( value ) );
174 return _mm256_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
175 value.imag(), value.real(), value.imag(), value.real(),
176 value.imag(), value.real(), value.imag(), value.real(),
177 value.imag(), value.real(), value.imag(), value.real() );
179 return _mm_set_epi16( value.imag(), value.real(), value.imag(), value.real(),
180 value.imag(), value.real(), value.imag(), value.real() );
204template<
typename T >
209#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
210 return _mm512_set1_epi32( value );
212 return _mm256_set1_epi32( value );
214 return _mm_set1_epi32( value );
229template<
typename T >
232 set( complex<T> value )
noexcept
234#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
235 return _mm512_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
236 value.imag(), value.real(), value.imag(), value.real(),
237 value.imag(), value.real(), value.imag(), value.real(),
238 value.imag(), value.real(), value.imag(), value.real() );
240 return _mm256_set_epi32( value.imag(), value.real(), value.imag(), value.real(),
241 value.imag(), value.real(), value.imag(), value.real() );
243 return _mm_set_epi32( value.imag(), value.real(), value.imag(), value.real() );
267template<
typename T >
272#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
273 return _mm512_set1_epi64( value );
275 return _mm256_set1_epi64x( value );
277 return _mm_set1_epi64x( value );
292template<
typename T >
295 set( complex<T> value )
noexcept
297#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
298 return _mm512_set_epi64( value.imag(), value.real(), value.imag(), value.real(),
299 value.imag(), value.real(), value.imag(), value.real() );
301 return _mm256_set_epi64x( value.imag(), value.real(), value.imag(), value.real() );
303 return _mm_set_epi64x( value.imag(), value.real() );
329#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
330 return _mm512_set1_ps( value );
332 return _mm256_set1_ps( value );
334 return _mm_set1_ps( value );
351#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
352 return _mm512_set_ps( value.imag(), value.real(), value.imag(), value.real(),
353 value.imag(), value.real(), value.imag(), value.real(),
354 value.imag(), value.real(), value.imag(), value.real(),
355 value.imag(), value.real(), value.imag(), value.real() );
357 return _mm256_set_ps( value.imag(), value.real(), value.imag(), value.real(),
358 value.imag(), value.real(), value.imag(), value.real() );
360 return _mm_set_ps( value.imag(), value.real(), value.imag(), value.real() );
386#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
387 return _mm512_set1_pd( value );
389 return _mm256_set1_pd( value );
391 return _mm_set1_pd( value );
408#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
409 return _mm512_set_pd( value.imag(), value.real(), value.imag(), value.real(),
410 value.imag(), value.real(), value.imag(), value.real() );
412 return _mm256_set_pd( value.imag(), value.real(), value.imag(), value.real() );
414 return _mm_set_pd( value.imag(), value.real() );
Header file for run time assertion macros.
Header file for the basic SIMD types.
Header file for the EnableIf class template.
Header file for the HasSize type trait.
Header file for the If class template.
Constraint on the data type.
Header file for the IsIntegral type trait.
Header file for the IsSigned type trait.
SIMD type for 64-bit double precision complex values.
SIMD type for 32-bit single precision complex values.
SIMD type for 16-bit signed integral complex values.
SIMD type for 32-bit signed integral complex values.
SIMD type for 64-bit signed integral complex values.
SIMD type for 8-bit signed integral complex values.
SIMD type for 16-bit unsigned integral complex values.
SIMD type for 32-bit unsigned integral complex values.
SIMD type for 64-bit unsigned integral complex values.
SIMD type for 8-bit unsigned integral complex values.
SIMD type for 64-bit double precision floating point data values.
SIMD type for 32-bit single precision floating point data values.
SIMD type for 16-bit signed integral data values.
SIMD type for 32-bit signed integral data values.
SIMD type for 64-bit integral data values.
SIMD type for 8-bit signed integral data values.
SIMD type for 16-bit unsigned integral data values.
SIMD type for 32-bit unsigned integral data values.
SIMD type for 64-bit unsigned integral data values.
SIMD type for 8-bit unsigned integral data values.
BLAZE_ALWAYS_INLINE const SIMDcdouble set(const complex< double > &value) noexcept
Sets all values in the vector to the given complex<double> value.
Definition: Set.h:406
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.
System settings for the SSE mode.
Header file for basic type definitions.