Setzero.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_INTRINSICS_SETZERO_H_
36 #define _BLAZE_MATH_INTRINSICS_SETZERO_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // INTRINSIC SETZERO FUNCTIONS
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
64 {
65 #if BLAZE_AVX2_MODE
66  value.value = _mm256_setzero_si256();
67 #elif BLAZE_SSE2_MODE
68  value.value = _mm_setzero_si128();
69 #else
70  value.value = 0;
71 #endif
72 }
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
84 {
85 #if BLAZE_AVX2_MODE
86  value.value = _mm256_setzero_si256();
87 #elif BLAZE_SSE2_MODE
88  value.value = _mm_setzero_si128();
89 #else
90  value.value = 0;
91 #endif
92 }
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
104 {
105 #if BLAZE_MIC_MODE
106  value.value = _mm512_setzero_epi32();
107 #elif BLAZE_AVX2_MODE
108  value.value = _mm256_setzero_si256();
109 #elif BLAZE_SSE2_MODE
110  value.value = _mm_setzero_si128();
111 #else
112  value.value = 0;
113 #endif
114 }
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
126 {
127 #if BLAZE_MIC_MODE
128  value.value = _mm512_setzero_epi32();
129 #elif BLAZE_AVX2_MODE
130  value.value = _mm256_setzero_si256();
131 #elif BLAZE_SSE2_MODE
132  value.value = _mm_setzero_si128();
133 #else
134  value.value = 0;
135 #endif
136 }
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
148 {
149 #if BLAZE_MIC_MODE
150  value.value = _mm512_setzero_ps();
151 #elif BLAZE_AVX_MODE
152  value.value = _mm256_setzero_ps();
153 #elif BLAZE_SSE_MODE
154  value.value = _mm_setzero_ps();
155 #else
156  value.value = 0.0F;
157 #endif
158 }
159 //*************************************************************************************************
160 
161 
162 //*************************************************************************************************
170 {
171 #if BLAZE_MIC_MODE
172  value.value = _mm512_setzero_pd();
173 #elif BLAZE_AVX_MODE
174  value.value = _mm256_setzero_pd();
175 #elif BLAZE_SSE2_MODE
176  value.value = _mm_setzero_pd();
177 #else
178  value.value = 0.0;
179 #endif
180 }
181 //*************************************************************************************************
182 
183 
184 //*************************************************************************************************
192 {
193 #if BLAZE_MIC_MODE
194  value.value = _mm512_setzero_ps();
195 #elif BLAZE_AVX_MODE
196  value.value = _mm256_setzero_ps();
197 #elif BLAZE_SSE_MODE
198  value.value = _mm_setzero_ps();
199 #else
200  value.value = 0.0F;
201 #endif
202 }
203 //*************************************************************************************************
204 
205 
206 //*************************************************************************************************
214 {
215 #if BLAZE_MIC_MODE
216  value.value = _mm512_setzero_pd();
217 #elif BLAZE_AVX_MODE
218  value.value = _mm256_setzero_pd();
219 #elif BLAZE_SSE2_MODE
220  value.value = _mm_setzero_pd();
221 #else
222  value.value = 0.0;
223 #endif
224 }
225 //*************************************************************************************************
226 
227 } // namespace blaze
228 
229 #endif
Intrinsic type for 16-bit integral data values.
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
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 64-bit double precision complex values.
Intrinsic type for 8-bit integral data values.
Intrinsic type for 32-bit single precision complex values.
System settings for the SSE mode.
System settings for the inline keywords.
BLAZE_ALWAYS_INLINE void setzero(simd_int8_t &value)
Setting an integral intrinsic type with 16 8-bit data values to zero.
Definition: Setzero.h:63
Intrinsic type for 32-bit integral data values.