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

view of an object from a continuous memory area More...

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

Inheritance diagram for tfel::math::View< MappedType, IndexingPolicyType >:

Public Types

using data_pointer_type = ViewDataPointerType<MappedType>
 a simple alias
using const_data_pointer_type = ViewConstDataPointerType<MappedType>
 a simple alias

Public Member Functions

TFEL_HOST_DEVICE constexpr View (const data_pointer_type p) noexcept
 default constructor
TFEL_HOST_DEVICE constexpr View (const data_pointer_type p, const IndexingPolicyType &i) noexcept
 default constructor
constexpr View (const View &) noexcept=default
 copy constructor
constexpr View (View &&) noexcept=default
 move constructor
TFEL_HOST_DEVICE constexpr View & operator= (const View &src) noexcept
 assignement operator
TFEL_HOST_DEVICE constexpr View & operator= (View &&src) noexcept
 move assigment
TFEL_HOST_DEVICE constexpr data_pointer_type data () noexcept
TFEL_HOST_DEVICE constexpr const_data_pointer_type data () const noexcept
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr View & operator= (const OtherArray &src)
 assign values values from an other array
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr View & operator+= (const OtherArray &src)
template<typename OtherArray>
requires ( isAssignableTo<OtherArray, MappedType>())
TFEL_HOST_DEVICE constexpr View & operator-= (const OtherArray &src)
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<ValueType2, numeric_type<MappedType>, OpMult>, numeric_type<MappedType>>())
TFEL_HOST_DEVICE constexpr View & operator*= (const ValueType2 &s) noexcept
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<numeric_type<MappedType>, ValueType2, OpDiv>, numeric_type<MappedType>>())
TFEL_HOST_DEVICE constexpr View & operator/= (const ValueType2 &s) noexcept
 ~View () noexcept=default
 destructor

Static Public Attributes

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

Protected Attributes

const data_pointer_type data_pointer
 pointer to the memory buffer

Detailed Description

template<typename MappedType, typename IndexingPolicyType>
struct tfel::math::View< MappedType, IndexingPolicyType >

view of an object from a continuous memory area

Template Parameters
MappedTypetype of the object mapped to the memory area

Member Function Documentation

◆ data() [1/2]

template<typename MappedType, typename IndexingPolicyType>
TFEL_HOST_DEVICE constexpr const_data_pointer_type tfel::math::View< MappedType, IndexingPolicyType >::data ( ) const
inlinenodiscardconstexprnoexcept
Returns
a pointer to the underlying array serving as element storage.

◆ data() [2/2]

template<typename MappedType, typename IndexingPolicyType>
TFEL_HOST_DEVICE constexpr data_pointer_type tfel::math::View< MappedType, IndexingPolicyType >::data ( )
inlinenodiscardconstexprnoexcept
Returns
a pointer to the underlying array serving as element storage.

◆ operator=()

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

assign values values from an other array

Parameters
[in]srcarray to be assigned

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