FairRoot/PandaRoot
Classes | Namespaces | Macros | Typedefs | Functions | Variables
PSEUDO_F32vec4.h File Reference
#include <iostream>
#include <cmath>
#include "vec_arithmetic.h"

Go to the source code of this file.

Classes

class  F32vec4
 
struct  nsL1::vector< T >
 
struct  nsL1vector< T >
 

Namespaces

 nsL1
 

Macros

#define _f2(A, B, F)
 
#define _f1(A, F)
 
#define _op(A, B, O)
 
#define NotEmpty(a)   bool((a)[0])|bool((a)[1])|bool((a)[2])|bool((a)[3])
 
#define Empty(a)   !(bool((a)[0])|bool((a)[1])|bool((a)[2])|bool((a)[3]))
 
#define _fvecalignment
 

Typedefs

typedef F32vec4 fvec
 
typedef float fscal
 

Functions

float min (float x, float y)
 
float max (float x, float y)
 
float asgnb (float x, float y)
 
float rsqrt (float x)
 
float rcp (float x)
 
float sgn (float x)
 
class F32vec4 __attribute__ ((aligned(16)))
 
float & operator[] (int i)
 
 F32vec4 ()
 
 F32vec4 (const F32vec4 &a)
 
 F32vec4 (const float &a)
 
 F32vec4 (const float &f0, const float &f1, const float &f2, const float &f3)
 
F32vec4 operator+ (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator- (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator* (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator/ (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator< (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator<= (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator> (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator>= (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator& (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator| (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator|| (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 operator! (const F32vec4 &a)
 
F32vec4 if3 (const F32vec4 &a, const F32vec4 &b, const F32vec4 &c)
 
F32vec4 bool2int (const F32vec4 &a)
 
F32vec4 min (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 max (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 asgnb (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 sqrt (const F32vec4 &a)
 
F32vec4 rsqrt (const F32vec4 &a)
 
F32vec4 rcp (const F32vec4 &a)
 
F32vec4 fabs (const F32vec4 &a)
 
F32vec4 sgn (const F32vec4 &a)
 
F32vec4 exp (const F32vec4 &a)
 
F32vec4 log (const F32vec4 &a)
 
F32vec4 sin (const F32vec4 &a)
 
F32vec4 cos (const F32vec4 &a)
 
 vec_arithmetic (F32vec4, float)
 
ostream & operator<< (ostream &strm, const F32vec4 &a)
 
istream & operator>> (istream &strm, F32vec4 &a)
 

Variables

float v [4]
 
const int fvecLen = 4
 
nsL1vector __attribute__
 

Macro Definition Documentation

#define _f1 (   A,
  F 
)
Value:
F32vec4 z; z.v[0] = F(A.v[0]); z.v[1] = F(A.v[1]); \
z.v[2] = F(A.v[2]); z.v[3] = F(A.v[3]); return z;
TFile * F
Definition: anaLmdReco.C:31
Double_t z
__m128 v
Definition: P4_F32vec4.h:48

Definition at line 55 of file PSEUDO_F32vec4.h.

Referenced by cos(), exp(), fabs(), log(), sgn(), and sin().

#define _f2 (   A,
  B,
  F 
)
Value:
F32vec4 z; z.v[0] = F(A.v[0],B.v[0]); z.v[1] = F(A.v[1],B.v[1]); \
z.v[2] = F(A.v[2],B.v[2]); z.v[3] = F(A.v[3],B.v[3]); return z;
TFile * F
Definition: anaLmdReco.C:31
Double_t z
__m128 v
Definition: P4_F32vec4.h:48

Definition at line 53 of file PSEUDO_F32vec4.h.

Referenced by rcp(), rsqrt(), and sqrt().

#define _fvecalignment

Definition at line 157 of file PSEUDO_F32vec4.h.

#define _op (   A,
  B,
 
)
Value:
F32vec4 z; z.v[0] = A.v[0] O B.v[0]; z.v[1] = A.v[1] O B.v[1]; \
z.v[2] = A.v[2] O B.v[2]; z.v[3] = A.v[3] O B.v[3]; return z;
Double_t z
__m128 v
Definition: P4_F32vec4.h:48

Definition at line 57 of file PSEUDO_F32vec4.h.

Referenced by operator!(), operator&(), operator/(), operator<(), and operator>=().

#define Empty (   a)    !(bool((a)[0])|bool((a)[1])|bool((a)[2])|bool((a)[3]))

Definition at line 98 of file PSEUDO_F32vec4.h.

#define NotEmpty (   a)    bool((a)[0])|bool((a)[1])|bool((a)[2])|bool((a)[3])

Definition at line 97 of file PSEUDO_F32vec4.h.

Typedef Documentation

typedef float fscal

Definition at line 153 of file PSEUDO_F32vec4.h.

typedef F32vec4 fvec

Definition at line 150 of file PSEUDO_F32vec4.h.

Function Documentation

class F32vec4 __attribute__ ( (aligned(16))  )
float asgnb ( float  x,
float  y 
)

Definition at line 110 of file PSEUDO_F32vec4.h.

111 { return x<y ?x :y; }
Double_t x
Double_t y
friend F32vec4 __attribute__::asgnb ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 117 of file PSEUDO_F32vec4.h.

118 { _f2(a,b,min) }
float min(float x, float y)
#define _f2(A, B, F)
friend F32vec4 __attribute__::bool2int ( const F32vec4 a)

Definition at line 101 of file PSEUDO_F32vec4.h.

104  { // mask returned
friend F32vec4 __attribute__::cos ( const F32vec4 a)

Definition at line 126 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::exp.

126 { _f1(a,exp) }
friend F32vec4 exp(const F32vec4 &a)
#define _f1(A, F)
friend F32vec4 __attribute__::exp ( const F32vec4 a)

Definition at line 123 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::rcp.

123 { _f1(a,rcp) }
float rcp(float x)
#define _f1(A, F)
__attribute__::F32vec4 ( )

Definition at line 31 of file PSEUDO_F32vec4.h.

References i.

31 { return ((float*)&v)[i]; }
Int_t i
Definition: run_full.C:25
float v[4]
__attribute__::F32vec4 ( const F32vec4 a)

Definition at line 32 of file PSEUDO_F32vec4.h.

References i.

32  { return ((float*)&v)[i]; }
33 
34  F32vec4( ){}
35  F32vec4( const F32vec4 &a ) {
36  v[0] = a.v[0];
37  v[1] = a.v[1];
Int_t i
Definition: run_full.C:25
float v[4]
F32vec4()
__m128 v
Definition: P4_F32vec4.h:48
__attribute__::F32vec4 ( const float &  a)

Definition at line 38 of file PSEUDO_F32vec4.h.

41  {
42  v[0] = a;
43  v[1] = a;
float v[4]
Int_t a
Definition: anaLmdDigi.C:126
__attribute__::F32vec4 ( const float &  f0,
const float &  f1,
const float &  f2,
const float &  f3 
)

Definition at line 45 of file PSEUDO_F32vec4.h.

48  {
49  v[0] = f0;
50  v[1] = f1;
float v[4]
TF1 * f1
Definition: reco_analys2.C:50
friend F32vec4 __attribute__::fabs ( const F32vec4 a)

Definition at line 121 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::sqrt.

121 { _f1(a,sqrt) }
#define _f1(A, F)
friend F32vec4 sqrt(const F32vec4 &a)
friend F32vec4 __attribute__::if3 ( const F32vec4 a,
const F32vec4 b,
const F32vec4 c 
)

Definition at line 87 of file PSEUDO_F32vec4.h.

90  {
91  F32vec4 z;
92  z[0] = (a[0]) ? b[0] : c[0];
93  z[1] = (a[1]) ? b[1] : c[1];
94  z[2] = (a[2]) ? b[2] : c[2];
95  z[3] = (a[3]) ? b[3] : c[3];
Double_t z
friend F32vec4 __attribute__::log ( const F32vec4 a)

Definition at line 124 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::fabs.

124 { _f1(a,fabs) }
#define _f1(A, F)
friend F32vec4 fabs(const F32vec4 &a)
float max ( float  x,
float  y 
)

Definition at line 109 of file PSEUDO_F32vec4.h.

111 { return x<y ?x :y; }
Double_t x
Double_t y
friend F32vec4 __attribute__::max ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 116 of file PSEUDO_F32vec4.h.

116 { return x>=0 ?1 :-1; }
Double_t x
float min ( float  x,
float  y 
)

Definition at line 108 of file PSEUDO_F32vec4.h.

111 { return x<y ?x :y; }
Double_t x
Double_t y
friend F32vec4 __attribute__::min ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 115 of file PSEUDO_F32vec4.h.

References x.

115 { return 1./x; }
Double_t x
friend F32vec4 __attribute__::operator! ( const F32vec4 a)

Definition at line 77 of file PSEUDO_F32vec4.h.

References _op.

77  { _op(a,b,||) }
78  friend F32vec4 operator ||(const F32vec4 &a, const F32vec4 &b){ _op(a,b,||) }
79 
80  friend F32vec4 operator !(const F32vec4 &a) {
81  F32vec4 z;
82  z[0] = !a[0];
83  z[1] = !a[1];
84  z[2] = !a[2];
85  z[3] = !a[3];
TTree * b
#define _op(A, B, O)
friend F32vec4 operator!(const F32vec4 &a)
Double_t z
friend F32vec4 operator||(const F32vec4 &a, const F32vec4 &b)
friend F32vec4 __attribute__::operator& ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 73 of file PSEUDO_F32vec4.h.

References _op.

73 { _op(a,b,>=) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator* ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 63 of file PSEUDO_F32vec4.h.

64 { _op(a,b,+) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator+ ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 61 of file PSEUDO_F32vec4.h.

64 { _op(a,b,+) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator- ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 62 of file PSEUDO_F32vec4.h.

64 { _op(a,b,+) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator/ ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 64 of file PSEUDO_F32vec4.h.

References _op.

64 { _op(a,b,+) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator< ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 67 of file PSEUDO_F32vec4.h.

References _op.

67 { _op(a,b,/) }
#define _op(A, B, O)
friend ostream& __attribute__::operator<< ( ostream &  strm,
const F32vec4 a 
)

Definition at line 135 of file PSEUDO_F32vec4.h.

138  {
friend F32vec4 __attribute__::operator<= ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 68 of file PSEUDO_F32vec4.h.

70 { _op(a,b,<) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator> ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 69 of file PSEUDO_F32vec4.h.

70 { _op(a,b,<) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator>= ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 70 of file PSEUDO_F32vec4.h.

References _op.

70 { _op(a,b,<) }
#define _op(A, B, O)
friend istream& __attribute__::operator>> ( istream &  strm,
F32vec4 a 
)

Definition at line 140 of file PSEUDO_F32vec4.h.

143  {
144  float tmp;
145  strm>>tmp;
float& __attribute__::operator[] ( int  i)

Definition at line 28 of file PSEUDO_F32vec4.h.

31 { return ((float*)&v)[i]; }
Int_t i
Definition: run_full.C:25
float v[4]
friend F32vec4 __attribute__::operator| ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 74 of file PSEUDO_F32vec4.h.

76 { _op(a,b,&&) }
#define _op(A, B, O)
friend F32vec4 __attribute__::operator|| ( const F32vec4 a,
const F32vec4 b 
)

Definition at line 75 of file PSEUDO_F32vec4.h.

76 { _op(a,b,&&) }
#define _op(A, B, O)
float rcp ( float  x)

Definition at line 112 of file PSEUDO_F32vec4.h.

References x.

112 { return x<y ?y :x; }
Double_t x
Double_t y
friend F32vec4 __attribute__::rcp ( const F32vec4 a)

Definition at line 120 of file PSEUDO_F32vec4.h.

References _f2, and F32vec4::asgnb.

120 { _f2(a,b,asgnb) }
float asgnb(float x, float y)
TTree * b
#define _f2(A, B, F)
float rsqrt ( float  x)

Definition at line 111 of file PSEUDO_F32vec4.h.

References y.

111 { return x<y ?x :y; }
Double_t x
Double_t y
friend F32vec4 __attribute__::rsqrt ( const F32vec4 a)

Definition at line 119 of file PSEUDO_F32vec4.h.

References _f2, and F32vec4::max.

119 { _f2(a,b,max) }
TTree * b
#define _f2(A, B, F)
float max(float x, float y)
float sgn ( float  x)

Definition at line 113 of file PSEUDO_F32vec4.h.

References F32vec4::fabs.

113 { return y>=0 ?fabs(x) :-fabs(x); }
Double_t x
friend F32vec4 fabs(const F32vec4 &a)
Double_t y
friend F32vec4 __attribute__::sgn ( const F32vec4 a)

Definition at line 122 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::rsqrt.

122 { _f1(a,rsqrt) }
#define _f1(A, F)
float rsqrt(float x)
friend F32vec4 __attribute__::sin ( const F32vec4 a)

Definition at line 125 of file PSEUDO_F32vec4.h.

References _f1, and F32vec4::sgn.

125 { _f1(a,sgn) }
#define _f1(A, F)
float sgn(float x)
friend F32vec4 __attribute__::sqrt ( const F32vec4 a)

Definition at line 118 of file PSEUDO_F32vec4.h.

References _f2, and F32vec4::min.

118 { _f2(a,b,min) }
float min(float x, float y)
TTree * b
#define _f2(A, B, F)
__attribute__::vec_arithmetic ( F32vec4  ,
float   
)

Variable Documentation

nsL1vector __attribute__
const int fvecLen = 4

Definition at line 154 of file PSEUDO_F32vec4.h.

float v[4]

Definition at line 26 of file PSEUDO_F32vec4.h.