NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::VectorBase< T, L, S > Class Template Reference

#include <Math.hpp>

Public Member Functions

FW_CUDA_FUNC VectorBase (void)
 
FW_CUDA_FUNC const T * getPtr (void) const
 
FW_CUDA_FUNC T * getPtr (void)
 
FW_CUDA_FUNC const T & get (int idx) const
 
FW_CUDA_FUNC T & get (int idx)
 
FW_CUDA_FUNCset (int idx, const T &a)
 
FW_CUDA_FUNC void set (const T &a)
 
FW_CUDA_FUNC void set (const T *ptr)
 
FW_CUDA_FUNC void setZero (void)
 
void print (void) const
 
void sprint (char *vec, size_t s) const
 
FW_CUDA_FUNC bool isZero (void) const
 
FW_CUDA_FUNClenSqr (void) const
 
FW_CUDA_FUNClength (void) const
 
FW_CUDA_FUNCnormalized (T len=(T) 1) const
 
FW_CUDA_FUNC void normalize (T len=(T) 1)
 
FW_CUDA_FUNCmin (void) const
 
FW_CUDA_FUNCmax (void) const
 
FW_CUDA_FUNCsum (void) const
 
FW_CUDA_FUNCabs (void) const
 
FW_CUDA_FUNC Vector< T, L+1 > toHomogeneous (void) const
 
FW_CUDA_FUNC Vector< T, L-1 > toCartesian (void) const
 
FW_CUDA_FUNC const T & operator[] (int idx) const
 
FW_CUDA_FUNC T & operator[] (int idx)
 
FW_CUDA_FUNC S & operator= (const T &a)
 
FW_CUDA_FUNC S & operator+= (const T &a)
 
FW_CUDA_FUNC S & operator-= (const T &a)
 
FW_CUDA_FUNC S & operator*= (const T &a)
 
FW_CUDA_FUNC S & operator/= (const T &a)
 
FW_CUDA_FUNC S & operator%= (const T &a)
 
FW_CUDA_FUNC S & operator&= (const T &a)
 
FW_CUDA_FUNC S & operator|= (const T &a)
 
FW_CUDA_FUNC S & operator^= (const T &a)
 
FW_CUDA_FUNC S & operator<<= (const T &a)
 
FW_CUDA_FUNC S & operator>>= (const T &a)
 
FW_CUDA_FUNCoperator+ (void) const
 
FW_CUDA_FUNCoperator- (void) const
 
FW_CUDA_FUNCoperator~ (void) const
 
FW_CUDA_FUNCoperator+ (const T &a) const
 
FW_CUDA_FUNCoperator- (const T &a) const
 
FW_CUDA_FUNCoperator* (const T &a) const
 
FW_CUDA_FUNCoperator/ (const T &a) const
 
FW_CUDA_FUNCoperator% (const T &a) const
 
FW_CUDA_FUNCoperator& (const T &a) const
 
FW_CUDA_FUNCoperator| (const T &a) const
 
FW_CUDA_FUNCoperator^ (const T &a) const
 
FW_CUDA_FUNCoperator<< (const T &a) const
 
FW_CUDA_FUNCoperator>> (const T &a) const
 
template<class V >
FW_CUDA_FUNC void set (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNCdot (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCmin (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCmax (const VectorBase< T, L, V > &v) const
 
template<class V , class W >
FW_CUDA_FUNCclamp (const VectorBase< T, L, V > &lo, const VectorBase< T, L, W > &hi) const
 
template<class V >
FW_CUDA_FUNC S & operator= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator+= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator-= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator*= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator/= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator%= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator&= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator|= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator^= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator<<= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNC S & operator>>= (const VectorBase< T, L, V > &v)
 
template<class V >
FW_CUDA_FUNCoperator+ (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator- (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator* (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator/ (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator% (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator& (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator| (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator^ (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator<< (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNCoperator>> (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNC bool operator== (const VectorBase< T, L, V > &v) const
 
template<class V >
FW_CUDA_FUNC bool operator!= (const VectorBase< T, L, V > &v) const
 

Detailed Description

template<class T, int L, class S>
class FW::VectorBase< T, L, S >

Definition at line 121 of file Math.hpp.

Constructor & Destructor Documentation

template<class T, int L, class S>
FW_CUDA_FUNC FW::VectorBase< T, L, S >::VectorBase ( void  )
inline

Definition at line 124 of file Math.hpp.

Member Function Documentation

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::abs ( void  ) const
inline

Definition at line 149 of file Math.hpp.

template<class T, int L, class S>
template<class V , class W >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::clamp ( const VectorBase< T, L, V > &  lo,
const VectorBase< T, L, W > &  hi 
) const
inline

Definition at line 188 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::dot ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 185 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC const T& FW::VectorBase< T, L, S >::get ( int  idx) const
inline

Definition at line 128 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T& FW::VectorBase< T, L, S >::get ( int  idx)
inline

Definition at line 129 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC const T* FW::VectorBase< T, L, S >::getPtr ( void  ) const
inline

Definition at line 126 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T* FW::VectorBase< T, L, S >::getPtr ( void  )
inline

Definition at line 127 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC bool FW::VectorBase< T, L, S >::isZero ( void  ) const
inline

Definition at line 141 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::length ( void  ) const
inline

Definition at line 143 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::lenSqr ( void  ) const
inline

Definition at line 142 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::max ( void  ) const
inline

Definition at line 147 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::max ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 187 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::min ( void  ) const
inline

Definition at line 146 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::min ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 186 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC void FW::VectorBase< T, L, S >::normalize ( len = (T)1)
inline

Definition at line 145 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::normalized ( len = (T)1) const
inline

Definition at line 144 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC bool FW::VectorBase< T, L, S >::operator!= ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 214 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator% ( const T &  a) const
inline

Definition at line 177 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator% ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 206 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator%= ( const T &  a)
inline

Definition at line 162 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator%= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 195 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator& ( const T &  a) const
inline

Definition at line 178 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator& ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 207 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator&= ( const T &  a)
inline

Definition at line 163 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator&= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 196 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator* ( const T &  a) const
inline

Definition at line 175 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator* ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 204 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator*= ( const T &  a)
inline

Definition at line 160 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator*= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 193 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator+ ( void  ) const
inline

Definition at line 169 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator+ ( const T &  a) const
inline

Definition at line 173 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator+ ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 202 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator+= ( const T &  a)
inline

Definition at line 158 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator+= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 191 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator- ( void  ) const
inline

Definition at line 170 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator- ( const T &  a) const
inline

Definition at line 174 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator- ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 203 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator-= ( const T &  a)
inline

Definition at line 159 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator-= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 192 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator/ ( const T &  a) const
inline

Definition at line 176 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator/ ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 205 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator/= ( const T &  a)
inline

Definition at line 161 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator/= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 194 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator<< ( const T &  a) const
inline

Definition at line 181 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator<< ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 210 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator<<= ( const T &  a)
inline

Definition at line 166 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator<<= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 199 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator= ( const T &  a)
inline

Definition at line 157 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 190 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC bool FW::VectorBase< T, L, S >::operator== ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 213 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator>> ( const T &  a) const
inline

Definition at line 182 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator>> ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 211 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator>>= ( const T &  a)
inline

Definition at line 167 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator>>= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 200 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC const T& FW::VectorBase< T, L, S >::operator[] ( int  idx) const
inline

Definition at line 154 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T& FW::VectorBase< T, L, S >::operator[] ( int  idx)
inline

Definition at line 155 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator^ ( const T &  a) const
inline

Definition at line 180 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator^ ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 209 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator^= ( const T &  a)
inline

Definition at line 165 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator^= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 198 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator| ( const T &  a) const
inline

Definition at line 179 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator| ( const VectorBase< T, L, V > &  v) const
inline

Definition at line 208 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator|= ( const T &  a)
inline

Definition at line 164 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC S& FW::VectorBase< T, L, S >::operator|= ( const VectorBase< T, L, V > &  v)
inline

Definition at line 197 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC S FW::VectorBase< T, L, S >::operator~ ( void  ) const
inline

Definition at line 171 of file Math.hpp.

template<class T, int L, class S>
void FW::VectorBase< T, L, S >::print ( void  ) const
inline

Definition at line 137 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::set ( int  idx,
const T &  a 
)
inline

Definition at line 130 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC void FW::VectorBase< T, L, S >::set ( const T &  a)
inline

Definition at line 132 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC void FW::VectorBase< T, L, S >::set ( const T *  ptr)
inline

Definition at line 133 of file Math.hpp.

template<class T, int L, class S>
template<class V >
FW_CUDA_FUNC void FW::VectorBase< T, L, S >::set ( const VectorBase< T, L, V > &  v)
inline

Definition at line 184 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC void FW::VectorBase< T, L, S >::setZero ( void  )
inline

Definition at line 134 of file Math.hpp.

template<class T, int L, class S>
void FW::VectorBase< T, L, S >::sprint ( char *  vec,
size_t  s 
) const
inline

Definition at line 138 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC T FW::VectorBase< T, L, S >::sum ( void  ) const
inline

Definition at line 148 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC Vector<T, L - 1> FW::VectorBase< T, L, S >::toCartesian ( void  ) const
inline

Definition at line 152 of file Math.hpp.

template<class T, int L, class S>
FW_CUDA_FUNC Vector<T, L + 1> FW::VectorBase< T, L, S >::toHomogeneous ( void  ) const
inline

Definition at line 151 of file Math.hpp.


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