22 return _mm_movemask_ps(a.
v);
29 return _mm_movemask_ps(_mm_castsi128_ps(a.
v));
49inline float ifelse(
bool cond,
float a,
float b) {
55 return (a & mask) |
andnot(mask, b);
67 return (mask1234 &
int32_4(a)) == mask1234;
163#ifndef _MM_FROUND_NO_EXC
164 #define _MM_FROUND_NO_EXC SIMDE_MM_FROUND_NO_EXC
192 return a -
floor(a / b) * b;
198 return sqrt(a * a + b * b);
216 return hypot(a.real(), a.imag());
222 return atan2(a.imag(), a.real());
232 return exp(b * std::log(a));
239 for (
int i = 1; i <= b; i *= 2) {
258 return yMin + (x - xMin) / (xMax - xMin) * (yMax - yMin);
264 return a + (b - a) * p;
272 return signbit | (nonzero & 1.f);
#define _MM_FROUND_NO_EXC
Definition functions.hpp:164
int clamp(int x, int a, int b)
Limits x between a and b.
Definition math.hpp:32
float rescale(float x, float xMin, float xMax, float yMin, float yMax)
Rescales x from the range [xMin, xMax] to [yMin, yMax].
Definition math.hpp:151
float crossfade(float a, float b, float p)
Linearly interpolates between a and b, from p = 0 to p = 1.
Definition math.hpp:157
T sgn(T x)
Returns 1 for positive numbers, -1 for negative numbers, and 0 for zero.
Definition math.hpp:95
float_4 andnot(float_4 a, float_4 b)
~a & b
Definition functions.hpp:14
float_4 arg(std::complex< float_4 > a)
Definition functions.hpp:221
float_4 abs(float_4 a)
Definition functions.hpp:211
Vector< int32_t, 4 > int32_4
Definition Vector.hpp:341
float_4 fmax(float_4 x, float_4 b)
Definition functions.hpp:90
Vector< float, 4 > float_4
Definition Vector.hpp:340
float_4 atan2(float_4 x, float_4 y)
Definition functions.hpp:156
float_4 fmin(float_4 x, float_4 b)
Definition functions.hpp:96
float_4 hypot(float_4 a, float_4 b)
Definition functions.hpp:197
float_4 cos(float_4 x)
Definition functions.hpp:138
float_4 pow(float_4 a, float_4 b)
Definition functions.hpp:227
int32_4 movemaskInverse< int32_4 >(int a)
Definition functions.hpp:64
float_4 crossfade(float_4 a, float_4 b, float_4 p)
Definition functions.hpp:263
float_4 sqrt(float_4 x)
Definition functions.hpp:102
float_4 tan(float_4 x)
Definition functions.hpp:144
float_4 movemaskInverse< float_4 >(int a)
Definition functions.hpp:71
float_4 ceil(float_4 a)
Definition functions.hpp:179
float_4 floor(float_4 a)
Definition functions.hpp:173
T movemaskInverse(int a)
Returns a vector where element N is all 1's if the N'th bit of a is 1, or all 0's if the N'th bit of ...
float_4 rsqrt(float_4 x)
Returns the approximate reciprocal square root.
Definition functions.hpp:35
float_4 rescale(float_4 x, float_4 xMin, float_4 xMax, float_4 yMin, float_4 yMax)
Definition functions.hpp:257
int movemask(float_4 a)
Returns an integer with each bit corresponding to the most significant bit of each element.
Definition functions.hpp:21
float_4 fabs(float_4 a)
Definition functions.hpp:203
float_4 rcp(float_4 x)
Returns the approximate reciprocal.
Definition functions.hpp:42
float_4 log10(float_4 x)
Definition functions.hpp:114
float_4 clamp(float_4 x, float_4 a=0.f, float_4 b=1.f)
Definition functions.hpp:251
float_4 sgn(float_4 x)
Definition functions.hpp:269
float_4 log2(float_4 x)
Definition functions.hpp:120
float_4 trunc(float_4 a)
Definition functions.hpp:167
float_4 exp(float_4 x)
Definition functions.hpp:126
float_4 atan(float_4 x)
Definition functions.hpp:150
float_4 round(float_4 a)
Definition functions.hpp:185
float ifelse(bool cond, float a, float b)
Definition functions.hpp:49
float_4 log(float_4 x)
Definition functions.hpp:108
float_4 sin(float_4 x)
Definition functions.hpp:132
float_4 fmod(float_4 a, float_4 b)
Definition functions.hpp:191
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
__m128 sse_mathfun_cos_ps(__m128 x)
Definition sse_mathfun.h:297
__m128 sse_mathfun_log_ps(__m128 x)
Definition sse_mathfun.h:58
__m128 sse_mathfun_exp_ps(__m128 x)
Definition sse_mathfun.h:129
__m128 sse_mathfun_sin_ps(__m128 x)
Definition sse_mathfun.h:209
__m128 sse_mathfun_atan_ps(__m128 x)
Definition sse_mathfun_extension.h:176
__m128 sse_mathfun_tan_ps(__m128 x)
Definition sse_mathfun_extension.h:167
__m128 sse_mathfun_atan2_ps(__m128 y, __m128 x)
Definition sse_mathfun_extension.h:247
Wrapper for __m128 representing an aligned vector of 4 single-precision float values.
Definition Vector.hpp:34
static Vector cast(Vector< int32_t, 4 > a)
Definition Vector.hpp:163
__m128 v
Definition Vector.hpp:39
Definition Vector.hpp:108
__m128i v
Definition Vector.hpp:113