1#ifndef L1Algo_PSEUDO_F32vec4_H
2#define L1Algo_PSEUDO_F32vec4_H
15float min(
float x,
float y);
16float max(
float x,
float y);
17float asgnb(
float x,
float y);
47 F32vec4(
const float& f0,
const float& f1,
const float& f2,
const float& f3)
57 z.v[0] = F(A.v[0], B.v[0]); \
58 z.v[1] = F(A.v[1], B.v[1]); \
59 z.v[2] = F(A.v[2], B.v[2]); \
60 z.v[3] = F(A.v[3], B.v[3]); \
71 z.v[0] = A.v[0] O B.v[0]; \
72 z.v[1] = A.v[1] O B.v[1]; \
73 z.v[2] = A.v[2] O B.v[2]; \
74 z.v[3] = A.v[3] O B.v[3]; \
108 z[0] = (a[0]) ? b[0] : c[0];
109 z[1] = (a[1]) ? b[1] : c[1];
110 z[2] = (a[2]) ? b[2] : c[2];
111 z[3] = (a[3]) ? b[3] : c[3];
116#define NotEmpty(a) bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3])
117#define Empty(a) !(bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3]))
126 friend float min(
float x,
float y) {
return x < y ? x : y; }
127 friend float max(
float x,
float y) {
return x < y ? y : x; }
128 friend float asgnb(
float x,
float y) {
return y >= 0 ?
fabs(x) : -
fabs(x); }
130 friend float rcp(
float x) {
return 1. / x; }
131 friend float sgn(
float x) {
return x >= 0 ? 1 : -1; }
155 strm << a[0] <<
" " << a[1] <<
" " << a[2] <<
" " << a[3];
175#define _fvecalignment
float asgnb(float x, float y)
float min(float x, float y)
float max(float x, float y)
friend F32vec4 operator>(const F32vec4 &a, const F32vec4 &b)
float & operator[](int i)
friend F32vec4 sgn(const F32vec4 &a)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 operator|(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 rcp(const F32vec4 &a)
friend F32vec4 operator||(const F32vec4 &a, const F32vec4 &b)
float operator[](int i) const
friend F32vec4 sin(const F32vec4 &a)
friend F32vec4 if3(const F32vec4 &a, const F32vec4 &b, const F32vec4 &c)
friend F32vec4 operator-(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 fabs(const F32vec4 &a)
friend F32vec4 bool2int(const F32vec4 &a)
friend F32vec4 rsqrt(const F32vec4 &a)
friend F32vec4 asgnb(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 operator<=(const F32vec4 &a, const F32vec4 &b)
friend float asgnb(float x, float y)
friend F32vec4 operator&(const F32vec4 &a, const F32vec4 &b)
F32vec4(const float &f0, const float &f1, const float &f2, const float &f3)
friend float sgn(float x)
friend F32vec4 operator<(const F32vec4 &a, const F32vec4 &b)
F32vec4(const F32vec4 &a)
friend F32vec4 operator>=(const F32vec4 &a, const F32vec4 &b)
friend ostream & operator<<(ostream &strm, const F32vec4 &a)
friend F32vec4 operator*(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 exp(const F32vec4 &a)
friend float rsqrt(float x)
friend F32vec4 operator+(const F32vec4 &a, const F32vec4 &b)
vec_arithmetic(F32vec4, float)
friend F32vec4 operator/(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 sqrt(const F32vec4 &a)
friend F32vec4 log(const F32vec4 &a)
friend float rcp(float x)
friend F32vec4 operator!(const F32vec4 &a)
friend float min(float x, float y)
friend float max(float x, float y)
friend F32vec4 cos(const F32vec4 &a)
friend istream & operator>>(istream &strm, F32vec4 &a)
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
nsL1::vector< fvec >::TSimd vector_fvec