Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::MDIndexBase< RankValue, IndexType_ > Class Template Reference

Base class for managing indices of an N-dimensional array. More...

#include <arcane/utils/MDIndex.h>

Public Member Functions

constexpr std::array< Int32, RankValue > operator() () const
 List of indices.
constexpr __host__ __device__ Int32 operator[] (int i) const
 Returns the i-th index.
constexpr __host__ __device__ Int64 asInt64 (int i) const
 Returns the i-th index in the form of an Int64.
constexpr __host__ __device__ void add (const MDIndexBase< RankValue > &rhs)
 Adds rhs to the index values of the instance.
constexpr std::array< Int32, RankValue > operator() () const
 List of indices.
constexpr __host__ __device__ Int32 operator[] (int i) const
 Returns the i-th index.
constexpr __host__ __device__ Int64 asInt64 (int i) const
 Returns the i-th index as an Int64.
constexpr __host__ __device__ void add (const MDIndexBase< RankValue > &rhs)
 Adds rhs to the index values of the instance.

Protected Member Functions

constexpr MDIndexBase (std::array< Int32, RankValue > _id)
constexpr MDIndexBase (std::array< Int32, RankValue > _id)

Protected Attributes

std::array< Int32, RankValue > m_indexes = {}

Detailed Description

template<int RankValue, typename IndexType_>
class Arcane::MDIndexBase< RankValue, IndexType_ >

Base class for managing indices of an N-dimensional array.

Definition at line 41 of file arcane/src/arcane/utils/MDIndex.h.

Constructor & Destructor Documentation

◆ MDIndexBase() [1/4]

template<int RankValue, typename IndexType_>
Arcane::MDIndexBase< RankValue, IndexType_ >::MDIndexBase ( )
inlineconstexprprotected

Definition at line 47 of file arcane/src/arcane/utils/MDIndex.h.

◆ MDIndexBase() [2/4]

template<int RankValue, typename IndexType_>
Arcane::MDIndexBase< RankValue, IndexType_ >::MDIndexBase ( std::array< Int32, RankValue > _id)
inlineconstexprprotected

Definition at line 48 of file arcane/src/arcane/utils/MDIndex.h.

◆ MDIndexBase() [3/4]

template<int RankValue, typename IndexType_>
Arcane::MDIndexBase< RankValue, IndexType_ >::MDIndexBase ( )
inlineconstexprprotected

Definition at line 40 of file arccore/src/base/arccore/base/MDIndex.h.

◆ MDIndexBase() [4/4]

template<int RankValue, typename IndexType_>
Arcane::MDIndexBase< RankValue, IndexType_ >::MDIndexBase ( std::array< Int32, RankValue > _id)
inlineconstexprprotected

Definition at line 41 of file arccore/src/base/arccore/base/MDIndex.h.

Member Function Documentation

◆ add() [1/2]

template<int RankValue, typename IndexType_>
__host__ __device__ void Arcane::MDIndexBase< RankValue, IndexType_ >::add ( const MDIndexBase< RankValue > & rhs)
inlineconstexpr

Adds rhs to the index values of the instance.

Definition at line 71 of file arcane/src/arcane/utils/MDIndex.h.

◆ add() [2/2]

template<int RankValue, typename IndexType_>
__host__ __device__ void Arcane::MDIndexBase< RankValue, IndexType_ >::add ( const MDIndexBase< RankValue > & rhs)
inlineconstexpr

Adds rhs to the index values of the instance.

Definition at line 64 of file arccore/src/base/arccore/base/MDIndex.h.

◆ asInt64() [1/2]

template<int RankValue, typename IndexType_>
__host__ __device__ Int64 Arcane::MDIndexBase< RankValue, IndexType_ >::asInt64 ( int i) const
inlineconstexpr

Returns the i-th index in the form of an Int64.

Definition at line 64 of file arcane/src/arcane/utils/MDIndex.h.

◆ asInt64() [2/2]

template<int RankValue, typename IndexType_>
__host__ __device__ Int64 Arcane::MDIndexBase< RankValue, IndexType_ >::asInt64 ( int i) const
inlineconstexpr

Returns the i-th index as an Int64.

Definition at line 57 of file arccore/src/base/arccore/base/MDIndex.h.

◆ operator()() [1/2]

template<int RankValue, typename IndexType_>
std::array< Int32, RankValue > Arcane::MDIndexBase< RankValue, IndexType_ >::operator() ( ) const
inlineconstexpr

List of indices.

Definition at line 55 of file arcane/src/arcane/utils/MDIndex.h.

◆ operator()() [2/2]

template<int RankValue, typename IndexType_>
std::array< Int32, RankValue > Arcane::MDIndexBase< RankValue, IndexType_ >::operator() ( ) const
inlineconstexpr

List of indices.

Definition at line 48 of file arccore/src/base/arccore/base/MDIndex.h.

◆ operator[]() [1/2]

template<int RankValue, typename IndexType_>
__host__ __device__ Int32 Arcane::MDIndexBase< RankValue, IndexType_ >::operator[] ( int i) const
inlineconstexpr

Returns the i-th index.

Definition at line 58 of file arcane/src/arcane/utils/MDIndex.h.

◆ operator[]() [2/2]

template<int RankValue, typename IndexType_>
__host__ __device__ Int32 Arcane::MDIndexBase< RankValue, IndexType_ >::operator[] ( int i) const
inlineconstexpr

Returns the i-th index.

Definition at line 51 of file arccore/src/base/arccore/base/MDIndex.h.

Member Data Documentation

◆ m_indexes

template<int RankValue, typename IndexType_>
std::array< Int32, RankValue > Arcane::MDIndexBase< RankValue, IndexType_ >::m_indexes = {}
protected

Definition at line 79 of file arcane/src/arcane/utils/MDIndex.h.


The documentation for this class was generated from the following files: