Browse Source

Add f32<4>(float, float, float, float) constructor.

tags/v1.0.0
Andrew Belt 6 years ago
parent
commit
e35cb23d69
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      include/dsp/simd.hpp

+ 5
- 0
include/dsp/simd.hpp View File

@@ -56,6 +56,11 @@ struct f32<4> {
v = _mm_set_ps1(x);
}

/** Constructs a vector from four values. */
f32<4>(float x1, float x2, float x3, float x4) {
v = _mm_set_ps(x1, x2, x3, x4);
}

/** Reads an array of 4 values. */
static f32<4> load(const float *x) {
return f32<4>(_mm_loadu_ps(x));


Loading…
Cancel
Save