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::vec2< T > Struct Template Reference

#include <alsutils/vec2.hpp>

Public Member Functions

__device__ __host__ vec2 ()
 
__device__ __host__ vec2 (T t)
 
__device__ __host__ vec2 (T x, T y)
 
__device__ __host__ vec2 (const vec2< T &> &other)
 
template<class S >
__device__ __host__ vec2operator= (const vec2< S > &other)
 
__device__ __host__ bool operator== (const vec2 &other) const
 
template<class S >
__device__ __host__ vec2< S > convert () const
 
__device__ __host__ const T & operator[] (size_t i) const
 
__device__ __host__ T & operator[] (size_t i)
 
__device__ __host__dot (const vec2< T > &other) const
 
template<class S >
__device__ __host__ vec2< T > & operator+= (const vec2< S > &b)
 

Static Public Member Functions

__device__ static __host__ constexpr size_t size ()
 

Public Attributes

x
 
y
 

Detailed Description

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

Small vector class to hold 3D data

Constructor & Destructor Documentation

◆ vec2() [1/4]

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

◆ vec2() [2/4]

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

◆ vec2() [3/4]

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

◆ vec2() [4/4]

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

Member Function Documentation

◆ convert()

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

Converts the vector to the other type

◆ dot()

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

Computes the dot (scalar) product

◆ operator+=()

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

◆ operator=()

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

◆ operator==()

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

◆ operator[]() [1/2]

template<class T>
__device__ __host__ const T& alsutils::vec2< 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::vec2< 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::vec2< T >::size ( )
inlinestatic

Returns 3 (number of components)

Member Data Documentation

◆ x

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

◆ y

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

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