Titan  v1.0
A high-performance CUDA-based physics simulation sandbox for robotics, physics, and reinforcement learning.
titan::Vec Class Reference

#include <vec.h>

Public Member Functions

CUDA_CALLABLE_MEMBER Vec ()
 
CUDA_CALLABLE_MEMBER Vec (const Vec &v)
 
CUDA_CALLABLE_MEMBER Vec (double x, double y, double z)
 
CUDA_CALLABLE_MEMBER Vec (const std::vector< double > &v)
 
CUDA_CALLABLE_MEMBER Vecoperator= (const Vec &v)
 
CUDA_CALLABLE_MEMBER Vecoperator+= (const Vec &v)
 
CUDA_CALLABLE_MEMBER Vecoperator-= (const Vec &v)
 
CUDA_DEVICE void atomicVecAdd (const Vec &v)
 
CUDA_CALLABLE_MEMBER Vec operator- () const
 
CUDA_CALLABLE_MEMBER double & operator[] (int n)
 
CUDA_CALLABLE_MEMBER const double & operator[] (int n) const
 
CUDA_CALLABLE_MEMBER void print ()
 
CUDA_CALLABLE_MEMBER double norm () const
 
CUDA_CALLABLE_MEMBER double sum () const
 
CUDA_CALLABLE_MEMBER Vec normalize () const
 

Friends

CUDA_CALLABLE_MEMBER friend Vec operator+ (const Vec &v1, const Vec &v2)
 
CUDA_CALLABLE_MEMBER friend Vec operator- (const Vec &v1, const Vec &v2)
 
CUDA_CALLABLE_MEMBER friend Vec operator* (const double x, const Vec &v)
 
CUDA_CALLABLE_MEMBER friend Vec operator* (const Vec &v, const double x)
 
CUDA_CALLABLE_MEMBER friend bool operator== (const Vec &v1, const Vec &v2)
 
CUDA_CALLABLE_MEMBER friend Vec operator* (const Vec &v1, const Vec &v2)
 
CUDA_CALLABLE_MEMBER friend Vec operator/ (const Vec &v, const double x)
 
CUDA_CALLABLE_MEMBER friend Vec operator/ (const Vec &v1, const Vec &v2)
 
std::ostream & operator<< (std::ostream &strm, const Vec &v)
 

Constructor & Destructor Documentation

◆ Vec() [1/4]

CUDA_CALLABLE_MEMBER titan::Vec::Vec ( )
inline

◆ Vec() [2/4]

CUDA_CALLABLE_MEMBER titan::Vec::Vec ( const Vec v)
inline

◆ Vec() [3/4]

CUDA_CALLABLE_MEMBER titan::Vec::Vec ( double  x,
double  y,
double  z 
)
inline

◆ Vec() [4/4]

CUDA_CALLABLE_MEMBER titan::Vec::Vec ( const std::vector< double > &  v)
inline

Member Function Documentation

◆ atomicVecAdd()

CUDA_DEVICE void titan::Vec::atomicVecAdd ( const Vec v)

◆ norm()

CUDA_CALLABLE_MEMBER double titan::Vec::norm ( ) const
inline

◆ normalize()

CUDA_CALLABLE_MEMBER Vec titan::Vec::normalize ( ) const
inline

◆ operator+=()

CUDA_CALLABLE_MEMBER Vec& titan::Vec::operator+= ( const Vec v)
inline

◆ operator-()

CUDA_CALLABLE_MEMBER Vec titan::Vec::operator- ( ) const
inline

◆ operator-=()

CUDA_CALLABLE_MEMBER Vec& titan::Vec::operator-= ( const Vec v)
inline

◆ operator=()

CUDA_CALLABLE_MEMBER Vec& titan::Vec::operator= ( const Vec v)
inline

◆ operator[]() [1/2]

CUDA_CALLABLE_MEMBER double& titan::Vec::operator[] ( int  n)
inline

◆ operator[]() [2/2]

CUDA_CALLABLE_MEMBER const double& titan::Vec::operator[] ( int  n) const
inline

◆ print()

CUDA_CALLABLE_MEMBER void titan::Vec::print ( )
inline

◆ sum()

CUDA_CALLABLE_MEMBER double titan::Vec::sum ( ) const
inline

Friends And Related Function Documentation

◆ operator* [1/3]

CUDA_CALLABLE_MEMBER friend Vec operator* ( const double  x,
const Vec v 
)
friend

◆ operator* [2/3]

CUDA_CALLABLE_MEMBER friend Vec operator* ( const Vec v,
const double  x 
)
friend

◆ operator* [3/3]

CUDA_CALLABLE_MEMBER friend Vec operator* ( const Vec v1,
const Vec v2 
)
friend

◆ operator+

CUDA_CALLABLE_MEMBER friend Vec operator+ ( const Vec v1,
const Vec v2 
)
friend

◆ operator-

CUDA_CALLABLE_MEMBER friend Vec operator- ( const Vec v1,
const Vec v2 
)
friend

◆ operator/ [1/2]

CUDA_CALLABLE_MEMBER friend Vec operator/ ( const Vec v,
const double  x 
)
friend

◆ operator/ [2/2]

CUDA_CALLABLE_MEMBER friend Vec operator/ ( const Vec v1,
const Vec v2 
)
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
const Vec v 
)
friend

◆ operator==

CUDA_CALLABLE_MEMBER friend bool operator== ( const Vec v1,
const Vec v2 
)
friend

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