tfel
Loading...
Searching...
No Matches
tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy > Struct Template Reference

view of an object whose components are not stored contiguously More...

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

Inheritance diagram for tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >:

Public Types

using array_policy
 exposing the array policy
using indexing_policy = IndexingPolicyType
 exposing the indexing policy
using size_type = typename IndexingPolicyType::size_type
using data_pointer_type = ViewDataPointerType<MappedType>
 a simple alias
using const_data_pointer_type = ViewConstDataPointerType<MappedType>
 a simple alias

Public Member Functions

constexpr AccessPolicyBasedView (const AccessPolicyBasedView &) noexcept=default
 copy constructor
constexpr AccessPolicyBasedView (AccessPolicyBasedView &&) noexcept=default
 move constructor
constexpr const auto & getIndexingPolicy () const
TFEL_HOST_DEVICE constexpr array_policy::const_reference operator[] (const typename IndexingPolicyType::size_type i) const noexcept
TFEL_HOST_DEVICE constexpr array_policy::reference operator[] (const typename IndexingPolicyType::size_type i) noexcept
template<typename... Indices>
TFEL_HOST_DEVICE constexpr array_policy::const_reference operator() (const Indices... i) const noexcept
TFEL_HOST_DEVICE constexpr array_policy::const_reference operator() (const std::array< typename IndexingPolicyType::size_type, IndexingPolicyType::arity > &i) const noexcept
template<typename... Indices>
requires (!is_const)
TFEL_HOST_DEVICE constexpr array_policy::reference operator() (const Indices... i) noexcept
TFEL_HOST_DEVICE constexpr array_policy::reference operator() (const std::array< typename IndexingPolicyType::size_type, IndexingPolicyType::arity > &i) noexcept
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator= (const AccessPolicyBasedView &src) noexcept
 assignement operator
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator= (const OtherArray &src)
 assign values values from an other array
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator+= (const OtherArray &src)
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator-= (const OtherArray &src)
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<ValueType2, numeric_type<MappedType>, OpMult>, numeric_type<MappedType>>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator*= (const ValueType2 &s) noexcept
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<numeric_type<MappedType>, ValueType2, OpDiv>, numeric_type<MappedType>>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & operator/= (const ValueType2 &s) noexcept
 ~AccessPolicyBasedView () noexcept=default
 destructor

Static Public Attributes

static constexpr auto N
static constexpr bool is_const = std::is_const_v<MappedType>
static constexpr auto hasFixedSizes = IndexingPolicyType::hasFixedSizes

Protected Member Functions

template<typename FunctorType>
TFEL_HOST_DEVICE constexpr void iterate (const FunctorType &f) const
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void assign (const OtherArray &src) noexcept
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void addAndAssign (const OtherArray &src) noexcept
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void substractAndAssign (const OtherArray &src) noexcept

Detailed Description

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType, typename AccessPolicy>
struct tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >

view of an object whose components are not stored contiguously

Template Parameters
MappedTypetype of the object mapped
IndexingPolicyTypeindexing policy used by the view
AccessPolicypolicy giving access to the component associated with an index

Member Typedef Documentation

◆ array_policy

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType, typename AccessPolicy>
using tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >::array_policy
Initial value:

exposing the array policy

Member Function Documentation

◆ getIndexingPolicy()

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType, typename AccessPolicy>
const auto & tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >::getIndexingPolicy ( ) const
inlineconstexpr
Returns
the current indexing policy

◆ operator=()

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType, typename AccessPolicy>
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr AccessPolicyBasedView & tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >::operator= ( const OtherArray & src)
inlineconstexpr

assign values values from an other array

Parameters
[in]srcarray to be assigned

Member Data Documentation

◆ N

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType, typename AccessPolicy>
auto tfel::math::AccessPolicyBasedView< MappedType, IndexingPolicyType, AccessPolicy >::N
inlinestaticconstexpr
Initial value:
= [] {
return p.size();
}()

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