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 36 of file PSEUDO_F32vec1.h.

Constructor & Destructor Documentation

◆ F32vec1() [1/2]

F32vec1::F32vec1 ( )
inline

Definition at line 43 of file PSEUDO_F32vec1.h.

43 {}

◆ F32vec1() [2/2]

F32vec1::F32vec1 ( const float &  v0)
inline

Definition at line 44 of file PSEUDO_F32vec1.h.

44 { v = v0; }

Member Function Documentation

◆ operator float()

F32vec1::operator float ( ) const
inline

Definition at line 47 of file PSEUDO_F32vec1.h.

References v.

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

◆ operator[]() [1/2]

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

Definition at line 40 of file PSEUDO_F32vec1.h.

References v.

40 { return v; }

◆ operator[]() [2/2]

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

Definition at line 41 of file PSEUDO_F32vec1.h.

References v.

41 { return v; }

Friends And Related Function Documentation

◆ bool2int

F32vec1 bool2int ( const F32vec1 a)
friend

Definition at line 125 of file PSEUDO_F32vec1.h.

126  { // mask returned
127  return if3(a, 1, 0);
128  }
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 115 of file PSEUDO_F32vec1.h.

116  {
117  F32vec1 z;
118  z[0] = (a[0]) ? b[0] : c[0];
119 
120  return z;
121  }

◆ operator &

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

Definition at line 102 of file PSEUDO_F32vec1.h.

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

◆ operator!

F32vec1 operator! ( const F32vec1 a)
friend

Definition at line 107 of file PSEUDO_F32vec1.h.

108  {
109  F32vec1 z;
110  z[0] = !a[0];
111 
112  return z;
113  }

◆ operator*=

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

Definition at line 87 of file PSEUDO_F32vec1.h.

87 { a = a * b; }

◆ operator+=

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

Definition at line 85 of file PSEUDO_F32vec1.h.

85 { a = a + b; }

◆ operator-=

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

Definition at line 86 of file PSEUDO_F32vec1.h.

86 { a = a - b; }

◆ operator/=

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

Definition at line 88 of file PSEUDO_F32vec1.h.

88 { a = a / b; }

◆ operator<

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

Definition at line 96 of file PSEUDO_F32vec1.h.

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

◆ operator<<

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

Definition at line 130 of file PSEUDO_F32vec1.h.

131  {
132  strm << a[0];
133  return strm;
134  }

◆ operator<=

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

Definition at line 97 of file PSEUDO_F32vec1.h.

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

◆ operator>

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

Definition at line 98 of file PSEUDO_F32vec1.h.

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

◆ operator>=

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

Definition at line 99 of file PSEUDO_F32vec1.h.

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

◆ operator>>

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

Definition at line 136 of file PSEUDO_F32vec1.h.

137  {
138  float tmp;
139  strm >> tmp;
140  a = tmp;
141  return strm;
142  }

◆ operator|

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

Definition at line 103 of file PSEUDO_F32vec1.h.

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

◆ operator||

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

Definition at line 104 of file PSEUDO_F32vec1.h.

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

◆ rcp

F32vec1 rcp ( const F32vec1 a)
friend

Definition at line 61 of file PSEUDO_F32vec1.h.

61 { return 1. / a; }

Member Data Documentation

◆ v

float F32vec1::v

Definition at line 38 of file PSEUDO_F32vec1.h.

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


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