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

access policy storing a pointer to the first component of the mapped object and the stride between two successive components More...

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

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

Public Member Functions

TFEL_HOST_DEVICE constexpr StridedAccessPolicy (const ViewDataPointerType< MappedType > p, std::size_t s) noexcept
 default constructor
constexpr StridedAccessPolicy (const StridedAccessPolicy &) noexcept=default
 copy constructor
constexpr StridedAccessPolicy (StridedAccessPolicy &&) noexcept=default
 move constructor
TFEL_HOST_DEVICE constexpr auto data () const noexcept

Static Public Attributes

static constexpr auto N

Protected Member Functions

TFEL_HOST_DEVICE constexpr auto & getValue (const typename IndexingPolicyType::size_type i) noexcept
TFEL_HOST_DEVICE constexpr const auto & getValue (const typename IndexingPolicyType::size_type i) const noexcept

Protected Attributes

const ViewDataPointerType< MappedType > ptr
 pointer to the memory buffer
std::size_t stride
 data stride

Detailed Description

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

access policy storing a pointer to the first component of the mapped object and the stride between two successive components

Member Function Documentation

◆ data()

template<MappableMathObjectUsingScatteredViewConcept MappedType, typename IndexingPolicyType>
TFEL_HOST_DEVICE constexpr auto tfel::math::StridedAccessPolicy< MappedType, IndexingPolicyType >::data ( ) const
inlinenodiscardconstexprnoexcept
Returns
the pointer to the first component of the mapped object and the stride between successive components

Member Data Documentation

◆ N

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

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