Blaze 3.9
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
48namespace blaze {
49
50//=================================================================================================
51//
52// 16-BIT INTEGRAL SIMD TYPES
53//
54//=================================================================================================
55
56//*************************************************************************************************
67 operator>>( const SIMDint16& a, int count ) noexcept
68#if BLAZE_AVX512BW_MODE
69{
70 return _mm512_srai_epi16( a.value, static_cast<unsigned int>( 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//*************************************************************************************************
97 operator>>( const SIMDuint16& a, int count ) noexcept
98#if BLAZE_AVX512BW_MODE
99{
100 return _mm512_srli_epi16( a.value, static_cast<unsigned int>( 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//*************************************************************************************************
135 operator>>( const SIMDint32& a, int count ) noexcept
136#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
137{
138 return _mm512_srai_epi32( a.value, static_cast<unsigned int>( 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//*************************************************************************************************
165 operator>>( const SIMDuint32& a, int count ) noexcept
166#if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE
167{
168 return _mm512_srli_epi32( a.value, static_cast<unsigned int>( 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//*************************************************************************************************
203 operator>>( const SIMDint64& a, int count ) noexcept
204#if BLAZE_AVX512F_MODE
205{
206 return _mm512_srai_epi64( a.value, static_cast<unsigned int>( count ) );
207}
208#else
209= delete;
210#endif
211//*************************************************************************************************
212
213
214//*************************************************************************************************
225 operator>>( const SIMDuint64& a, int count ) noexcept
226#if BLAZE_AVX512F_MODE
227{
228 return _mm512_srli_epi64( a.value, static_cast<unsigned int>( 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
Header file for the basic SIMD types.
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 16-bit unsigned integral data values.
SIMD type for 32-bit unsigned integral data values.
SIMD type for 64-bit unsigned integral data values.
BLAZE_ALWAYS_INLINE const SIMDuint64 operator>>(const SIMDuint64 &a, int count) noexcept=delete
Uniform right-shift of a vector of 64-bit unsigned integral SIMD values.
#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.