PandaRoot
F32vec1 Class Reference

#include <PSEUDO_F32vec1.h>

Public Member Functions

float & operator[] (int i)
 
float operator[] (int i) const
 
 F32vec1 ()
 
 F32vec1 (const float &v0)
 
 operator float () const
 

Public Attributes

float v
 

Friends

F32vec1 rcp (const F32vec1 &a)
 
void operator+= (F32vec1 &a, const F32vec1 &b)
 
void operator-= (F32vec1 &a, const F32vec1 &b)
 
void operator*= (F32vec1 &a, const F32vec1 &b)
 
void operator/= (F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator< (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator<= (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator> (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator>= (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator & (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator| (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator|| (const F32vec1 &a, const F32vec1 &b)
 
F32vec1 operator! (const F32vec1 &a)
 
F32vec1 if3 (const F32vec1 &a, const F32vec1 &b, const F32vec1 &c)
 
F32vec1 bool2int (const F32vec1 &a)
 
ostream & operator<< (ostream &strm, const F32vec1 &a)
 
istream & operator>> (istream &strm, F32vec1 &a)
 

Detailed Description

Definition at line 24 of file PSEUDO_F32vec1.h.

Constructor & Destructor Documentation

◆ F32vec1() [1/2]

F32vec1::F32vec1 ( )
inline

Definition at line 31 of file PSEUDO_F32vec1.h.

31 {}

◆ F32vec1() [2/2]

F32vec1::F32vec1 ( const float &  v0)
inline

Definition at line 32 of file PSEUDO_F32vec1.h.

32 { v = v0; }

Member Function Documentation

◆ operator float()

F32vec1::operator float ( ) const
inline

Definition at line 35 of file PSEUDO_F32vec1.h.

References v.

35 { return v; } /* Convert to __m128 */

◆ operator[]() [1/2]

float& F32vec1::operator[] ( int  i)
inline

Definition at line 28 of file PSEUDO_F32vec1.h.

References v.

28 { return v; }

◆ operator[]() [2/2]

float F32vec1::operator[] ( int  i) const
inline

Definition at line 29 of file PSEUDO_F32vec1.h.

References v.

29 { return v; }

Friends And Related Function Documentation

◆ bool2int

F32vec1 bool2int ( const F32vec1 a)
friend

Definition at line 113 of file PSEUDO_F32vec1.h.

114  { // mask returned
115  return if3(a, 1, 0);
116  }
friend F32vec1 if3(const F32vec1 &a, const F32vec1 &b, const F32vec1 &c)

◆ if3

F32vec1 if3 ( const F32vec1 a,
const F32vec1 b,
const F32vec1 c 
)
friend

Definition at line 103 of file PSEUDO_F32vec1.h.

104  {
105  F32vec1 z;
106  z[0] = (a[0]) ? b[0] : c[0];
107 
108  return z;
109  }

◆ operator &

F32vec1 operator& ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 90 of file PSEUDO_F32vec1.h.

90 { _op(a, b, &&) }
#define _op(A, B, O)

◆ operator!

F32vec1 operator! ( const F32vec1 a)
friend

Definition at line 95 of file PSEUDO_F32vec1.h.

96  {
97  F32vec1 z;
98  z[0] = !a[0];
99 
100  return z;
101  }

◆ operator*=

void operator*= ( F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 75 of file PSEUDO_F32vec1.h.

75 { a = a * b; }

◆ operator+=

void operator+= ( F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 73 of file PSEUDO_F32vec1.h.

73 { a = a + b; }

◆ operator-=

void operator-= ( F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 74 of file PSEUDO_F32vec1.h.

74 { a = a - b; }

◆ operator/=

void operator/= ( F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 76 of file PSEUDO_F32vec1.h.

76 { a = a / b; }

◆ operator<

F32vec1 operator< ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 84 of file PSEUDO_F32vec1.h.

84 { _op(a, b, <) }
#define _op(A, B, O)

◆ operator<<

ostream& operator<< ( ostream &  strm,
const F32vec1 a 
)
friend

Definition at line 118 of file PSEUDO_F32vec1.h.

119  {
120  strm << a[0];
121  return strm;
122  }

◆ operator<=

F32vec1 operator<= ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 85 of file PSEUDO_F32vec1.h.

85 { _op(a, b, <=) }
#define _op(A, B, O)

◆ operator>

F32vec1 operator> ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 86 of file PSEUDO_F32vec1.h.

86 { _op(a, b, >) }
#define _op(A, B, O)

◆ operator>=

F32vec1 operator>= ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 87 of file PSEUDO_F32vec1.h.

87 { _op(a, b, >=) }
#define _op(A, B, O)

◆ operator>>

istream& operator>> ( istream &  strm,
F32vec1 a 
)
friend

Definition at line 124 of file PSEUDO_F32vec1.h.

125  {
126  float tmp;
127  strm >> tmp;
128  a = tmp;
129  return strm;
130  }

◆ operator|

F32vec1 operator| ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 91 of file PSEUDO_F32vec1.h.

91 { _op(a, b, ||) }
#define _op(A, B, O)

◆ operator||

F32vec1 operator|| ( const F32vec1 a,
const F32vec1 b 
)
friend

Definition at line 92 of file PSEUDO_F32vec1.h.

92 { _op(a, b, ||) }
#define _op(A, B, O)

◆ rcp

F32vec1 rcp ( const F32vec1 a)
friend

Definition at line 49 of file PSEUDO_F32vec1.h.

49 { return 1. / a; }

Member Data Documentation

◆ v

float F32vec1::v

Definition at line 26 of file PSEUDO_F32vec1.h.

Referenced by operator float(), and operator[]().


The documentation for this class was generated from the following file: