Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::NumArray< DataType, Extents, LayoutPolicy > Class Template Reference

Multi-dimensional arrays for numerical types accessible on accelerators. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/NumArray.h>

Inheritance diagram for Arcane::NumArray< DataType, Extents, LayoutPolicy >:
Collaboration diagram for Arcane::NumArray< DataType, Extents, LayoutPolicy >:

Public Types

using ExtentsType = Extents
using ThatClass = NumArray<DataType, Extents, LayoutPolicy>
using DynamicDimsType = typename ExtentsType::DynamicDimsType
using ConstMDSpanType = MDSpan<const DataType, ExtentsType, LayoutPolicy>
using MDSpanType = MDSpan<DataType, ExtentsType, LayoutPolicy>
using ArrayWrapper = Impl::NumArrayContainer<DataType>
using ArrayBoundsIndexType = typename MDSpanType::ArrayBoundsIndexType
using value_type = DataType
using LayoutPolicyType = LayoutPolicy

Public Member Functions

 NumArray ()
 Constructs an empty array.
 NumArray (DynamicDimsType extents)
 Constructs an array by specifying the dimension list directly.
 NumArray (const DynamicDimsType &extents, eMemoryResource r)
 Constructs an array by specifying the dimension list directly.
 NumArray (eMemoryResource r)
 Creates an empty array using the memory resource r.
 NumArray (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size, Int32 dim4_size)
 Constructs an array with 4 dynamic values.
 NumArray (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size, Int32 dim4_size, eMemoryResource r)
 Constructs an array with 4 dynamic values.
 NumArray (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size)
 Constructs an array with 3 dynamic values.
 NumArray (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size, eMemoryResource r)
 Constructs an array with 3 dynamic values.
 NumArray (Int32 dim1_size, Int32 dim2_size)
 Constructs an array with 2 dynamic values.
 NumArray (Int32 dim1_size, Int32 dim2_size, eMemoryResource r)
 Constructs an array with 2 dynamic values.
 NumArray (Int32 dim1_size)
 Constructs an array with 1 dynamic value.
 NumArray (Int32 dim1_size, eMemoryResource r)
 Constructs an array with 1 dynamic value.
 NumArray (Int32 dim1_size, Int32 dim2_size, std::initializer_list< DataType > alist)
 Constructs an array from predefined values (only dynamic 2D arrays).
 NumArray (Int32 dim1_size, std::initializer_list< DataType > alist)
 Constructs an array from predefined values (only dynamic 1D arrays).
 NumArray (SmallSpan< const DataType > v)
 Constructs an instance from a view (only dynamic 1D arrays).
 NumArray (Span< const DataType > v)
 Constructs an instance from a view (only dynamic 1D arrays).
 NumArray (const ThatClass &rhs)
 NumArray (ThatClass &&rhs)
ThatClass & operator= (ThatClass &&)=default
ThatClass & operator= (const ThatClass &rhs)
 Copy assignment operator.
void swap (ThatClass &rhs)
 Swaps the data with rhs.
constexpr Int64 totalNbElement () const
 Total number of elements in the array.
ArrayExtents< Extents > extents () const
 Values of the dimensions.
ArrayExtentsWithOffset< Extents, LayoutPolicy > extentsWithOffset () const
Int64 capacity () const
eMemoryResource memoryRessource () const
eMemoryResource memoryResource () const
Span< std::byte > bytes ()
 View as bytes.
Span< const std::byte > bytes () const
 Constant view as bytes.
IMemoryAllocatormemoryAllocator () const
 Associated memory allocator.
void setDebugName (const String &str)
 Sets the array name for debug information.
String debugName ()
 Debug name (null if no name specified).
constexpr Int32 dim1Size () const
 Value of the first dimension.
constexpr Int32 dim2Size () const
 Value of the second dimension.
constexpr Int32 dim3Size () const
 Value of the third dimension.
constexpr Int32 dim4Size () const
 Value of the fourth dimension.
constexpr Int32 extent0 () const
 Value of the first dimension.
constexpr Int32 extent1 () const
 Value of the second dimension.
constexpr Int32 extent2 () const
 Value of the third dimension.
constexpr Int32 extent3 () const
 Value of the fourth dimension.
void resize (Int32 dim1_size)
 Resizes the array without keeping current values.
void resize (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size, Int32 dim4_size)
 Resizes the array without keeping current values.
void resize (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size)
 Resizes the array without keeping current values.
void resize (Int32 dim1_size, Int32 dim2_size)
 Resizes the array without keeping current values.
void resizeDestructive (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size, Int32 dim4_size)
 Resizes the array.
void resizeDestructive (Int32 dim1_size, Int32 dim2_size, Int32 dim3_size)
 Resizes the array without keeping current values.
void resizeDestructive (Int32 dim1_size, Int32 dim2_size)
 Resizes the array without keeping current values.
void resizeDestructive (Int32 dim1_size)
 Resizes the array without keeping current values.
void resize (const DynamicDimsType &dims)
 Resizes the array without keeping current values.
void resizeDestructive (const DynamicDimsType &dims)
 Resizes the array without keeping current values.
void fill (const DataType &v)
 Fills the array values with v.
void fill (const DataType &v, SmallSpan< const Int32 > indexes, const RunQueue *queue)
 Fills the index array values using the queue queue with the value v.
void fill (const DataType &v, SmallSpan< const Int32 > indexes, const RunQueue &queue)
 Fills the index array values using the queue queue with the value v.
void fill (const DataType &v, const RunQueue *queue)
 Fills the instance elements with the value v using the queue queue.
void fill (const DataType &v, const RunQueue &queue)
 Fills the instance elements with the value v using the queue queue.
void fillHost (const DataType &v)
 Fills the array values with v.
void copy (SmallSpan< const DataType > rhs)
 Copies the values from rhs into the instance.
void copy (ConstMDSpanType rhs)
 Copies the values from rhs into the instance.
void copy (const ThatClass &rhs)
 Copies the values from rhs into the instance.
void copy (SmallSpan< const DataType > rhs, const RunQueue *queue)
 Copies the values from rhs into the instance via the queue queue.
void copy (ConstMDSpanType rhs, const RunQueue *queue)
 Copies the values from rhs into the instance via the queue queue.
void copy (SmallSpan< const DataType > rhs, const RunQueue &queue)
 Copies the values from rhs into the instance via the queue queue.
void copy (ConstMDSpanType rhs, const RunQueue &queue)
 Copies the values from rhs into the instance via the queue queue.
void copy (const ThatClass &rhs, const RunQueue *queue)
 Copies the values from rhs into the instance via the queue queue.
void copy (const ThatClass &rhs, const RunQueue &queue)
 Copies the values from rhs into the instance via the queue queue.
DataType & operator[] (Int32 i)
 Retrieves a reference for element i.
DataType operator[] (Int32 i) const
 Value for element i.
DataType operator() (Int32 i, Int32 j, Int32 k, Int32 l) const
 Value for element i,j,k,l.
DataType & operator() (Int32 i, Int32 j, Int32 k, Int32 l)
 Positions the value for element i,j,k,l.
DataType operator() (Int32 i, Int32 j, Int32 k) const
 Value for element i,j,k.
DataType & operator() (Int32 i, Int32 j, Int32 k)
 Positions the value for element i,j,k.
DataType operator() (Int32 i, Int32 j) const
 Value for element i,j.
DataType & operator() (Int32 i, Int32 j)
 Positions the value for element i,j.
DataType operator() (Int32 i) const
 Value for element i.
DataType & operator() (Int32 i)
 Positions the value for element i.
const DataType & operator() (ArrayBoundsIndexType idx) const
 Constant reference for element idx.
DataType & operator() (ArrayBoundsIndexType idx)
 Modifiable reference for element idx.
DataType & s (Int32 i, Int32 j, Int32 k, Int32 l)
 Positions the value for element i,j,k,l.
DataType & s (Int32 i, Int32 j, Int32 k)
 Positions the value for element i,j,k.
DataType & s (Int32 i, Int32 j)
 Positions the value for element i,j.
DataType & s (Int32 i)
 Positions the value for element i.
DataType & s (ArrayBoundsIndexType idx)
 Positions the value for element idx.
MDSpanType span ()
 Multi-dimensional view on the instance.
ConstMDSpanType span () const
 Constant multi-dimensional view on the instance.
ConstMDSpanType constSpan () const
 Constant multi-dimensional view on the instance.
MDSpanType mdspan ()
 Multi-dimensional view on the instance.
ConstMDSpanType mdspan () const
 Constant multi-dimensional view on the instance.
ConstMDSpanType constMDSpan () const
 Constant multi-dimensional view on the instance.
Span< const DataType > to1DSpan () const
 Constant 1D view on the instance.
Span< DataType > to1DSpan ()
 1D view on the instance
constexpr operator MDSpanType ()
 Conversion to a multi-dimensional view on the instance.
constexpr operator ConstMDSpanType () const
 Conversion to a constant multi-dimensional view on the instance.
constexpr operator SmallSpan< DataType > ()
 Conversion to a 1D view on the instance (only if rank == 1).
constexpr operator SmallSpan< const DataType > () const
 Conversion to a constant 1D view on the instance (only if rank == 1).
constexpr SmallSpan< DataType > to1DSmallSpan ()
 1D view on the instance (only if rank == 1)
constexpr SmallSpan< const DataType > to1DSmallSpan () const
 Constant 1D view on the instance (only if rank == 1).
constexpr SmallSpan< const DataType > to1DConstSmallSpan () const
 Constant 1D view on the instance (only if rank == 1).
DataType * _internalData ()

Static Public Member Functions

static constexpr int rank ()
 Number of dimensions of the array.
static constexpr Int32 nbDimension ()
 Number of dimensions.

Private Member Functions

void _updateSpanPointerFromData ()
void _resizeAndCopy (ConstMDSpanType rhs, eMemoryResource input_ressource, const RunQueue *queue)
void _resize ()
 Resizes the array based on the values of m_span.extents().
void _resizeInit ()
 Possible allocation during initialization.

Private Attributes

MDSpanType m_span
ArrayWrapper m_data
Int64 m_total_nb_element = 0

Additional Inherited Members

Static Private Member Functions inherited from Arcane::Impl::NumArrayBaseCommon
static MemoryAllocationOptions _getDefaultAllocator ()
static MemoryAllocationOptions _getDefaultAllocator (eMemoryResource r)
static void _checkHost (eMemoryResource r)
static void _memoryAwareCopy (Span< const std::byte > from, eMemoryResource from_mem, Span< std::byte > to, eMemoryResource to_mem, const RunQueue *queue)
static void _memoryAwareFill (Span< std::byte > to, Int64 nb_element, const void *fill_address, Int32 datatype_size, SmallSpan< const Int32 > indexes, const RunQueue *queue)
static void _memoryAwareFill (Span< std::byte > to, Int64 nb_element, const void *fill_address, Int32 datatype_size, const RunQueue *queue)

Detailed Description

template<typename DataType, typename Extents, typename LayoutPolicy>
class Arcane::NumArray< DataType, Extents, LayoutPolicy >

Multi-dimensional arrays for numerical types accessible on accelerators.

The current implementation supports arrays up to 4 dimensions. Element access is done via the 'operator()'.

Warning
Resizing via resize() does not preserve existing values except for rank 1 arrays.
This class by default uses a specific allocator that allows these values to be accessible both on the host (CPU) and the accelerator. However, this requires that the accelerator's associated runtime has been initialized (arcanedoc_parallel_accelerator). Therefore, global variables of this class or a derived class must not be used.

For more information, refer to the page arcanedoc_core_types_numarray.

Definition at line 56 of file arccore/src/common/arccore/common/NumArray.h.

Member Typedef Documentation

◆ ArrayBoundsIndexType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::ArrayBoundsIndexType = typename MDSpanType::ArrayBoundsIndexType

Definition at line 73 of file arccore/src/common/arccore/common/NumArray.h.

◆ ArrayWrapper

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::ArrayWrapper = Impl::NumArrayContainer<DataType>

Definition at line 72 of file arccore/src/common/arccore/common/NumArray.h.

◆ ConstMDSpanType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::ConstMDSpanType = MDSpan<const DataType, ExtentsType, LayoutPolicy>

Definition at line 70 of file arccore/src/common/arccore/common/NumArray.h.

◆ DynamicDimsType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::DynamicDimsType = typename ExtentsType::DynamicDimsType

Definition at line 69 of file arccore/src/common/arccore/common/NumArray.h.

◆ ExtentsType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::ExtentsType = Extents

Definition at line 67 of file arccore/src/common/arccore/common/NumArray.h.

◆ LayoutPolicyType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::LayoutPolicyType = LayoutPolicy

Definition at line 75 of file arccore/src/common/arccore/common/NumArray.h.

◆ MDSpanType

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::MDSpanType = MDSpan<DataType, ExtentsType, LayoutPolicy>

Definition at line 71 of file arccore/src/common/arccore/common/NumArray.h.

◆ ThatClass

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::ThatClass = NumArray<DataType, Extents, LayoutPolicy>

Definition at line 68 of file arccore/src/common/arccore/common/NumArray.h.

◆ value_type

template<typename DataType, typename Extents, typename LayoutPolicy>
using Arcane::NumArray< DataType, Extents, LayoutPolicy >::value_type = DataType

Definition at line 74 of file arccore/src/common/arccore/common/NumArray.h.

Constructor & Destructor Documentation

◆ NumArray() [1/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( )
inline

Constructs an empty array.

Definition at line 88 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [2/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( DynamicDimsType extents)
inlineexplicit

Constructs an array by specifying the dimension list directly.

Definition at line 94 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [3/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( const DynamicDimsType & extents,
eMemoryResource r )
inline

Constructs an array by specifying the dimension list directly.

Definition at line 100 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [4/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( eMemoryResource r)
inlineexplicit

Creates an empty array using the memory resource r.

Definition at line 106 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [5/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size,
Int32 dim4_size )
inline

Constructs an array with 4 dynamic values.

Definition at line 113 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [6/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size,
Int32 dim4_size,
eMemoryResource r )
inline

Constructs an array with 4 dynamic values.

Definition at line 120 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [7/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size )
inline

Constructs an array with 3 dynamic values.

Definition at line 127 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [8/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size,
eMemoryResource r )
inline

Constructs an array with 3 dynamic values.

Definition at line 132 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [9/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size )
inline

Constructs an array with 2 dynamic values.

Definition at line 138 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [10/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
eMemoryResource r )
inline

Constructs an array with 2 dynamic values.

Definition at line 143 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [11/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size)
inlineexplicit

Constructs an array with 1 dynamic value.

Definition at line 149 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [12/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
eMemoryResource r )
inline

Constructs an array with 1 dynamic value.

Definition at line 154 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [13/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
Int32 dim2_size,
std::initializer_list< DataType > alist )
inline

Constructs an array from predefined values (only dynamic 2D arrays).

The values are stored contiguously in memory, so the list alist must have a layout corresponding to this class.

Definition at line 165 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [14/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Int32 dim1_size,
std::initializer_list< DataType > alist )
inline

Constructs an array from predefined values (only dynamic 1D arrays).

Definition at line 173 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [15/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( SmallSpan< const DataType > v)
inline

Constructs an instance from a view (only dynamic 1D arrays).

Definition at line 181 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [16/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( Span< const DataType > v)
inline

Constructs an instance from a view (only dynamic 1D arrays).

Definition at line 189 of file arccore/src/common/arccore/common/NumArray.h.

◆ NumArray() [17/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( const ThatClass & rhs)
inline

◆ NumArray() [18/18]

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::NumArray ( ThatClass && rhs)
inline

Member Function Documentation

◆ _internalData()

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType * Arcane::NumArray< DataType, Extents, LayoutPolicy >::_internalData ( )
inline

◆ _resize()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::_resize ( )
inlineprivate

Resizes the array based on the values of m_span.extents().

Definition at line 727 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::resize(), and Arcane::NumArray< DataType, MDDim1 >::resizeDestructive().

Here is the caller graph for this function:

◆ _resizeAndCopy()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::_resizeAndCopy ( ConstMDSpanType rhs,
eMemoryResource input_ressource,
const RunQueue * queue )
inlineprivate

◆ _resizeInit()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::_resizeInit ( )
inlineprivate

Possible allocation during initialization.

An allocation is needed during initialization with the default constructor if all dimensions are static.

Definition at line 740 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::NumArray(), and Arcane::NumArray< DataType, MDDim1 >::NumArray().

Here is the caller graph for this function:

◆ _updateSpanPointerFromData()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::_updateSpanPointerFromData ( )
inlineprivate

◆ bytes() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
Span< std::byte > Arcane::NumArray< DataType, Extents, LayoutPolicy >::bytes ( )
inline

View as bytes.

Definition at line 262 of file arccore/src/common/arccore/common/NumArray.h.

◆ bytes() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
Span< const std::byte > Arcane::NumArray< DataType, Extents, LayoutPolicy >::bytes ( ) const
inline

Constant view as bytes.

Definition at line 264 of file arccore/src/common/arccore/common/NumArray.h.

◆ capacity()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int64 Arcane::NumArray< DataType, Extents, LayoutPolicy >::capacity ( ) const
inline

◆ constMDSpan()

template<typename DataType, typename Extents, typename LayoutPolicy>
ConstMDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::constMDSpan ( ) const
inline

Constant multi-dimensional view on the instance.

Definition at line 676 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::copy(), Arcane::NumArray< DataType, MDDim1 >::copy(), Arcane::NumArray< DataType, MDDim1 >::operator ConstMDSpanType(), and Arcane::Accelerator::viewIn().

Here is the caller graph for this function:

◆ constSpan()

template<typename DataType, typename Extents, typename LayoutPolicy>
ConstMDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::constSpan ( ) const
inline

Constant multi-dimensional view on the instance.

Definition at line 667 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [1/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( const ThatClass & rhs)
inline

Copies the values from rhs into the instance.

This operation is valid regardless of the memory associated with the instance.

Definition at line 475 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::copy().

Here is the caller graph for this function:

◆ copy() [2/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( const ThatClass & rhs,
const RunQueue & queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 559 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [3/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( const ThatClass & rhs,
const RunQueue * queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null, in which case the copy is performed on the host. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 545 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [4/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( ConstMDSpanType rhs)
inline

Copies the values from rhs into the instance.

This operation is valid regardless of the memory associated with the instance.

Definition at line 467 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::copy().

Here is the caller graph for this function:

◆ copy() [5/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( ConstMDSpanType rhs,
const RunQueue & queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null, in which case the copy is performed on the host. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 530 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [6/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( ConstMDSpanType rhs,
const RunQueue * queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 500 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [7/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( SmallSpan< const DataType > rhs)
inline

Copies the values from rhs into the instance.

This operation is valid regardless of the memory associated with the instance.

Definition at line 456 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::copy(), Arcane::NumArray< DataType, MDDim1 >::NumArray(), Arcane::NumArray< DataType, MDDim1 >::NumArray(), and Arcane::NumArray< DataType, MDDim1 >::operator=().

Here is the caller graph for this function:

◆ copy() [8/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( SmallSpan< const DataType > rhs,
const RunQueue & queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null, in which case the copy is performed on the host. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 515 of file arccore/src/common/arccore/common/NumArray.h.

◆ copy() [9/9]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::copy ( SmallSpan< const DataType > rhs,
const RunQueue * queue )
inline

Copies the values from rhs into the instance via the queue queue.

This operation is valid regardless of the memory associated with the instance. queue can be null. If the queue is asynchronous, it must be synchronized before the instance can be used.

Definition at line 486 of file arccore/src/common/arccore/common/NumArray.h.

◆ debugName()

template<typename DataType, typename Extents, typename LayoutPolicy>
String Arcane::NumArray< DataType, Extents, LayoutPolicy >::debugName ( )
inline

Debug name (null if no name specified).

Definition at line 277 of file arccore/src/common/arccore/common/NumArray.h.

◆ dim1Size()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::dim1Size ( ) const
inlineconstexpr

Value of the first dimension.

Definition at line 282 of file arccore/src/common/arccore/common/NumArray.h.

◆ dim2Size()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::dim2Size ( ) const
inlineconstexpr

Value of the second dimension.

Definition at line 284 of file arccore/src/common/arccore/common/NumArray.h.

◆ dim3Size()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::dim3Size ( ) const
inlineconstexpr

Value of the third dimension.

Definition at line 286 of file arccore/src/common/arccore/common/NumArray.h.

◆ dim4Size()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::dim4Size ( ) const
inlineconstexpr

Value of the fourth dimension.

Definition at line 288 of file arccore/src/common/arccore/common/NumArray.h.

◆ extent0()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::extent0 ( ) const
inlineconstexpr

Value of the first dimension.

Definition at line 291 of file arccore/src/common/arccore/common/NumArray.h.

◆ extent1()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::extent1 ( ) const
inlineconstexpr

Value of the second dimension.

Definition at line 293 of file arccore/src/common/arccore/common/NumArray.h.

◆ extent2()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::extent2 ( ) const
inlineconstexpr

Value of the third dimension.

Definition at line 295 of file arccore/src/common/arccore/common/NumArray.h.

◆ extent3()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::extent3 ( ) const
inlineconstexpr

Value of the fourth dimension.

Definition at line 297 of file arccore/src/common/arccore/common/NumArray.h.

◆ extents()

template<typename DataType, typename Extents, typename LayoutPolicy>
ArrayExtents< Extents > Arcane::NumArray< DataType, Extents, LayoutPolicy >::extents ( ) const
inline

Values of the dimensions.

Definition at line 252 of file arccore/src/common/arccore/common/NumArray.h.

◆ extentsWithOffset()

template<typename DataType, typename Extents, typename LayoutPolicy>
ArrayExtentsWithOffset< Extents, LayoutPolicy > Arcane::NumArray< DataType, Extents, LayoutPolicy >::extentsWithOffset ( ) const
inline

◆ fill() [1/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fill ( const DataType & v)
inline

Fills the array values with v.

Warning
The operation is performed on the host, so the memory associated with the instance must be accessible on the host.

Definition at line 382 of file arccore/src/common/arccore/common/NumArray.h.

◆ fill() [2/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fill ( const DataType & v,
const RunQueue & queue )
inline

Fills the instance elements with the value v using the queue queue.

queue can be null, in which case the filling is done on the host.

Definition at line 431 of file arccore/src/common/arccore/common/NumArray.h.

◆ fill() [3/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fill ( const DataType & v,
const RunQueue * queue )
inline

Fills the instance elements with the value v using the queue queue.

queue can be null, in which case the filling is done on the host.

Definition at line 419 of file arccore/src/common/arccore/common/NumArray.h.

◆ fill() [4/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fill ( const DataType & v,
SmallSpan< const Int32 > indexes,
const RunQueue & queue )
inline

Fills the index array values using the queue queue with the value v.

The memory associated with the instance must be accessible from the queue queue.

Definition at line 407 of file arccore/src/common/arccore/common/NumArray.h.

◆ fill() [5/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fill ( const DataType & v,
SmallSpan< const Int32 > indexes,
const RunQueue * queue )
inline

Fills the index array values using the queue queue with the value v.

The memory associated with the instance must be accessible from the queue queue. queue can be null, in which case the filling is done on the host.

Definition at line 395 of file arccore/src/common/arccore/common/NumArray.h.

◆ fillHost()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::fillHost ( const DataType & v)
inline

Fills the array values with v.

The operation is performed on the host, so the memory associated with the instance must be accessible on the host.

Definition at line 442 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::fill().

Here is the caller graph for this function:

◆ mdspan() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
MDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::mdspan ( )
inline

Multi-dimensional view on the instance.

Definition at line 670 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::operator MDSpanType(), Arcane::Accelerator::viewInOut(), and Arcane::Accelerator::viewOut().

Here is the caller graph for this function:

◆ mdspan() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
ConstMDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::mdspan ( ) const
inline

Constant multi-dimensional view on the instance.

Definition at line 673 of file arccore/src/common/arccore/common/NumArray.h.

◆ memoryAllocator()

template<typename DataType, typename Extents, typename LayoutPolicy>
IMemoryAllocator * Arcane::NumArray< DataType, Extents, LayoutPolicy >::memoryAllocator ( ) const
inline

Associated memory allocator.

Definition at line 267 of file arccore/src/common/arccore/common/NumArray.h.

◆ memoryResource()

template<typename DataType, typename Extents, typename LayoutPolicy>
eMemoryResource Arcane::NumArray< DataType, Extents, LayoutPolicy >::memoryResource ( ) const
inline

◆ memoryRessource()

template<typename DataType, typename Extents, typename LayoutPolicy>
eMemoryResource Arcane::NumArray< DataType, Extents, LayoutPolicy >::memoryRessource ( ) const
inline

◆ nbDimension()

template<typename DataType, typename Extents, typename LayoutPolicy>
constexpr Int32 Arcane::NumArray< DataType, Extents, LayoutPolicy >::nbDimension ( )
inlinestaticconstexpr

Number of dimensions.

Definition at line 250 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator ConstMDSpanType()

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator ConstMDSpanType ( ) const
inlineconstexpr

Conversion to a constant multi-dimensional view on the instance.

Definition at line 687 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator MDSpanType()

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator MDSpanType ( )
inlineconstexpr

Conversion to a multi-dimensional view on the instance.

Definition at line 685 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator SmallSpan< const DataType >()

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator SmallSpan< const DataType > ( ) const
inlineconstexpr

Conversion to a constant 1D view on the instance (only if rank == 1).

Definition at line 692 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator SmallSpan< DataType >()

template<typename DataType, typename Extents, typename LayoutPolicy>
Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator SmallSpan< DataType > ( )
inlineconstexpr

Conversion to a 1D view on the instance (only if rank == 1).

Definition at line 690 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [1/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( ArrayBoundsIndexType idx)
inline

Modifiable reference for element idx.

Definition at line 618 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [2/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
const DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( ArrayBoundsIndexType idx) const
inline

Constant reference for element idx.

Definition at line 613 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [3/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i)
inline

Positions the value for element i.

Definition at line 608 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [4/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i) const
inline

Value for element i.

Definition at line 606 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [5/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j )
inline

Positions the value for element i,j.

Definition at line 601 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [6/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j ) const
inline

Value for element i,j.

Definition at line 596 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [7/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j,
Int32 k )
inline

Positions the value for element i,j,k.

Definition at line 590 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [8/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j,
Int32 k ) const
inline

Value for element i,j,k.

Definition at line 585 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [9/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j,
Int32 k,
Int32 l )
inline

Positions the value for element i,j,k,l.

Definition at line 579 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator()() [10/10]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator() ( Int32 i,
Int32 j,
Int32 k,
Int32 l ) const
inline

Value for element i,j,k,l.

Definition at line 574 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator=()

template<typename DataType, typename Extents, typename LayoutPolicy>
ThatClass & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator= ( const ThatClass & rhs)
inline

Copy assignment operator.

Warning
After calling this method, the instance's memory resource will be that of rhs. If you wish to perform a copy while keeping the associated memory resource, you must use copy().

Definition at line 219 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator[]() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator[] ( Int32 i)
inline

Retrieves a reference for element i.

Definition at line 567 of file arccore/src/common/arccore/common/NumArray.h.

◆ operator[]() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType Arcane::NumArray< DataType, Extents, LayoutPolicy >::operator[] ( Int32 i) const
inline

Value for element i.

Definition at line 569 of file arccore/src/common/arccore/common/NumArray.h.

◆ rank()

template<typename DataType, typename Extents, typename LayoutPolicy>
constexpr int Arcane::NumArray< DataType, Extents, LayoutPolicy >::rank ( )
inlinestaticconstexpr

Number of dimensions of the array.

Definition at line 83 of file arccore/src/common/arccore/common/NumArray.h.

◆ resize() [1/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resize ( const DynamicDimsType & dims)
inline

Resizes the array without keeping current values.

Definition at line 361 of file arccore/src/common/arccore/common/NumArray.h.

◆ resize() [2/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resize ( Int32 dim1_size)
inline

Resizes the array without keeping current values.

Definition at line 302 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::_resizeInit(), Arcane::NumArray< DataType, MDDim1 >::NumArray(), and Arcane::NumArray< DataType, MDDim1 >::NumArray().

Here is the caller graph for this function:

◆ resize() [3/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resize ( Int32 dim1_size,
Int32 dim2_size )
inline

Resizes the array without keeping current values.

Definition at line 324 of file arccore/src/common/arccore/common/NumArray.h.

◆ resize() [4/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resize ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size )
inline

Resizes the array without keeping current values.

Definition at line 317 of file arccore/src/common/arccore/common/NumArray.h.

◆ resize() [5/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resize ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size,
Int32 dim4_size )
inline

Resizes the array without keeping current values.

Definition at line 310 of file arccore/src/common/arccore/common/NumArray.h.

◆ resizeDestructive() [1/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resizeDestructive ( const DynamicDimsType & dims)
inline

Resizes the array without keeping current values.

Definition at line 367 of file arccore/src/common/arccore/common/NumArray.h.

◆ resizeDestructive() [2/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resizeDestructive ( Int32 dim1_size)
inline

Resizes the array without keeping current values.

Definition at line 354 of file arccore/src/common/arccore/common/NumArray.h.

◆ resizeDestructive() [3/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resizeDestructive ( Int32 dim1_size,
Int32 dim2_size )
inline

Resizes the array without keeping current values.

Definition at line 348 of file arccore/src/common/arccore/common/NumArray.h.

◆ resizeDestructive() [4/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resizeDestructive ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size )
inline

Resizes the array without keeping current values.

Definition at line 342 of file arccore/src/common/arccore/common/NumArray.h.

◆ resizeDestructive() [5/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::resizeDestructive ( Int32 dim1_size,
Int32 dim2_size,
Int32 dim3_size,
Int32 dim4_size )
inline

Resizes the array.

Warning
Current values are not preserved during this operation and new values are not initialized. Resizes the array without keeping current values

Definition at line 336 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::NumArray< DataType, MDDim1 >::resize(), Arcane::NumArray< DataType, MDDim1 >::resize(), Arcane::NumArray< DataType, MDDim1 >::resize(), Arcane::NumArray< DataType, MDDim1 >::resize(), Arcane::NumArray< DataType, MDDim1 >::resizeDestructive(), Arcane::NumArray< DataType, MDDim1 >::resizeDestructive(), Arcane::NumArray< DataType, MDDim1 >::resizeDestructive(), and Arcane::NumArray< DataType, MDDim1 >::resizeDestructive().

Here is the caller graph for this function:

◆ s() [1/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::s ( ArrayBoundsIndexType idx)
inline

Positions the value for element idx.

Definition at line 650 of file arccore/src/common/arccore/common/NumArray.h.

◆ s() [2/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::s ( Int32 i)
inline

Positions the value for element i.

Definition at line 646 of file arccore/src/common/arccore/common/NumArray.h.

◆ s() [3/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::s ( Int32 i,
Int32 j )
inline

Positions the value for element i,j.

Definition at line 640 of file arccore/src/common/arccore/common/NumArray.h.

◆ s() [4/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::s ( Int32 i,
Int32 j,
Int32 k )
inline

Positions the value for element i,j,k.

Definition at line 634 of file arccore/src/common/arccore/common/NumArray.h.

◆ s() [5/5]

template<typename DataType, typename Extents, typename LayoutPolicy>
DataType & Arcane::NumArray< DataType, Extents, LayoutPolicy >::s ( Int32 i,
Int32 j,
Int32 k,
Int32 l )
inline

Positions the value for element i,j,k,l.

Definition at line 628 of file arccore/src/common/arccore/common/NumArray.h.

◆ setDebugName()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::setDebugName ( const String & str)
inline

Sets the array name for debug information.

This name can be used, for example, in listing displays.

Definition at line 274 of file arccore/src/common/arccore/common/NumArray.h.

◆ span() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
MDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::span ( )
inline

Multi-dimensional view on the instance.

Definition at line 659 of file arccore/src/common/arccore/common/NumArray.h.

◆ span() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
ConstMDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::span ( ) const
inline

Constant multi-dimensional view on the instance.

Definition at line 663 of file arccore/src/common/arccore/common/NumArray.h.

◆ swap()

template<typename DataType, typename Extents, typename LayoutPolicy>
void Arcane::NumArray< DataType, Extents, LayoutPolicy >::swap ( ThatClass & rhs)
inline

Swaps the data with rhs.

Warning
The memory allocator is also swapped. It is therefore preferable that both NumArray instances use the same allocator and the same memoryResource().

Definition at line 238 of file arccore/src/common/arccore/common/NumArray.h.

◆ to1DConstSmallSpan()

template<typename DataType, typename Extents, typename LayoutPolicy>
SmallSpan< const DataType > Arcane::NumArray< DataType, Extents, LayoutPolicy >::to1DConstSmallSpan ( ) const
inlineconstexpr

Constant 1D view on the instance (only if rank == 1).

Definition at line 699 of file arccore/src/common/arccore/common/NumArray.h.

◆ to1DSmallSpan() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
SmallSpan< DataType > Arcane::NumArray< DataType, Extents, LayoutPolicy >::to1DSmallSpan ( )
inlineconstexpr

1D view on the instance (only if rank == 1)

Definition at line 695 of file arccore/src/common/arccore/common/NumArray.h.

Referenced by Arcane::Accelerator::Impl::GenericPartitionerIf::apply().

Here is the caller graph for this function:

◆ to1DSmallSpan() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
SmallSpan< const DataType > Arcane::NumArray< DataType, Extents, LayoutPolicy >::to1DSmallSpan ( ) const
inlineconstexpr

Constant 1D view on the instance (only if rank == 1).

Definition at line 697 of file arccore/src/common/arccore/common/NumArray.h.

◆ to1DSpan() [1/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
Span< DataType > Arcane::NumArray< DataType, Extents, LayoutPolicy >::to1DSpan ( )
inline

1D view on the instance

Definition at line 682 of file arccore/src/common/arccore/common/NumArray.h.

◆ to1DSpan() [2/2]

template<typename DataType, typename Extents, typename LayoutPolicy>
Span< const DataType > Arcane::NumArray< DataType, Extents, LayoutPolicy >::to1DSpan ( ) const
inline

◆ totalNbElement()

template<typename DataType, typename Extents, typename LayoutPolicy>
Int64 Arcane::NumArray< DataType, Extents, LayoutPolicy >::totalNbElement ( ) const
inlineconstexpr

Total number of elements in the array.

Definition at line 248 of file arccore/src/common/arccore/common/NumArray.h.

Member Data Documentation

◆ m_data

template<typename DataType, typename Extents, typename LayoutPolicy>
ArrayWrapper Arcane::NumArray< DataType, Extents, LayoutPolicy >::m_data
private

◆ m_span

template<typename DataType, typename Extents, typename LayoutPolicy>
MDSpanType Arcane::NumArray< DataType, Extents, LayoutPolicy >::m_span
private

◆ m_total_nb_element

template<typename DataType, typename Extents, typename LayoutPolicy>
Int64 Arcane::NumArray< DataType, Extents, LayoutPolicy >::m_total_nb_element = 0
private

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