Browse Source

Import Vector.hpp fix from Rack, before 2.2 update

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.11
falkTX 3 years ago
parent
commit
7655bb5f0b
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      include/simd/Vector.hpp

+ 2
- 2
include/simd/Vector.hpp View File

@@ -359,12 +359,12 @@ inline Vector<int32_t, 4> operator~(const Vector<int32_t, 4>& a) {

/** `a << b` */
inline Vector<int32_t, 4> operator<<(const Vector<int32_t, 4>& a, const int& b) {
return Vector<int32_t, 4>(_mm_slli_epi32(a.v, b));
return Vector<int32_t, 4>(_mm_sll_epi32(a.v, _mm_cvtsi32_si128(b)));
}

/** `a >> b` */
inline Vector<int32_t, 4> operator>>(const Vector<int32_t, 4>& a, const int& b) {
return Vector<int32_t, 4>(_mm_srli_epi32(a.v, b));
return Vector<int32_t, 4>(_mm_srl_epi32(a.v, _mm_cvtsi32_si128(b)));
}




Loading…
Cancel
Save