Blaze 3.9
ShiftLI.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SIMD_SHIFTLI_H_
36#define _BLAZE_MATH_SIMD_SHIFTLI_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_slli_epi16( a.value, static_cast<unsigned int>( count ) );
71}
72#elif BLAZE_AVX2_MODE
73{
74 return _mm256_slli_epi16( a.value, count );
75}
76#elif BLAZE_SSE2_MODE
77{
78 return _mm_slli_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_slli_epi16( a.value, static_cast<unsigned int>( count ) );
101}
102#elif BLAZE_AVX2_MODE
103{
104 return _mm256_slli_epi16( a.value, count );
105}
106#elif BLAZE_SSE2_MODE
107{
108 return _mm_slli_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_slli_epi32( a.value, static_cast<unsigned int>( count ) );
139}
140#elif BLAZE_AVX2_MODE
141{
142 return _mm256_slli_epi32( a.value, count );
143}
144#elif BLAZE_SSE2_MODE
145{
146 return _mm_slli_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_slli_epi32( a.value, static_cast<unsigned int>( count ) );
169}
170#elif BLAZE_AVX2_MODE
171{
172 return _mm256_slli_epi32( a.value, count );
173}
174#elif BLAZE_SSE2_MODE
175{
176 return _mm_slli_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_slli_epi64( a.value, static_cast<unsigned int>( count ) );
207}
208#elif BLAZE_AVX2_MODE
209{
210 return _mm256_slli_epi64( a.value, count );
211}
212#elif BLAZE_SSE2_MODE
213{
214 return _mm_slli_epi64( a.value, count );
215}
216#else
217= delete;
218#endif
219//*************************************************************************************************
220
221
222//*************************************************************************************************
233 operator<<( const SIMDuint64& a, int count ) noexcept
234#if BLAZE_AVX512F_MODE
235{
236 return _mm512_slli_epi64( a.value, static_cast<unsigned int>( count ) );
237}
238#elif BLAZE_AVX2_MODE
239{
240 return _mm256_slli_epi64( a.value, count );
241}
242#elif BLAZE_SSE2_MODE
243{
244 return _mm_slli_epi64( a.value, count );
245}
246#else
247= delete;
248#endif
249//*************************************************************************************************
250
251} // namespace blaze
252
253#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 left-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.