13 #ifndef L1Algo_PSEUDO_F32vec4_H 14 #define L1Algo_PSEUDO_F32vec4_H 26 float min(
float x,
float y);
27 float max(
float x,
float y);
28 float asgnb(
float x,
float y);
57 F32vec4(
const float &f0,
const float &f1,
const float &f2,
const float &f3)
65 #define _f2(A, B, F) \ 67 z.v[0] = F(A.v[0], B.v[0]); \ 68 z.v[1] = F(A.v[1], B.v[1]); \ 69 z.v[2] = F(A.v[2], B.v[2]); \ 70 z.v[3] = F(A.v[3], B.v[3]); \ 79 #define _op(A, B, O) \ 81 z.v[0] = A.v[0] O B.v[0]; \ 82 z.v[1] = A.v[1] O B.v[1]; \ 83 z.v[2] = A.v[2] O B.v[2]; \ 84 z.v[3] = A.v[3] O B.v[3]; \ 118 z[0] = (a[0]) ? b[0] : c[0];
119 z[1] = (a[1]) ? b[1] : c[1];
120 z[2] = (a[2]) ? b[2] : c[2];
121 z[3] = (a[3]) ? b[3] : c[3];
126 #define NotEmpty(a) bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3]) 127 #define Empty(a) !(bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3])) 136 friend float min(
float x,
float y) {
return x < y ? x : y; }
137 friend float max(
float x,
float y) {
return x < y ? y : x; }
138 friend float asgnb(
float x,
float y) {
return y >= 0 ?
fabs(x) : -
fabs(x); }
140 friend float rcp(
float x) {
return 1. / x; }
141 friend float sgn(
float x) {
return x >= 0 ? 1 : -1; }
165 strm << a[0] <<
" " << a[1] <<
" " << a[2] <<
" " << a[3];
185 #define _fvecalignment 188 template <
typename T>
197 template <
typename T>
float asgnb(float x, float y)
friend F32vec4 operator!(const F32vec4 &a)
friend F32vec4 log(const F32vec4 &a)
friend float rcp(float x)
float min(float x, float y)
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 rsqrt(const F32vec4 &a)
F32vec4(const float &f0, const float &f1, const float &f2, const float &f3)
nsL1::vector< fvec >::TSimd vector_fvec
vec_arithmetic(F32vec4, float)
friend F32vec4 operator>(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 operator+(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 exp(const F32vec4 &a)
friend F32vec4 operator||(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 rcp(const F32vec4 &a)
friend F32vec4 operator/(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 asgnb(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 operator|(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 if3(const F32vec4 &a, const F32vec4 &b, const F32vec4 &c)
friend F32vec4 operator<(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 bool2int(const F32vec4 &a)
friend F32vec4 cos(const F32vec4 &a)
friend F32vec4 operator<=(const F32vec4 &a, const F32vec4 &b)
float & operator[](int i)
friend F32vec4 operator &(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 fabs(const F32vec4 &a)
friend F32vec4 operator-(const F32vec4 &a, const F32vec4 &b)
float max(float x, float y)
friend F32vec4 sgn(const F32vec4 &a)
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 operator>=(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 sqrt(const F32vec4 &a)
friend ostream & operator<<(ostream &strm, const F32vec4 &a)
friend F32vec4 operator*(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 sin(const F32vec4 &a)
friend istream & operator>>(istream &strm, F32vec4 &a)
F32vec4(const F32vec4 &a)