Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
alsutils::vec4< T > Struct Template Reference

#include <alsutils/vec4.hpp>

Public Member Functions

__device__ __host__ vec4 ()
 
__device__ __host__ vec4 (T x, T y, T z, T v)
 
__device__ __host__ vec4 (T t)
 
__device__ __host__ vec4 (T x, vec2< T > y, T z)
 
__device__ __host__ vec4 (const vec4< T &> &other)
 
template<class S >
__device__ __host__ vec4operator= (const vec4< S > &other)
 
__device__ __host__ bool operator== (const vec4 &other) const
 
template<class S >
__device__ __host__ vec4< S > convert ()
 
__device__ __host__ const T & operator[] (size_t i) const
 
__device__ __host__ T & operator[] (size_t i)
 
__device__ __host__dot (const vec4< T > &other) const
 
template<class S >
__device__ __host__ vec4< T > & operator+= (const vec4< S > &b)
 
__host__ std::string str () const
 

Static Public Member Functions

__device__ static __host__ constexpr size_t size ()
 

Public Attributes

x
 
y
 
z
 
v
 

Detailed Description

template<class T>
struct alsutils::vec4< T >

Small vector class to hold 3D data

Constructor & Destructor Documentation

◆ vec4() [1/5]

template<class T>
__device__ __host__ alsutils::vec4< T >::vec4 ( )
inline

◆ vec4() [2/5]

template<class T>
__device__ __host__ alsutils::vec4< T >::vec4 ( x,
y,
z,
v 
)
inline

◆ vec4() [3/5]

template<class T>
__device__ __host__ alsutils::vec4< T >::vec4 ( t)
inline

◆ vec4() [4/5]

template<class T>
__device__ __host__ alsutils::vec4< T >::vec4 ( x,
vec2< T >  y,
z 
)
inline

◆ vec4() [5/5]

template<class T>
__device__ __host__ alsutils::vec4< T >::vec4 ( const vec4< T &> &  other)
inline

Member Function Documentation

◆ convert()

template<class T>
template<class S >
__device__ __host__ vec4<S> alsutils::vec4< T >::convert ( )
inline

Converts the vector to the other type

◆ dot()

template<class T>
__device__ __host__ T alsutils::vec4< T >::dot ( const vec4< T > &  other) const
inline

Computes the dot (scalar) product

◆ operator+=()

template<class T>
template<class S >
__device__ __host__ vec4<T>& alsutils::vec4< T >::operator+= ( const vec4< S > &  b)
inline

◆ operator=()

template<class T>
template<class S >
__device__ __host__ vec4& alsutils::vec4< T >::operator= ( const vec4< S > &  other)
inline

◆ operator==()

template<class T>
__device__ __host__ bool alsutils::vec4< T >::operator== ( const vec4< T > &  other) const
inline

◆ operator[]() [1/2]

template<class T>
__device__ __host__ const T& alsutils::vec4< T >::operator[] ( size_t  i) const
inline

Returns the i-th component of the vector.

◆ operator[]() [2/2]

template<class T>
__device__ __host__ T& alsutils::vec4< T >::operator[] ( size_t  i)
inline

Returns the i-th component of the vector.

◆ size()

template<class T>
__device__ static __host__ constexpr size_t alsutils::vec4< T >::size ( )
inlinestatic

Returns 5 (number of components)

◆ str()

template<class T >
__host__ std::string alsutils::vec4< T >::str ( ) const
inline

Member Data Documentation

◆ v

template<class T>
T alsutils::vec4< T >::v

◆ x

template<class T>
T alsutils::vec4< T >::x

◆ y

template<class T>
T alsutils::vec4< T >::y

◆ z

template<class T>
T alsutils::vec4< T >::z

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