tfel
Loading...
Searching...
No Matches
tfel::math::RuntimeVectorIndexingPolicy Struct Reference

an indexing policy suitable for vectors whose size is given at runtime. More...

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

Public Types

using size_type = std::size_t
using RowMajorIndexingPolicy = RuntimeVectorIndexingPolicy

Public Member Functions

TFEL_HOST_DEVICE constexpr RuntimeVectorIndexingPolicy ()
 constructor
TFEL_HOST_DEVICE constexpr RuntimeVectorIndexingPolicy (const size_type s)
 constructor
TFEL_HOST_DEVICE constexpr RuntimeVectorIndexingPolicy (const std::array< size_type, 1u > &s)
 constructor
constexpr RuntimeVectorIndexingPolicy (RuntimeVectorIndexingPolicy &&)=default
 move constructor
constexpr RuntimeVectorIndexingPolicy (const RuntimeVectorIndexingPolicy &)=default
 copy constructor
constexpr RuntimeVectorIndexingPolicy & operator= (RuntimeVectorIndexingPolicy &&)=default
 move constructor
constexpr RuntimeVectorIndexingPolicy & operator= (const RuntimeVectorIndexingPolicy &)=default
 copy constructor
TFEL_HOST_DEVICE constexpr size_type getUnderlyingArrayMinimalSize () const noexcept
TFEL_HOST_DEVICE constexpr size_type getIndex (const size_type i) const noexcept
TFEL_HOST_DEVICE constexpr size_type getIndex (const std::array< size_type, 1u > &i) const noexcept
TFEL_HOST_DEVICE constexpr bool empty () const noexcept
TFEL_HOST_DEVICE constexpr size_type size () const noexcept
TFEL_HOST_DEVICE constexpr size_type size (const size_type i) const noexcept
TFEL_HOST_DEVICE constexpr RuntimeVectorIndexingPolicy getRowMajorIndexingPolicy () const

Static Public Attributes

static constexpr auto hasFixedSizes = false
static constexpr size_type arity = 1
static constexpr auto areDataContiguous = true
static constexpr auto unRollLoop = false

Detailed Description

an indexing policy suitable for vectors whose size is given at runtime.

Template Parameters
Typetype used for indexing

Member Function Documentation

◆ getUnderlyingArrayMinimalSize()

TFEL_HOST_DEVICE constexpr size_type tfel::math::RuntimeVectorIndexingPolicy::getUnderlyingArrayMinimalSize ( ) const
inlinenodiscardconstexprnoexcept
Returns
the minimal data size

◆ size() [1/2]

TFEL_HOST_DEVICE constexpr size_type tfel::math::RuntimeVectorIndexingPolicy::size ( ) const
inlinenodiscardconstexprnoexcept
Returns
the logical size of the array

◆ size() [2/2]

TFEL_HOST_DEVICE constexpr size_type tfel::math::RuntimeVectorIndexingPolicy::size ( const size_type i) const
inlinenodiscardconstexprnoexcept
Returns
the logical size of the array for the given dimension
Parameters
[in]idimension

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