1#ifndef L1Algo_F64vec2P4_H
2#define L1Algo_F64vec2P4_H
33#define _f64vec2_abs_mask (static_cast<F64vec2>(__f64vec2_abs_mask_cheat.m))
34#define _f64vec2_sgn_mask (static_cast<F64vec2>(__f64vec2_sgn_mask_cheat.m))
35#define _f64vec2_zero (static_cast<F64vec2>(__f64vec2_zero_cheat.m))
36#define _f64vec2_one (static_cast<F64vec2>(__f64vec2_one_cheat.m))
37#define _f64vec2_true (static_cast<F64vec2>(__f64vec2_true_cheat.m))
38#define _f64vec2_false (static_cast<F64vec2>(__f64vec2_false_cheat.m))
45 double&
operator[](
int i) {
return (
reinterpret_cast<double*
>(&
v))[
i]; }
46 double operator[](
int i)
const {
return (
reinterpret_cast<const double*
>(&
v))[
i]; }
58 F64vec2(
const double& f0,
const double& f1)
59 :
v(_mm_set_pd(f1, f0))
63 operator __m128d()
const {
return v; }
100 return _mm_and_pd(a, b);
104 return _mm_or_pd(a, b);
108 return _mm_xor_pd(a, b);
122 return _mm_cmplt_pd(a, b);
126 return _mm_cmple_pd(a, b);
130 return _mm_cmpgt_pd(a, b);
134 return _mm_cmpge_pd(a, b);
138 return _mm_cmpeq_pd(a, b);
141#define if3(a, b, c) ((a) & (b)) | ((!(a)) & (c))
143#define NotEmpty(a) bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3])
144#define Empty(a) !(bool((a)[0]) | bool((a)[1]) | bool((a)[2]) | bool((a)[3]))
158#define _f1(A, F) F64vec2(F(A[0]), F(A[1]))
170 const F64vec2 pi(3.1415926535897932);
188 b = (pi_2 & gt_tan_3pi_8) + (
F64vec2(!gt_tan_3pi_8) & b);
189 b = (pi_4 & gt_tan_pi_8) + (
F64vec2(!gt_tan_pi_8) & b);
190 a = (gt_tan_3pi_8 & (minusOne / a)) + (
F64vec2(!gt_tan_3pi_8) & a);
191 a = (gt_tan_pi_8 & ((absY - absX) / (absY + absX))) + (
F64vec2(!gt_tan_pi_8) & a);
194 (((8.05374449538e-2 * a2 - 1.38776856032E-1) * a2 + 1.99777106478E-1) * a2 - 3.33329491539E-1) * a2 * a + a;
196 b = (xyNeg & (-b)) + (
F64vec2(!xyNeg) & b);
198 b = (xyNeg & (b + pi)) + (
F64vec2(!xyNeg) & b);
200 b = (xyNeg & (b - pi)) + (
F64vec2(!xyNeg) & b);
201 xyNeg =
F64vec2(xZero & yZero);
202 b = (xyNeg & zero) + (
F64vec2(!xyNeg) & b);
204 b = (xyNeg & (-pi_2)) + (
F64vec2(!xyNeg) & b);
210 strm <<
"[" << a[0] <<
" " << a[1] <<
" " << a[2] <<
" " << a[3] <<
"]";
229#define _fvecalignment __attribute__((aligned(16)))
const union @120223112226020102016217313241137254015231247205 __f64vec2_one_cheat
const union @120223112226020102016217313241137254015231247205 __f64vec2_zero_cheat
#define _f64vec2_sgn_mask
const union @120223112226020102016217313241137254015231247205 __f64vec2_false_cheat
const union @120223112226020102016217313241137254015231247205 __f64vec2_abs_mask_cheat
const union @213036100055022005337345126015124225115316175374 __d_one
#define _f64vec2_abs_mask
const union @120223112226020102016217313241137254015231247205 __f64vec2_true_cheat
const union @120223112226020102016217313241137254015231247205 __f64vec2_sgn_mask_cheat
nsL1vector __attribute__
M-Stream Header https://afi.jinr.ru/MpdDeviceRawDataFormat.
friend F64vec2 operator!(const F64vec2 &a)
friend F64vec2 operator<(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 operator>(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 operator*(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 asgnb(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 log(const F64vec2 &a)
friend F64vec2 operator==(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 operator>=(const F64vec2 &a, const F64vec2 &b)
vec_arithmetic(F64vec2, double)
double & operator[](int i)
friend F64vec2 cos(const F64vec2 &a)
friend F64vec2 operator/(const F64vec2 &a, const F64vec2 &b)
F64vec2(const double &f0, const double &f1)
friend F64vec2 min(const F64vec2 &a, const F64vec2 &b)
friend std::istream & operator>>(std::istream &strm, F64vec2 &a)
friend F64vec2 operator-(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 max(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 operator<=(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 fabs(const F64vec2 &a)
friend F64vec2 operator&(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 atan2(const F64vec2 &y, const F64vec2 &x)
friend F64vec2 rsqrt(const F64vec2 &a)
friend F64vec2 bool2int(const F64vec2 &a)
friend F64vec2 sqrt(const F64vec2 &a)
friend F64vec2 operator+(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 exp(const F64vec2 &a)
friend F64vec2 sin(const F64vec2 &a)
friend F64vec2 operator|(const F64vec2 &a, const F64vec2 &b)
friend F64vec2 rcp(const F64vec2 &a)
friend std::ostream & operator<<(std::ostream &strm, const F64vec2 &a)
F64vec2(const __m128d &a)
friend F64vec2 operator^(const F64vec2 &a, const F64vec2 &b)
double operator[](int i) const
friend F64vec2 acos(const F64vec2 &a)
friend F64vec2 sgn(const F64vec2 &a)