OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
olb::cpu::simd::FieldPtr< T, D > Class Template Reference

SIMD-specific pointer to a pack of rows of a D-dimensional field. More...

#include <operator.h>

+ Inheritance diagram for olb::cpu::simd::FieldPtr< T, D >:
+ Collaboration diagram for olb::cpu::simd::FieldPtr< T, D >:

Public Member Functions

 FieldPtr (ColumnVector< Column< T >, D > &columns, std::size_t index)
 
 FieldPtr (FieldPtr< T, D > &&rhs)
 
template<typename U , typename IMPL >
FieldPtr< T, D > & operator= (const GenericVector< U, D, IMPL > &rhs)
 
- Public Member Functions inherited from olb::ScalarVector< Pack< T >, D, FieldPtr< T, D > >
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 Pack< T > * getComponentPointer (unsigned iDim) const
 
Pack< T > * getComponentPointer (unsigned iDim)
 

Additional Inherited Members

- Public Types inherited from olb::ScalarVector< Pack< T >, D, FieldPtr< T, D > >
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, unsigned D>
class olb::cpu::simd::FieldPtr< T, D >

SIMD-specific pointer to a pack of rows of a D-dimensional field.

Definition at line 57 of file operator.h.

Constructor & Destructor Documentation

◆ FieldPtr() [1/2]

template<typename T , unsigned D>
olb::cpu::simd::FieldPtr< T, D >::FieldPtr ( ColumnVector< Column< T >, D > & columns,
std::size_t index )
inline

Definition at line 77 of file operator.h.

77 :
78 _data(columns),
79 _index(index) {
80 meta::call_n_times<D>([&](unsigned iD) {
81 _packs[iD] = &_data[iD][_index];
82 });
83 }

◆ FieldPtr() [2/2]

template<typename T , unsigned D>
olb::cpu::simd::FieldPtr< T, D >::FieldPtr ( FieldPtr< T, D > && rhs)
inline

Definition at line 85 of file operator.h.

85 :
86 _data(rhs._data),
87 _index(rhs._index),
88 _packs(rhs._packs) { }

Member Function Documentation

◆ getComponentPointer() [1/2]

template<typename T , unsigned D>
Pack< T > * olb::cpu::simd::FieldPtr< T, D >::getComponentPointer ( unsigned iDim)
inlineprotected

Definition at line 71 of file operator.h.

72 {
73 return &_packs[iDim];
74 }

◆ getComponentPointer() [2/2]

template<typename T , unsigned D>
const Pack< T > * olb::cpu::simd::FieldPtr< T, D >::getComponentPointer ( unsigned iDim) const
inlineprotected

Definition at line 67 of file operator.h.

68 {
69 return &_packs[iDim];
70 }

◆ operator=()

template<typename T , unsigned D>
template<typename U , typename IMPL >
FieldPtr< T, D > & olb::cpu::simd::FieldPtr< T, D >::operator= ( const GenericVector< U, D, IMPL > & rhs)
inline

Definition at line 91 of file operator.h.

92 {
93 for (unsigned iDim=0; iDim < D; ++iDim) {
94 this->operator[](iDim) = rhs[iDim];
95 }
96 return *this;
97 }
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: