OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD > Class Template Reference

Pointer to row of a D-dimensional field. More...

#include <context.hh>

+ Inheritance diagram for olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >:
+ Collaboration diagram for olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >:

Public Member Functions

 FieldPtr (DeviceContext< T, DESCRIPTOR > &data, std::size_t index) __device__
 
 FieldPtr (FieldPtr< T, DESCRIPTOR, FIELD > &&rhs) __device__
 
template<typename U , typename IMPL >
FieldPtr< T, DESCRIPTOR, FIELD > & operator= (const GenericVector< U, DESCRIPTOR::template size< FIELD >(), IMPL > &rhs) __device__
 
- Public Member Functions inherited from olb::ScalarVector< FIELD::template value_type< T >, DESCRIPTOR::template size< FIELD >(), FieldPtr< T, DESCRIPTOR, FIELD > >
constexpr ScalarVector ()=default
 
 ScalarVector (const ScalarVector &)=delete
 
 ScalarVector (ScalarVector &&)=delete
 
- Public Member Functions inherited from olb::GenericVector< T, D, IMPL >
constexpr GenericVector ()=default
 
 GenericVector (const GenericVector &)=delete
 
 GenericVector (GenericVector &&)=delete
 
GenericVectoroperator= (GenericVector &&rhs)=delete
 
constexpr const T & operator[] (unsigned iDim) const any_platform
 
constexpr T & operator[] (unsigned iDim) any_platform
 
template<typename IMPL_ >
constexpr IMPL & operator= (const GenericVector< T, D, IMPL_ > &rhs) any_platform
 
template<typename U , typename IMPL_ >
constexpr IMPL & operator+= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
template<typename IMPL_ >
constexpr IMPL & operator-= (const GenericVector< T, D, IMPL_ > &rhs) any_platform
 
template<typename U , typename IMPL_ >
constexpr IMPL & operator*= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator+= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator-= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator*= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator/= (const U &rhs) any_platform
 
template<typename IMPL_ >
constexpr bool operator== (const GenericVector< T, D, IMPL_ > &rhs) const any_platform
 
template<typename IMPL_ >
constexpr bool operator!= (const GenericVector< T, D, IMPL_ > &rhs) const any_platform
 

Protected Member Functions

const FIELD::template value_type< T > * getComponentPointer (unsigned iDim) const __device__
 
FIELD::template value_type< T > * getComponentPointer (unsigned iDim) __device__
 

Additional Inherited Members

- Public Types inherited from olb::ScalarVector< FIELD::template value_type< T >, DESCRIPTOR::template size< FIELD >(), FieldPtr< T, DESCRIPTOR, FIELD > >
using type
 
- Public Types inherited from olb::GenericVector< T, D, IMPL >
using value_type = T
 
- Static Public Member Functions inherited from olb::GenericVector< T, D, IMPL >
static constexpr unsigned size ()
 
- Static Public Attributes inherited from olb::GenericVector< T, D, IMPL >
static constexpr unsigned d = D
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename FIELD>
class olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >

Pointer to row of a D-dimensional field.

Definition at line 97 of file context.hh.

Constructor & Destructor Documentation

◆ FieldPtr() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >::FieldPtr ( DeviceContext< T, DESCRIPTOR > & data,
std::size_t index )
inline

Definition at line 119 of file context.hh.

119 :
120 _data(data),
121 _index(index) { }

◆ FieldPtr() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >::FieldPtr ( FieldPtr< T, DESCRIPTOR, FIELD > && rhs)
inline

Definition at line 123 of file context.hh.

123 :
124 _data(rhs._data),
125 _index(rhs._index) { }

Member Function Documentation

◆ getComponentPointer() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
FIELD::template value_type< T > * olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >::getComponentPointer ( unsigned iDim)
inlineprotected

Definition at line 113 of file context.hh.

114 {
115 return _data.template getField<FIELD>()[iDim] + _index;
116 }

◆ getComponentPointer() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
const FIELD::template value_type< T > * olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >::getComponentPointer ( unsigned iDim) const
inlineprotected

Definition at line 109 of file context.hh.

110 {
111 return _data.template getField<FIELD>()[iDim] + _index;
112 }

◆ operator=()

template<typename T , typename DESCRIPTOR , typename FIELD >
template<typename U , typename IMPL >
FieldPtr< T, DESCRIPTOR, FIELD > & olb::gpu::cuda::FieldPtr< T, DESCRIPTOR, FIELD >::operator= ( const GenericVector< U, DESCRIPTOR::template size< FIELD >(), IMPL > & rhs)
inline

Definition at line 128 of file context.hh.

129 {
130 for (unsigned iDim=0; iDim < DESCRIPTOR::template size<FIELD>(); ++iDim) {
131 this->operator[](iDim) = rhs[iDim];
132 }
133 return *this;
134 }
constexpr const T & operator[](unsigned iDim) const any_platform

References olb::GenericVector< T, D, IMPL >::operator[]().

+ Here is the call graph for this function:

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