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

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

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

Inheritance diagram for tfel::math::ViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >:
tfel::math::internals::ViewsArrayBase< is_scalar, MappedType, ViewIndexingPolicyType >

Public Types

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

Public Member Functions

TFEL_HOST_DEVICE constexpr ViewsArray (const data_pointer_type p) noexcept
 brief default constructor
TFEL_HOST_DEVICE constexpr ViewsArray (const data_pointer_type p, const MemoryIndexingPolicyType &mp) noexcept
 constructor from an indexing policy
TFEL_HOST_DEVICE constexpr ViewsArray (const data_pointer_type p, const typename MemoryIndexingPolicyType::size_type s) noexcept
 constructor from an indexing policy
TFEL_HOST_DEVICE constexpr ViewsArray (const data_pointer_type p, const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &msizes) noexcept
 constructor from an indexing policy
constexpr ViewsArray (const ViewsArray &) noexcept=default
 copy constructor
constexpr ViewsArray (ViewsArray &&) noexcept=default
 move constructor
TFEL_HOST_DEVICE constexpr ViewsArray::view_type operator[] (const typename MemoryIndexingPolicyType::size_type i) noexcept
 access operator
TFEL_HOST_DEVICE constexpr ViewsArray::const_view_type operator[] (const typename MemoryIndexingPolicyType::size_type i) const noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr ViewsArray::view_type operator() (const Indices... i) noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr ViewsArray::const_view_type operator() (const Indices... i) const noexcept
 access operator
constexpr auto operator() (const typename MemoryIndexingPolicyType::size_type i, const typename ViewIndexingPolicyType::size_type s) noexcept
 access operator
constexpr auto operator() (const typename MemoryIndexingPolicyType::size_type i, const typename ViewIndexingPolicyType::size_type s) const noexcept
 access operator
constexpr auto operator() (const typename MemoryIndexingPolicyType::size_type i, const std::array< typename ViewIndexingPolicyType::size_type, ViewIndexingPolicyType::arity > &vsizes) noexcept
 access operator
constexpr auto operator() (const typename MemoryIndexingPolicyType::size_type i, const std::array< typename ViewIndexingPolicyType::size_type, ViewIndexingPolicyType::arity > &vsizes) const noexcept
 access operator
constexpr auto operator() (const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &indices, const typename ViewIndexingPolicyType::size_type s) noexcept
 access operator
constexpr auto operator() (const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &indices, const typename ViewIndexingPolicyType::size_type s) const noexcept
 access operator
constexpr auto operator() (const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &indices, const std::array< typename ViewIndexingPolicyType::size_type, ViewIndexingPolicyType::arity > &vsizes) noexcept
 access operator
constexpr auto operator() (const std::array< typename MemoryIndexingPolicyType::size_type, MemoryIndexingPolicyType::arity > &indices, const std::array< typename ViewIndexingPolicyType::size_type, ViewIndexingPolicyType::arity > &vsizes) const noexcept
 access operator
template<typename ValueType2>
requires ( (isScalar<ValueType2>()) && (isAssignableTo<BinaryOperationResult<MappedType, ValueType2, OpMult>, MappedType>()))
TFEL_HOST_DEVICE constexpr ViewsArray & operator*= (const ValueType2 &s) noexcept
template<typename ValueType2>
requires ( (isScalar<ValueType2>()) && (isAssignableTo<BinaryOperationResult<MappedType, ValueType2, OpDiv>, MappedType>()))
TFEL_HOST_DEVICE constexpr ViewsArray & operator/= (const ValueType2 &s) noexcept
 ~ViewsArray () 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:: ViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
struct tfel::math::ViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >

a structure used to represent an array of views.

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

Member Typedef Documentation

◆ ViewsArrayBase

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

a simple alias

Constructor & Destructor Documentation

◆ ViewsArray() [1/3]

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

constructor from an indexing policy

Parameters
[in]pindexing policy

◆ ViewsArray() [2/3]

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: ViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
TFEL_HOST_DEVICE constexpr tfel::math::ViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::ViewsArray ( 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

◆ ViewsArray() [3/3]

template<typename MappedType, typename MemoryIndexingPolicyType, typename ViewIndexingPolicyType = typename tfel::math::internals:: ViewsArrayDefaultViewIndexingPolicy<isScalar<MappedType>(), MappedType>::type>
TFEL_HOST_DEVICE constexpr tfel::math::ViewsArray< MappedType, MemoryIndexingPolicyType, ViewIndexingPolicyType >::ViewsArray ( 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: