tfel
Loading...
Searching...
No Matches
tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType > Struct Template Reference

a structure used to represent an array of strided views. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/Array/StridedViewsArray.hxx>

Inheritance diagram for tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >:
tfel::math::internals::StridedViewsArrayBase< is_scalar, MappedType, ViewIndexingPolicyType >

Public Types

using data_pointer_type = ViewsArrayDataPointerType<MappedType>
 type of the pointer to the underlying data
using StridedViewsArrayBase
 a simple alias
Public Types inherited from tfel::math::internals::StridedViewsArrayBase< is_scalar, MappedType, ViewIndexingPolicyType >
using view_type
 type of views
using const_view_type
 type of read-only views

Public Member Functions

TFEL_HOST_DEVICE constexpr StridedViewsArray (const data_pointer_type p) noexcept
 brief default constructor
TFEL_HOST_DEVICE constexpr StridedViewsArray (const data_pointer_type p, const MemoryIndexingPolicyType &mp) noexcept
 constructor from an indexing policy
TFEL_HOST_DEVICE constexpr StridedViewsArray (const data_pointer_type p, const typename MemoryIndexingPolicyType::size_type s) noexcept
 constructor from an indexing policy
TFEL_HOST_DEVICE constexpr StridedViewsArray (const data_pointer_type p, const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &msizes) noexcept
 constructor from an indexing policy
constexpr StridedViewsArray (const StridedViewsArray &) noexcept=default
 copy constructor
constexpr StridedViewsArray (StridedViewsArray &&) noexcept=default
 move constructor
TFEL_HOST_DEVICE constexpr StridedViewsArray::view_type operator[] (const typename MemoryIndexingPolicyType::size_type i) noexcept
 access operator
TFEL_HOST_DEVICE constexpr StridedViewsArray::const_view_type operator[] (const typename MemoryIndexingPolicyType::size_type i) const noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr StridedViewsArray::view_type operator() (const Indices... i) noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr StridedViewsArray::const_view_type operator() (const Indices... i) const noexcept
 access operator
template<typename ValueType2>
requires ( (isScalar<ValueType2>()) && (isAssignableTo<BinaryOperationResult<MappedType, ValueType2, OpMult>, MappedType>()))
TFEL_HOST_DEVICE constexpr StridedViewsArray & operator*= (const ValueType2 &s) noexcept
template<typename ValueType2>
requires ( (isScalar<ValueType2>()) && (isAssignableTo<BinaryOperationResult<MappedType, ValueType2, OpDiv>, MappedType>()))
TFEL_HOST_DEVICE constexpr StridedViewsArray & operator/= (const ValueType2 &s) noexcept
 ~StridedViewsArray () noexcept=default
 destructor

Static Public Attributes

static constexpr bool is_scalar = isScalar<MappedType>()
 boolean stating if views to scalars are considered

Detailed Description

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: StridedViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
struct tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >

a structure used to represent an array of strided views.

Template Parameters
MappedTypemapped type
MemoryIndexingPolicyTypeindexing policy used to access to the underlying memory area.
ViewIndexingPolicyTypeindexing policy used by the views

Member Typedef Documentation

◆ StridedViewsArrayBase

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: StridedViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
using tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::StridedViewsArrayBase
Initial value:
MappedType,
ViewIndexingPolicyType>
an helper structure using to define the type of views generate by StridedViewsArray.
Definition StridedViewsArray.hxx:35

a simple alias

Constructor & Destructor Documentation

◆ StridedViewsArray() [1/3]

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: StridedViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
TFEL_HOST_DEVICE constexpr tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::StridedViewsArray ( const data_pointer_type p,
const MemoryIndexingPolicyType & mp )
inlineexplicitconstexprnoexcept

constructor from an indexing policy

Parameters
[in]pindexing policy

◆ StridedViewsArray() [2/3]

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: StridedViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
TFEL_HOST_DEVICE constexpr tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::StridedViewsArray ( const data_pointer_type p,
const typename MemoryIndexingPolicyType::size_type s )
inlineexplicitconstexprnoexcept

constructor from an indexing policy

Parameters
[in]ssize used to initialize the memory' index policy

◆ StridedViewsArray() [3/3]

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: StridedViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
TFEL_HOST_DEVICE constexpr tfel::math::StridedViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::StridedViewsArray ( const data_pointer_type p,
const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > & msizes )
inlineexplicitconstexprnoexcept

constructor from an indexing policy

Parameters
[in]msizessizes used to initialize the memory' index policy

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