Conj.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_INTRINSICS_CONJ_H_
36 #define _BLAZE_MATH_INTRINSICS_CONJ_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // INTRINSIC COMPLEX CONJUGATE FUNCTIONS
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
65 {
66  return a;
67 }
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
80 {
81  return a;
82 }
83 //*************************************************************************************************
84 
85 
86 //*************************************************************************************************
95 {
96  return a;
97 }
98 //*************************************************************************************************
99 
100 
101 //*************************************************************************************************
110 {
111  return a;
112 }
113 //*************************************************************************************************
114 
115 
116 //*************************************************************************************************
125 {
126  return a;
127 }
128 //*************************************************************************************************
129 
130 
131 //*************************************************************************************************
140 {
141  return a;
142 }
143 //*************************************************************************************************
144 
145 
146 //*************************************************************************************************
154 #if BLAZE_AVX2_MODE
155 BLAZE_ALWAYS_INLINE simd_cint16_t conj( const simd_cint16_t& a )
156 {
157  return _mm256_mullo_epi16( a.value, _mm256_set_epi16( -1, 1, -1, 1, -1, 1, -1, 1,
158  -1, 1, -1, 1, -1, 1, -1, 1 ) );
159 }
160 #elif BLAZE_SSE2_MODE
161 BLAZE_ALWAYS_INLINE simd_cint16_t conj( const simd_cint16_t& a )
162 {
163  return _mm_mullo_epi16( a.value, _mm_set_epi16( -1, 1, -1, 1, -1, 1, -1, 1 ) );
164 }
165 #endif
166 //*************************************************************************************************
167 
168 
169 //*************************************************************************************************
177 #if BLAZE_MIC_MODE
178 BLAZE_ALWAYS_INLINE simd_cint32_t conj( const simd_cint32_t& a )
179 {
180  return _mm512_mullo_epi32( a.value, _mm512_set_epi32( -1, 1, -1, 1, -1, 1, -1, 1,
181  -1, 1, -1, 1, -1, 1, -1, 1 ) );
182 }
183 #elif BLAZE_AVX2_MODE
184 BLAZE_ALWAYS_INLINE simd_cint32_t conj( const simd_cint32_t& a )
185 {
186  return _mm256_mullo_epi32( a.value, _mm256_set_epi32( -1, 1, -1, 1, -1, 1, -1, 1 ) );
187 }
188 #elif BLAZE_SSE4_MODE
189 BLAZE_ALWAYS_INLINE simd_cint32_t conj( const simd_cint32_t& a )
190 {
191  return _mm_mullo_epi32( a.value, _mm_set_epi32( -1, 1, -1, 1 ) );
192 }
193 #endif
194 //*************************************************************************************************
195 
196 
197 //*************************************************************************************************
205 #if BLAZE_MIC_MODE
206 BLAZE_ALWAYS_INLINE simd_cfloat_t conj( const simd_cfloat_t& a )
207 {
208  return _mm512_mul_ps( a.value, _mm512_set_ps( -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F,
209  -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F ) );
210 }
211 #elif BLAZE_AVX_MODE
212 BLAZE_ALWAYS_INLINE simd_cfloat_t conj( const simd_cfloat_t& a )
213 {
214  return _mm256_mul_ps( a.value, _mm256_set_ps( -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F, -1.0F, 1.0F ) );
215 }
216 #elif BLAZE_SSE2_MODE
217 BLAZE_ALWAYS_INLINE simd_cfloat_t conj( const simd_cfloat_t& a )
218 {
219  return _mm_mul_ps( a.value, _mm_set_ps( -1.0F, 1.0F, -1.0F, 1.0F ) );
220 }
221 #endif
222 //*************************************************************************************************
223 
224 
225 //*************************************************************************************************
233 #if BLAZE_MIC_MODE
234 BLAZE_ALWAYS_INLINE simd_cdouble_t conj( const simd_cdouble_t& a )
235 {
236  return _mm512_mul_pd( a.value, _mm512_set_pd( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ) );
237 }
238 #elif BLAZE_AVX_MODE
239 BLAZE_ALWAYS_INLINE simd_cdouble_t conj( const simd_cdouble_t& a )
240 {
241  return _mm256_mul_pd( a.value, _mm256_set_pd( -1.0, 1.0, -1.0, 1.0 ) );
242 }
243 #elif BLAZE_SSE2_MODE
244 BLAZE_ALWAYS_INLINE simd_cdouble_t conj( const simd_cdouble_t& a )
245 {
246  return _mm_mul_pd( a.value, _mm_set_pd( -1.0, 1.0 ) );
247 }
248 #endif
249 //*************************************************************************************************
250 
251 } // namespace blaze
252 
253 #endif
Intrinsic type for 16-bit integral data values.
Intrinsic type for 64-bit double precision floating point data values.
ConjExprTrait< typename DiagonalProxy< MT >::RepresentedType >::Type conj(const DiagonalProxy< MT > &proxy)
Computing the complex conjugate of the represented element.
Definition: DiagonalProxy.h:487
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 basic intrinsic types.
Intrinsic type for 32-bit single precision floating point data values.
Intrinsic type for 64-bit integral data values.
Intrinsic type for 8-bit integral data values.
System settings for the SSE mode.
System settings for the inline keywords.
Intrinsic type for 32-bit integral data values.