Blaze  3.6
ShiftRI.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SIMD_SHIFTRI_H_
36 #define _BLAZE_MATH_SIMD_SHIFTRI_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // 16-BIT INTEGRAL SIMD TYPES
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
66 BLAZE_ALWAYS_INLINE const SIMDint16
67  operator>>( const SIMDint16& a, int count ) noexcept
68 #if BLAZE_AVX512BW_MODE
69 {
70  return _mm512_srai_epi16( a.value, count );
71 }
72 #elif BLAZE_AVX2_MODE
73 {
74  return _mm256_srai_epi16( a.value, count );
75 }
76 #elif BLAZE_SSE2_MODE
77 {
78  return _mm_srai_epi16( a.value, count );
79 }
80 #else
81 = delete;
82 #endif
83 //*************************************************************************************************
84 
85 
86 //*************************************************************************************************
96 BLAZE_ALWAYS_INLINE const SIMDuint16
97  operator>>( const SIMDuint16& a, int count ) noexcept
98 #if BLAZE_AVX512BW_MODE
99 {
100  return _mm512_srli_epi16( a.value, count );
101 }
102 #elif BLAZE_AVX2_MODE
103 {
104  return _mm256_srli_epi16( a.value, count );
105 }
106 #elif BLAZE_SSE2_MODE
107 {
108  return _mm_srli_epi16( a.value, count );
109 }
110 #else
111 = delete;
112 #endif
113 //*************************************************************************************************
114 
115 
116 
117 
118 //=================================================================================================
119 //
120 // 32-BIT INTEGRAL SIMD TYPES
121 //
122 //=================================================================================================
123 
124 //*************************************************************************************************
134 BLAZE_ALWAYS_INLINE const SIMDint32
135  operator>>( const SIMDint32& a, int count ) noexcept
136 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
137 {
138  return _mm512_srai_epi32( a.value, count );
139 }
140 #elif BLAZE_AVX2_MODE
141 {
142  return _mm256_srai_epi32( a.value, count );
143 }
144 #elif BLAZE_SSE2_MODE
145 {
146  return _mm_srai_epi32( a.value, count );
147 }
148 #else
149 = delete;
150 #endif
151 //*************************************************************************************************
152 
153 
154 //*************************************************************************************************
164 BLAZE_ALWAYS_INLINE const SIMDuint32
165  operator>>( const SIMDuint32& a, int count ) noexcept
166 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
167 {
168  return _mm512_srli_epi32( a.value, count );
169 }
170 #elif BLAZE_AVX2_MODE
171 {
172  return _mm256_srli_epi32( a.value, count );
173 }
174 #elif BLAZE_SSE2_MODE
175 {
176  return _mm_srli_epi32( a.value, count );
177 }
178 #else
179 = delete;
180 #endif
181 //*************************************************************************************************
182 
183 
184 
185 
186 //=================================================================================================
187 //
188 // 64-BIT INTEGRAL SIMD TYPES
189 //
190 //=================================================================================================
191 
192 //*************************************************************************************************
202 BLAZE_ALWAYS_INLINE const SIMDint64
203  operator>>( const SIMDint64& a, int count ) noexcept
204 #if BLAZE_AVX512F_MODE
205 {
206  return _mm512_srai_epi64( a.value, count );
207 }
208 #else
209 = delete;
210 #endif
211 //*************************************************************************************************
212 
213 
214 //*************************************************************************************************
224 BLAZE_ALWAYS_INLINE const SIMDuint64
225  operator>>( const SIMDuint64& a, int count ) noexcept
226 #if BLAZE_AVX512F_MODE
227 {
228  return _mm512_srli_epi64( a.value, count );
229 }
230 #elif BLAZE_AVX2_MODE
231 {
232  return _mm256_srli_epi64( a.value, count );
233 }
234 #elif BLAZE_SSE2_MODE
235 {
236  return _mm_srli_epi64( a.value, count );
237 }
238 #else
239 = delete;
240 #endif
241 //*************************************************************************************************
242 
243 } // namespace blaze
244 
245 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the basic SIMD types.
decltype(auto) operator>>(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Right-shift operator for the elementwise right-shift of a dense matrix.
Definition: DMatDMatMapExpr.h:1383
System settings for the SSE mode.
System settings for the inline keywords.