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

#include <alsutils/vec1.hpp>

Public Member Functions

__device__ __host__ vec1 ()
 
__device__ __host__ vec1 (T x)
 
__device__ __host__ operator T () const
 
__device__ __host__ vec1 (const vec1< T &> &other)
 
template<class S >
__device__ __host__ vec1operator= (const vec1< S > &other)
 
__device__ __host__ bool operator== (const vec1 &other) const
 
template<class S >
__device__ __host__ vec1< S > convert () const
 
__device__ __host__ const T & operator[] (size_t i) const
 
__device__ __host__ T & operator[] (size_t i)
 
__device__ __host__dot (const vec1< T > &other) const
 
__device__ __host__norm () const
 
template<class S >
__device__ __host__ vec1< T > & operator+= (const vec1< S > &b)
 

Static Public Member Functions

__device__ static __host__ constexpr size_t size ()
 

Public Attributes

x
 

Detailed Description

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

Small vector class to hold 3D data

Constructor & Destructor Documentation

◆ vec1() [1/3]

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

◆ vec1() [2/3]

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

◆ vec1() [3/3]

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

Member Function Documentation

◆ convert()

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

Converts the vector to the other type

◆ dot()

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

Computes the dot (scalar) product

◆ norm()

template<class T>
__device__ __host__ T alsutils::vec1< T >::norm ( ) const
inline

◆ operator T()

template<class T>
__device__ __host__ alsutils::vec1< T >::operator T ( ) const
inline

◆ operator+=()

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

◆ operator=()

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

◆ operator==()

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

◆ operator[]() [1/2]

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

Returns 3 (number of components)

Member Data Documentation

◆ x

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

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