Blaze  3.6
ShiftRV.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SIMD_SHIFTRV_H_
36 #define _BLAZE_MATH_SIMD_SHIFTRV_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 template< typename T > // Type of both operands
67 BLAZE_ALWAYS_INLINE const SIMDint16
68  operator>>( const SIMDint16& a, const SIMDi16<T>& b ) noexcept
69 #if BLAZE_AVX512BW_MODE
70 {
71  return _mm512_srav_epi16( a.value, (~b).value );
72 }
73 #else
74 = delete;
75 #endif
76 //*************************************************************************************************
77 
78 
79 //*************************************************************************************************
89 template< typename T > // Type of both operands
90 BLAZE_ALWAYS_INLINE const SIMDuint16
91  operator>>( const SIMDuint16& a, const SIMDi16<T>& b ) noexcept
92 #if BLAZE_AVX512BW_MODE
93 {
94  return _mm512_srlv_epi16( a.value, (~b).value );
95 }
96 #else
97 = delete;
98 #endif
99 //*************************************************************************************************
100 
101 
102 
103 
104 //=================================================================================================
105 //
106 // 32-BIT INTEGRAL SIMD TYPES
107 //
108 //=================================================================================================
109 
110 //*************************************************************************************************
120 template< typename T > // Type of both operands
121 BLAZE_ALWAYS_INLINE const SIMDint32
122  operator>>( const SIMDint32& a, const SIMDi32<T>& b ) noexcept
123 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
124 {
125  return _mm512_srav_epi32( a.value, (~b).value );
126 }
127 #elif BLAZE_AVX2_MODE
128 {
129  return _mm256_srav_epi32( a.value, (~b).value );
130 }
131 #else
132 = delete;
133 #endif
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
147 template< typename T > // Type of both operands
148 BLAZE_ALWAYS_INLINE const SIMDuint32
149  operator>>( const SIMDuint32& a, const SIMDi32<T>& b ) noexcept
150 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
151 {
152  return _mm512_srlv_epi32( a.value, (~b).value );
153 }
154 #elif BLAZE_AVX2_MODE
155 {
156  return _mm256_srlv_epi32( a.value, (~b).value );
157 }
158 #else
159 = delete;
160 #endif
161 //*************************************************************************************************
162 
163 
164 
165 
166 //=================================================================================================
167 //
168 // 64-BIT INTEGRAL SIMD TYPES
169 //
170 //=================================================================================================
171 
172 //*************************************************************************************************
182 template< typename T > // Type of both operands
183 BLAZE_ALWAYS_INLINE const SIMDint64
184  operator>>( const SIMDint64& a, const SIMDi64<T>& b ) noexcept
185 #if BLAZE_AVX512F_MODE
186 {
187  return _mm512_srav_epi64( a.value, (~b).value );
188 }
189 #else
190 = delete;
191 #endif
192 //*************************************************************************************************
193 
194 
195 //*************************************************************************************************
205 template< typename T > // Type of both operands
206 BLAZE_ALWAYS_INLINE const SIMDuint64
207  operator>>( const SIMDuint64& a, const SIMDi64<T>& b ) noexcept
208 #if BLAZE_AVX512F_MODE
209 {
210  return _mm512_srlv_epi64( a.value, (~b).value );
211 }
212 #elif BLAZE_AVX2_MODE
213 {
214  return _mm256_srlv_epi64( a.value, (~b).value );
215 }
216 #else
217 = delete;
218 #endif
219 //*************************************************************************************************
220 
221 } // namespace blaze
222 
223 #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.