SOFA plugin: SofaOpenCL  master
Open source framework for multi-physics simuation
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
sofa::gpu::opencl::Vec3r1< Real > Class Template Reference

#include <OpenCLTypes.h>

Inheritance diagram for sofa::gpu::opencl::Vec3r1< Real >:

Protected Attributes

Real dummy
 

Public Member Functions

 Vec3r1 ()
 
template<class real2 >
 Vec3r1 (const Vec< N, real2 > &v)
 
 Vec3r1 (real x, real y, real z)
 
 Vec3r1 (NoInit n)
 Fast constructor: no initialization. More...
 
template<class real2 >
Vec3r1 operator* (real2 f) const
 Multiplication by a scalar f. More...
 
template<class real2 >
void operator*= (real2 f)
 On-place multiplication by a scalar f. More...
 
template<class real2 >
Vec3r1 operator/ (real2 f) const
 
template<class real2 >
void operator/= (real2 f)
 On-place division by a scalar f. More...
 
template<class real2 >
real operator* (const Vec< N, real2 > &v) const
 Dot product. More...
 
real operator* (const Vec3r1 &v) const
 Dot product. More...
 
template<class real2 >
Vec3r1 linearProduct (const Vec< N, real2 > &v) const
 linear product. More...
 
Vec3r1 linearProduct (const Vec3r1 &v) const
 linear product. More...
 
template<class real2 >
Vec3r1 operator+ (const Vec< N, real2 > &v) const
 Vector addition. More...
 
Vec3r1 operator+ (const Vec3r1 &v) const
 Vector addition. More...
 
template<class real2 >
void operator+= (const Vec< N, real2 > &v)
 On-place vector addition. More...
 
void operator+= (const Vec3r1 &v)
 On-place vector addition. More...
 
template<class real2 >
Vec3r1 operator- (const Vec< N, real2 > &v) const
 Vector subtraction. More...
 
Vec3r1 operator- (const Vec3r1 &v) const
 Vector subtraction. More...
 
template<class real2 >
void operator-= (const Vec< N, real2 > &v)
 On-place vector subtraction. More...
 
void operator-= (const Vec3r1 &v)
 On-place vector subtraction. More...
 
Vec3r1 operator- () const
 Vector negation. More...
 
Vec3r1 cross (const Vec3r1 &b) const
 
- Public Member Functions inherited from sofa::type::Vec< N, class >
constexpr Vec ()=default
 
constexpr Vec (NoInit)
 
constexpr Vec (const ValueType r1) noexcept
 
constexpr Vec (ArgsT &&... r) noexcept
 
 Vec (const Vec< 3, R > &a, const Vec< 3, T > &b)
 
constexpr void set (const ValueType r1) noexcept
 
constexpr void set (const ArgsT... r) noexcept
 
constexpr void set (const Vec< N2, real2 > &v, ValueType defaultvalue=0) noexcept
 
constexpr Vec (const Vec< N-1, ValueType > &v, ValueType r1) noexcept
 
constexpr Vec (const sofa::type::fixed_array< ValueType, N > &p) noexcept
 
constexpr Vec (const Vec< N2, real2 > &v) noexcept
 
constexpr Vec (const Vec< N, real2 > &p) noexcept
 
constexpr Vec (const real2 *p) noexcept
 
constexpr ValueType & x () noexcept
 
constexpr ValueType & y () noexcept
 
constexpr ValueType & z () noexcept
 
constexpr ValueType & w () noexcept
 
constexpr const ValueType & x () const noexcept
 
constexpr const ValueType & y () const noexcept
 
constexpr const ValueType & z () const noexcept
 
constexpr const ValueType & w () const noexcept
 
constexpr void operator= (const ValueType r1) noexcept
 
constexpr void operator= (const real2 *p) noexcept
 
constexpr void operator= (const Vec< M, real2 > &v) noexcept
 
constexpr void assign (const ValueType &value) noexcept
 
constexpr void clear () noexcept
 
constexpr void fill (ValueType r) noexcept
 
constexpr ValueType & operator() (Size i) noexcept
 
constexpr const ValueType & operator() (Size i) const noexcept
 
constexpr const ValueType * ptr () const noexcept
 
constexpr ValueType * ptr () noexcept
 
constexpr void getsub (const Size i, Vec< N2, ValueType > &m) const noexcept
 
constexpr void getsub (const Size i, ValueType &m) const noexcept
 
constexpr Vec< N, ValueType > mulscalar (const ValueType f) const noexcept
 
constexpr Vec< N, ValueType > mulscalar (const real2 f) const noexcept
 
constexpr Vec< N, ValueType > operator* (const real2 f) const noexcept
 
constexpr void eqmulscalar (const ValueType f) noexcept
 
constexpr void eqmulscalar (const real2 f) noexcept
 
constexpr void operator*= (const real2 f) noexcept
 
constexpr Vec< N, ValueType > divscalar (const ValueType f) const noexcept
 
constexpr Vec< N, ValueType > divscalar (const real2 f) const noexcept
 
constexpr Vec< N, ValueType > operator/ (const real2 f) const noexcept
 
constexpr void eqdivscalar (const ValueType f) noexcept
 
constexpr void eqdivscalar (const real2 f) noexcept
 
constexpr void operator/= (const real2 f) noexcept
 
constexpr ValueType operator* (const Vec< N, real2 > &v) const noexcept
 
constexpr Vec< N, ValueType > linearProduct (const Vec< N, real2 > &v) const noexcept
 
constexpr Vec< N, ValueType > linearDivision (const Vec< N, real2 > &v) const noexcept
 
constexpr Vec< N, ValueType > operator+ (const Vec< N, real2 > &v) const noexcept
 
constexpr void operator+= (const Vec< N, real2 > &v) noexcept
 
constexpr Vec< N, ValueType > operator- (const Vec< N, real2 > &v) const noexcept
 
constexpr void operator-= (const Vec< N, real2 > &v) noexcept
 
constexpr Vec< N, ValueType > operator- () const noexcept
 
constexpr ValueType norm2 () const noexcept
 
ValueType norm () const noexcept
 
ValueType lNorm (int l) const
 
constexpr bool normalizeWithNorm (ValueType norm, ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept
 
bool normalize (ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept
 
void normalize (Vec< N, ValueType > failsafe, ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept
 
Vec< N, ValueType > normalized () const noexcept
 
bool isNormalized (ValueType threshold=std::numeric_limits< ValueType >::epsilon() *(ValueType) 10) const
 
constexpr Vec cross (const Vec< 3, R > &b) const noexcept
 
constexpr ValueType sum () const noexcept
 
constexpr bool operator== (const Vec &b) const noexcept
 
constexpr bool operator!= (const Vec &b) const noexcept
 
constexpr reference operator[] (size_type i)
 
constexpr const_reference operator[] (size_type i) const
 
constexpr reference get () &noexcept requires(I< N)
 
constexpr const_reference get () const &noexcept requires(I< N)
 
constexpr ValueType && get () &&noexcept requires(I< N)
 
constexpr const ValueType && get () const &&noexcept requires(I< N)
 
constexpr const ValueType * data () const noexcept
 
constexpr iterator begin () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr iterator end () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr reference front ()
 
constexpr const_reference front () const
 
constexpr reference back ()
 
constexpr const_reference back () const
 
constexpr bool operator== (const Vec &b) const noexcept
 
constexpr bool operator!= (const Vec &b) const noexcept
 
constexpr reference operator[] (size_type i)
 
constexpr const_reference operator[] (size_type i) const
 
constexpr reference get () &noexcept requires(I< N)
 
constexpr const_reference get () const &noexcept requires(I< N)
 
constexpr ValueType && get () &&noexcept requires(I< N)
 
constexpr const ValueType && get () const &&noexcept requires(I< N)
 
constexpr const ValueType * data () const noexcept
 
constexpr iterator begin () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr iterator end () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr reference front ()
 
constexpr const_reference front () const
 
constexpr reference back ()
 
constexpr const_reference back () const
 

Friends

template<class real2 >
real operator* (const Vec< N, real2 > &v1, const Vec3r1< real > &v2)
 Dot product. More...
 

Additional Inherited Members

- Public Attributes inherited from sofa::type::Vec< N, class >
ArrayType elems
 
- Static Public Attributes inherited from sofa::type::Vec< N, class >
static constexpr sofa::Size static_size
 
static constexpr Size total_size
 
static constexpr Size spatial_dimensions
 
- Static Public Member Functions inherited from sofa::type::Vec< N, class >
static constexpr sofa::Size size ()
 

Attribute details

◆ dummy

template<class Real >
Real sofa::gpu::opencl::Vec3r1< Real >::dummy
protected

Constructor details

◆ Vec3r1() [1/4]

template<class Real >
sofa::gpu::opencl::Vec3r1< Real >::Vec3r1 ( )
inline

◆ Vec3r1() [2/4]

template<class Real >
template<class real2 >
sofa::gpu::opencl::Vec3r1< Real >::Vec3r1 ( const Vec< N, real2 > &  v)
inline

◆ Vec3r1() [3/4]

template<class Real >
sofa::gpu::opencl::Vec3r1< Real >::Vec3r1 ( real  x,
real  y,
real  z 
)
inline

◆ Vec3r1() [4/4]

template<class Real >
sofa::gpu::opencl::Vec3r1< Real >::Vec3r1 ( NoInit  n)
inlineexplicit

Fast constructor: no initialization.

Function details

◆ cross()

template<class Real >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::cross ( const Vec3r1< Real > &  b) const
inline

◆ linearProduct() [1/2]

template<class Real >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::linearProduct ( const Vec3r1< Real > &  v) const
inline

linear product.

◆ linearProduct() [2/2]

template<class Real >
template<class real2 >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::linearProduct ( const Vec< N, real2 > &  v) const
inline

linear product.

◆ operator*() [1/3]

template<class Real >
real sofa::gpu::opencl::Vec3r1< Real >::operator* ( const Vec3r1< Real > &  v) const
inline

Dot product.

◆ operator*() [2/3]

template<class Real >
template<class real2 >
real sofa::gpu::opencl::Vec3r1< Real >::operator* ( const Vec< N, real2 > &  v) const
inline

Dot product.

◆ operator*() [3/3]

template<class Real >
template<class real2 >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator* ( real2  f) const
inline

Multiplication by a scalar f.

◆ operator*=()

template<class Real >
template<class real2 >
void sofa::gpu::opencl::Vec3r1< Real >::operator*= ( real2  f)
inline

On-place multiplication by a scalar f.

◆ operator+() [1/2]

template<class Real >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator+ ( const Vec3r1< Real > &  v) const
inline

Vector addition.

◆ operator+() [2/2]

template<class Real >
template<class real2 >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator+ ( const Vec< N, real2 > &  v) const
inline

Vector addition.

◆ operator+=() [1/2]

template<class Real >
void sofa::gpu::opencl::Vec3r1< Real >::operator+= ( const Vec3r1< Real > &  v)
inline

On-place vector addition.

◆ operator+=() [2/2]

template<class Real >
template<class real2 >
void sofa::gpu::opencl::Vec3r1< Real >::operator+= ( const Vec< N, real2 > &  v)
inline

On-place vector addition.

◆ operator-() [1/3]

template<class Real >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator- ( ) const
inline

Vector negation.

◆ operator-() [2/3]

template<class Real >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator- ( const Vec3r1< Real > &  v) const
inline

Vector subtraction.

◆ operator-() [3/3]

template<class Real >
template<class real2 >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator- ( const Vec< N, real2 > &  v) const
inline

Vector subtraction.

◆ operator-=() [1/2]

template<class Real >
void sofa::gpu::opencl::Vec3r1< Real >::operator-= ( const Vec3r1< Real > &  v)
inline

On-place vector subtraction.

◆ operator-=() [2/2]

template<class Real >
template<class real2 >
void sofa::gpu::opencl::Vec3r1< Real >::operator-= ( const Vec< N, real2 > &  v)
inline

On-place vector subtraction.

◆ operator/()

template<class Real >
template<class real2 >
Vec3r1 sofa::gpu::opencl::Vec3r1< Real >::operator/ ( real2  f) const
inline

◆ operator/=()

template<class Real >
template<class real2 >
void sofa::gpu::opencl::Vec3r1< Real >::operator/= ( real2  f)
inline

On-place division by a scalar f.

Enum details

◆ anonymous enum

template<class Real >
anonymous enum
Enumerator

Related details

◆ operator*

template<class Real >
template<class real2 >
real operator* ( const Vec< N, real2 > &  v1,
const Vec3r1< real > &  v2 
)
friend

Dot product.