Browse Source

Add int32_4::setr().

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
85862e0d68
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      include/simd/vector.hpp

+ 3
- 0
include/simd/vector.hpp View File

@@ -115,6 +115,9 @@ struct Vector<int32_t, 4> {
static Vector mask() {
return Vector(_mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128()));
}
static Vector setr(int32_t x1, int32_t x2, int32_t x3, int32_t x4) {
return Vector(_mm_setr_epi32(x1, x2, x3, x4));
}
static Vector load(const int32_t *x) {
// HACK
// Use _mm_loadu_si128() because GCC doesn't support _mm_loadu_si32()


Loading…
Cancel
Save