Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Array2< DataType > Class Template Reference

Class representing a classic 2D array. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/collections/arccore/collections/Array2.h>

Inheritance diagram for Arcane::Array2< DataType >:
Collaboration diagram for Arcane::Array2< DataType >:

Public Member Functions

ArrayView< DataType > operator[] (Int64 i)
ConstArrayView< DataType > operator[] (Int64 i) const
ArrayView< DataType > operator() (Int64 i)
ConstArrayView< DataType > operator() (Int64 i) const
DataType & operator() (Int64 i, Int64 j)
ConstReferenceType operator() (Int64 i, Int64 j) const
DataType item (Int64 i, Int64 j)
void setItem (Int64 i, Int64 j, ConstReferenceType v)
ConstArrayView< DataType > at (Int64 i) const
 Element at index i. Always checks for bounds.
ArrayView< DataType > at (Int64 i)
 Element at index i. Always checks for bounds.
DataType at (Int64 i, Int64 j)
void fill (ConstReferenceType v)
void clear ()
Array2< DataType > clone ()
void copy (Span2< const DataType > rhs)
 Resizes the instance based on the dimensions of rhs and copies the values of rhs into it.
Integer capacity () const
 Capacity (number of allocated elements) of the array.
Int64 largeCapacity () const
 Capacity (number of allocated elements) of the array.
void reserve (Int64 new_capacity)
 Reserves memory for new_capacity elements.
void shrink ()
void shrink (Int64 new_capacity)
 Reallocates memory to have a capacity close to new_capacity.
void shrink_to_fit ()
ArrayView< DataType > viewAsArray ()
 View of the array as a 1D array.
ConstArrayView< DataType > viewAsArray () const
 View of the array as a 1D array.
Span< DataType > to1DSpan ()
 View of the array as a 1D array.
Span< const DataType > to1DSpan () const
 View of the array as a 1D array.
 operator Array2View< DataType > ()
 operator ConstArray2View< DataType > () const
 operator Span2< const DataType > () const
 operator Span2< DataType > ()
Array2View< DataType > view ()
ConstArray2View< DataType > constView () const
Span2< DataType > span ()
Span2< const DataType > constSpan () const
Integer dim2Size () const
Integer dim1Size () const
Int64 largeDim2Size () const
Int64 largeDim1Size () const
void add (const DataType &value)
void resize (Int64 new_size)
 Resizes only the first dimension, leaving the second dimension unchanged.
void resizeNoInit (Int64 new_size)
 Resizes only the first dimension, leaving the second dimension unchanged.
void resize (Int64 new_size1, Int64 new_size2)
 Reallocates both dimensions.
void resizeNoInit (Int64 new_size1, Int64 new_size2)
 Reallocates both dimensions.
Integer totalNbElement () const
 Total number of elements (dim1Size()*dim2Size()).
Int64 largeTotalNbElement () const
 Total number of elements (largeDim1Size()*largeDim2Size()).
MemoryAllocationOptions allocationOptions () const
String debugName () const
 Debug name (null if no name specified).
void setDebugName (const String &name)
 Sets the array name for debug information.

Protected Types

enum  CloneBehaviour { CB_Clone , CB_Shared }
enum  InitBehaviour { IB_InitWithDefault , IB_NoInit }

Protected Member Functions

 Array2 (Int64 size1, Int64 size2)
 Creates an array of size1 * size2 elements.
 Array2 (ConstArray2View< DataType > rhs)
 Array2 (const Span2< const DataType > &rhs)
 Array2 (IMemoryAllocator *allocator)
 Creates an empty array with a specific allocator allocator.
 Array2 (IMemoryAllocator *allocator, Int64 size1, Int64 size2)
 Creates an array of size1 * size2 elements with a specific allocator allocator.
 Array2 (Array2< DataType > &&rhs)
 Move constructor. Only valid for UniqueArray2.
void _resize (Int64 new_size, InitBehaviour rb)
 Resizes only the first dimension, leaving the second dimension unchanged.
void _resize (Int64 new_size1, Int64 new_size2, InitBehaviour rb)
 Reallocates both dimensions.
void _resizeFromEmpty (Int64 new_size1, Int64 new_size2, InitBehaviour rb)
void _resizeSameDim1ReduceDim2 (Int64 new_size2, InitBehaviour rb)
void _resizeSameDim1IncreaseDim2 (Int64 new_size2, InitBehaviour rb)
void _resize2 (Int64 d1, Int64 d2, InitBehaviour rb)
void _move (Array2< DataType > &rhs)
void _swap (Array2< DataType > &rhs)
void _assignFromArray2 (const Array2< DataType > &rhs)
void _resizeAndCopyView (Span2< const DataType > rhs)
void _copyMetaData (const Array2< DataType > &rhs)
void _destroy ()
void _initFromAllocator (MemoryAllocationOptions o, Int64 acapacity, void *pre_allocated_buffer=nullptr)
 Constructs an empty vector with a specific allocator a.
void _internalDeallocate (RunQueue *queue=nullptr)
void _setMP (TrueImpl *new_mp)
void _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md)

Protected Attributes

DataType * m_ptr

Private Types

using BaseClass = AbstractArray<DataType>
typedef AbstractArray< DataType > Base
typedef Base::ConstReferenceType ConstReferenceType
Private Types inherited from Arcane::AbstractArray< DataType >
typedef ArrayTraits< DataType >::ConstReferenceType ConstReferenceType
typedef ArrayTraits< DataType >::IsPODType IsPODType
typedef AbstractArray< DataType > ThatClassType
using TrueImpl
typedef DataType value_type
 Type of the array elements.
typedef value_typepointer
 Pointer type of an array element.
typedef const value_typeconst_pointer
 Constant pointer type of an array element.
typedef ArrayIterator< pointeriterator
 Type of the iterator over an array element.
typedef ArrayIterator< const_pointerconst_iterator
 Type of the constant iterator over an array element.
typedef value_typereference
 Type reference of an array element.
typedef ConstReferenceType const_reference
 Type constant reference of an array element.
typedef Int64 size_type
 Type indexing the array.
typedef ptrdiff_t difference_type
 Type of a distance between array element iterators.
typedef std::reverse_iterator< iteratorreverse_iterator
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
typedef ArrayTraits< DataType >::ConstReferenceType ConstReferenceType
typedef ArrayTraits< DataType >::IsPODType IsPODType
typedef AbstractArray< DataType > ThatClassType
using TrueImpl
typedef DataType value_type
 Type of the array elements.
typedef value_typepointer
 Pointer type of an array element.
typedef const value_typeconst_pointer
 Constant pointer type of an array element.
typedef ArrayIterator< pointeriterator
 Type of the iterator over an array element.
typedef ArrayIterator< const_pointerconst_iterator
 Type of the constant iterator over an array element.
typedef value_typereference
 Type reference of an array element.
typedef ConstReferenceType const_reference
 Type constant reference of an array element.
typedef Int64 size_type
 Type indexing the array.
typedef ptrdiff_t difference_type
 Type of a distance between array element iterators.
typedef std::reverse_iterator< iteratorreverse_iterator
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator

Private Member Functions

Array2< DataType > & operator= (const Array2< DataType > &rhs)=delete
 Deleted.
 Array2 (const Array2< DataType > &rhs)=delete
 Deleted.
void _arccoreCheckSharedNull ()
Private Member Functions inherited from Arcane::AbstractArray< DataType >
 AbstractArray (const AbstractArray< DataType > &rhs)=delete
AbstractArray< DataType > & operator= (const AbstractArray< DataType > &rhs)=delete
void dispose ()
 Frees the memory used by the array.
 operator ConstArrayView< DataType > () const
 operator Span< const DataType > () const
 operator SmallSpan< const DataType > () const
Integer size () const
 Number of elements in the vector.
Integer length () const
 Number of elements in the vector.
Integer capacity () const
 Capacity (number of allocated elements) of the vector.
Int64 largeSize () const
 Number of elements in the vector (in 64 bits).
Int64 largeLength () const
 Number of elements in the vector (in 64 bits).
Int64 largeCapacity () const
 Capacity (number of allocated elements) of the vector (in 64 bits).
bool empty () const
 Capacity (number of allocated elements) of the vector.
bool contains (ConstReferenceType v) const
 True if the array contains the value element v.
ConstReferenceType operator[] (Int64 i) const
 Element at index i.
ConstReferenceType operator() (Int64 i) const
 Element at index i.
void setMemoryLocationHint (eMemoryLocationHint new_hint)
 Modifies the memory location information.
void _internalSetHostDeviceMemoryLocation (eHostDeviceMemoryLocation location)
 Sets the physical location of the memory region.
eHostDeviceMemoryLocation hostDeviceMemoryLocation () const
 Sets the physical location of the memory region.
void changeAllocator (const MemoryAllocationOptions &options, RunQueue *queue)
void changeAllocator (const MemoryAllocationOptions &options)
void printInfos (std::ostream &o)
 AbstractArray (const AbstractArray< DataType > &rhs)=delete
AbstractArray< DataType > & operator= (const AbstractArray< DataType > &rhs)=delete
void dispose ()
 Frees the memory used by the array.
 operator ConstArrayView< DataType > () const
 operator Span< const DataType > () const
 operator SmallSpan< const DataType > () const
Integer size () const
 Number of elements in the vector.
Integer length () const
 Number of elements in the vector.
Integer capacity () const
 Capacity (number of allocated elements) of the vector.
Int64 largeSize () const
 Number of elements in the vector (in 64 bits).
Int64 largeLength () const
 Number of elements in the vector (in 64 bits).
Int64 largeCapacity () const
 Capacity (number of allocated elements) of the vector (in 64 bits).
bool empty () const
 Capacity (number of allocated elements) of the vector.
bool contains (ConstReferenceType v) const
 True if the array contains the value element v.
ConstReferenceType operator[] (Int64 i) const
 Element at index i.
ConstReferenceType operator() (Int64 i) const
 Element at index i.
void setMemoryLocationHint (eMemoryLocationHint new_hint)
 Modifies the memory location information.
void _internalSetHostDeviceMemoryLocation (eHostDeviceMemoryLocation location)
 Sets the physical location of the memory region.
eHostDeviceMemoryLocation hostDeviceMemoryLocation () const
 Sets the physical location of the memory region.
void changeAllocator (const MemoryAllocationOptions &options, RunQueue *queue)
void changeAllocator (const MemoryAllocationOptions &options)
void printInfos (std::ostream &o)
 operator ConstArrayView< DataType > () const
 operator Span< const DataType > () const
 operator SmallSpan< const DataType > () const
 operator ConstArrayView< DataType > () const
 operator Span< const DataType > () const
 operator SmallSpan< const DataType > () const
 AbstractArray ()
 Constructs an empty vector with the default allocator.
 AbstractArray (ThatClassType &&rhs) ARCCORE_NOEXCEPT
 Move constructor. Should only be used by UniqueArray.
AllocatedMemoryInfo _currentMemoryInfo () const
void _initFromSpan (const Span< const DataType > &view)
 Initializes the array with the view view.
void _initFromAllocator (MemoryAllocationOptions o, Int64 acapacity, void *pre_allocated_buffer=nullptr)
 Constructs an empty vector with a specific allocator a.
void _reserve (Int64 new_capacity)
 Reserves memory for new_capacity elements.
void _internalRealloc (Int64 new_capacity, bool compute_capacity, RunQueue *queue=nullptr)
 Reallocates the array for a new capacity equal to new_capacity.
void _internalReallocate (Int64 new_capacity, RunQueue *queue)
void _internalDeallocate (RunQueue *queue=nullptr)
void _internalAllocate (Int64 new_capacity, RunQueue *queue)
void _copyFromMemory (const DataType *source)
virtual void _updateReferences ()
 Update references.
virtual Integer _getNbRef ()
 Update references.
void _addRange (ConstReferenceType val, Int64 n)
 Adds n elements of value val to the end of the array.
void _addRange (Span< const DataType > val)
 Adds n elements of value val to the end of the array.
void _checkFreeMemory ()
 Destroys the instance if no one references it.
void _destroy ()
void _destroyRange (Int64, Int64, TrueType)
void _destroyRange (Int64 abegin, Int64 aend, FalseType)
void _createRangeDefault (Int64, Int64, TrueType)
void _createRangeDefault (Int64 abegin, Int64 aend, FalseType)
void _createRange (Int64 abegin, Int64 aend, ConstReferenceType value, TrueType)
void _createRange (Int64 abegin, Int64 aend, ConstReferenceType value, FalseType)
void _createRange (Int64 abegin, Int64 aend, const DataType *values)
void _fill (ConstReferenceType value)
void _clone (const ThatClassType &orig_array)
void _resizeHelper (Int64 s, PodType pod_type, RunQueue *queue)
void _resize (Int64 s)
void _resizeNoInit (Int64 s, RunQueue *queue=nullptr)
 Redimensionne sans initialiser les nouvelles valeurs.
void _clear ()
void _resize (Int64 s, ConstReferenceType value)
 Redimensionne et remplit les nouvelles valeurs avec value.
void _copy (const DataType *rhs_begin, TrueType)
void _copy (const DataType *rhs_begin, FalseType)
void _copy (const DataType *rhs_begin)
void _resizeAndCopyView (Span< const DataType > rhs)
 Redimensionne l'instance et recopie les valeurs de rhs.
void _move (ThatClassType &rhs) ARCCORE_NOEXCEPT
 Implements the move assignment operator.
void _swap (ThatClassType &rhs) ARCCORE_NOEXCEPT
 Swaps the values of the instance with those of rhs.
void _shrink ()
void _shrink (Int64 new_capacity)
void _reset ()
 Resets the array to an empty array.
constexpr Integer _clampSizeOffet (Int64 offset, Int32 asize) const
void _assignFromArray (const AbstractArray< DataType > &rhs)
void _setMP (TrueImpl *new_mp)
void _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md)
bool _isSharedNull ()
 AbstractArray ()
 Constructs an empty vector with the default allocator.
 AbstractArray (ThatClassType &&rhs) ARCCORE_NOEXCEPT
 Move constructor. Should only be used by UniqueArray.
AllocatedMemoryInfo _currentMemoryInfo () const
void _initFromSpan (const Span< const DataType > &view)
 Initializes the array with the view view.
void _initFromAllocator (MemoryAllocationOptions o, Int64 acapacity, void *pre_allocated_buffer=nullptr)
 Constructs an empty vector with a specific allocator a.
void _reserve (Int64 new_capacity)
 Reserves memory for new_capacity elements.
void _internalRealloc (Int64 new_capacity, bool compute_capacity, RunQueue *queue=nullptr)
 Reallocates the array for a new capacity equal to new_capacity.
void _internalReallocate (Int64 new_capacity, RunQueue *queue)
void _internalDeallocate (RunQueue *queue=nullptr)
void _internalAllocate (Int64 new_capacity, RunQueue *queue)
void _copyFromMemory (const DataType *source)
virtual void _updateReferences ()
 Update references.
virtual Integer _getNbRef ()
 Update references.
void _addRange (ConstReferenceType val, Int64 n)
 Adds n elements of value val to the end of the array.
void _addRange (Span< const DataType > val)
 Adds n elements of value val to the end of the array.
void _checkFreeMemory ()
 Destroys the instance if no one references it.
void _destroy ()
void _destroyRange (Int64, Int64, TrueType)
void _destroyRange (Int64 abegin, Int64 aend, FalseType)
void _createRangeDefault (Int64, Int64, TrueType)
void _createRangeDefault (Int64 abegin, Int64 aend, FalseType)
void _createRange (Int64 abegin, Int64 aend, ConstReferenceType value, TrueType)
void _createRange (Int64 abegin, Int64 aend, ConstReferenceType value, FalseType)
void _createRange (Int64 abegin, Int64 aend, const DataType *values)
void _fill (ConstReferenceType value)
void _clone (const ThatClassType &orig_array)
void _resizeHelper (Int64 s, PodType pod_type, RunQueue *queue)
void _resize (Int64 s)
void _resize (Int64 s, ConstReferenceType value)
 Redimensionne et remplit les nouvelles valeurs avec value.
void _resizeNoInit (Int64 s, RunQueue *queue=nullptr)
 Redimensionne sans initialiser les nouvelles valeurs.
void _clear ()
void _copy (const DataType *rhs_begin, TrueType)
void _copy (const DataType *rhs_begin, FalseType)
void _copy (const DataType *rhs_begin)
void _resizeAndCopyView (Span< const DataType > rhs)
 Redimensionne l'instance et recopie les valeurs de rhs.
void _move (ThatClassType &rhs) ARCCORE_NOEXCEPT
 Implements the move assignment operator.
void _swap (ThatClassType &rhs) ARCCORE_NOEXCEPT
 Swaps the values of the instance with those of rhs.
void _shrink ()
void _shrink (Int64 new_capacity)
void _reset ()
 Resets the array to an empty array.
constexpr Integer _clampSizeOffet (Int64 offset, Int32 asize) const
void _assignFromArray (const AbstractArray< DataType > &rhs)
void _setMP (TrueImpl *new_mp)
void _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md)
bool _isSharedNull ()
Private Member Functions inherited from Arcane::AbstractArrayBase
IMemoryAllocatorallocator () const
MemoryAllocationOptions allocationOptions () const
void setDebugName (const String &name)
 Sets the array name for debug information.
String debugName () const
 Debug name (null if no name specified).
virtual bool _isUseOwnMetaData () const
 Indicates if m_md refers to m_meta_data.
void _swapMetaData (AbstractArrayBase &rhs)
void _copyMetaData (const AbstractArrayBase &rhs)
void _allocateMetaData ()
void _deallocateMetaData (ArrayMetaData *md)
void _checkValidSharedArray ()

Additional Inherited Members

Static Private Member Functions inherited from Arcane::AbstractArray< DataType >
static constexpr Int64 typeSize ()
static constexpr Int64 typeSize ()
Static Private Member Functions inherited from Arcane::AbstractArrayBase
static constexpr RunQueue_nullRunQueue ()
 Explicit method for a null RunQueue.
Private Attributes inherited from Arcane::AbstractArray< DataType >
DataType * m_ptr
DataType * m_ptr
Private Attributes inherited from Arcane::AbstractArrayBase
ArrayMetaDatam_md = nullptr
ArrayMetaData m_meta_data

Detailed Description

template<typename DataType>
class Arcane::Array2< DataType >

Class representing a classic 2D array.

Instances of this class are neither copyable nor assignable. To create a copyable array, you must use SharedArray2 (for reference semantics) or UniqueArray2 (for value semantics like STL).

Definition at line 42 of file arccore/src/collections/arccore/collections/Array2.h.

Member Typedef Documentation

◆ Base

template<typename DataType>
typedef AbstractArray<DataType> Arcane::Array2< DataType >::Base
private

◆ BaseClass

template<typename DataType>
using Arcane::Array2< DataType >::BaseClass = AbstractArray<DataType>
private

◆ ConstReferenceType

template<typename DataType>
typedef Base::ConstReferenceType Arcane::Array2< DataType >::ConstReferenceType
private

Member Enumeration Documentation

◆ CloneBehaviour

template<typename DataType>
enum Arcane::Array2::CloneBehaviour
protected

◆ InitBehaviour

template<typename DataType>
enum Arcane::Array2::InitBehaviour
protected

Constructor & Destructor Documentation

◆ Array2() [1/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( )
inlineprotected

◆ Array2() [2/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( Int64 size1,
Int64 size2 )
inlineprotected

Creates an array of size1 * size2 elements.

Definition at line 90 of file arccore/src/collections/arccore/collections/Array2.h.

◆ Array2() [3/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( ConstArray2View< DataType > rhs)
inlineprotected

◆ Array2() [4/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( const Span2< const DataType > & rhs)
inlineprotected

◆ Array2() [5/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( IMemoryAllocator * allocator)
inlineexplicitprotected

Creates an empty array with a specific allocator allocator.

Definition at line 109 of file arccore/src/collections/arccore/collections/Array2.h.

◆ Array2() [6/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( IMemoryAllocator * allocator,
Int64 size1,
Int64 size2 )
inlineprotected

Creates an array of size1 * size2 elements with a specific allocator allocator.

Definition at line 118 of file arccore/src/collections/arccore/collections/Array2.h.

◆ Array2() [7/7]

template<typename DataType>
Arcane::Array2< DataType >::Array2 ( Array2< DataType > && rhs)
inlineprotected

Move constructor. Only valid for UniqueArray2.

Definition at line 136 of file arccore/src/collections/arccore/collections/Array2.h.

Member Function Documentation

◆ _arccoreCheckSharedNull()

template<typename DataType>
void Arcane::Array2< DataType >::_arccoreCheckSharedNull ( )
inlineprivate

◆ _assignFromArray2()

template<typename DataType>
void Arcane::Array2< DataType >::_assignFromArray2 ( const Array2< DataType > & rhs)
inlineprotected

◆ _copyMetaData()

template<typename DataType>
void Arcane::Array2< DataType >::_copyMetaData ( const Array2< DataType > & rhs)
inlineprotected

◆ _destroy()

template<typename DataType>
void Arcane::AbstractArray< DataType >::_destroy ( )
inlineprotected

Definition at line 626 of file AbstractArray.h.

◆ _initFromAllocator()

template<typename DataType>
void Arcane::AbstractArray< DataType >::_initFromAllocator ( MemoryAllocationOptions o,
Int64 acapacity,
void * pre_allocated_buffer = nullptr )
inlineprotected

Constructs an empty vector with a specific allocator a.

If acapacity is not null, memory is allocated to hold acapacity elements (but the array remains empty).

This method must only be called in a derived class constructor and only by classes using UniqueArray semantics.

Definition at line 262 of file AbstractArray.h.

Referenced by Arcane::Array2< T >::Array2(), and Arcane::Array2< T >::Array2().

Here is the caller graph for this function:

◆ _internalDeallocate()

template<typename DataType>
void Arcane::AbstractArray< DataType >::_internalDeallocate ( RunQueue * queue = nullptr)
inlineprotected

Definition at line 494 of file AbstractArray.h.

◆ _move()

template<typename DataType>
void Arcane::Array2< DataType >::_move ( Array2< DataType > & rhs)
inlineprotected

◆ _resize() [1/2]

template<typename DataType>
void Arcane::Array2< DataType >::_resize ( Int64 new_size,
InitBehaviour rb )
inlineprotected

Resizes only the first dimension, leaving the second dimension unchanged.

Definition at line 375 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::Array2< T >::_resize(), Arcane::Array2< T >::resize(), Arcane::Array2< T >::resize(), Arcane::Array2< T >::resizeNoInit(), and Arcane::Array2< T >::resizeNoInit().

Here is the caller graph for this function:

◆ _resize() [2/2]

template<typename DataType>
void Arcane::Array2< DataType >::_resize ( Int64 new_size1,
Int64 new_size2,
InitBehaviour rb )
inlineprotected

Reallocates both dimensions.

Definition at line 386 of file arccore/src/collections/arccore/collections/Array2.h.

◆ _resize2()

template<typename DataType>
void Arcane::Array2< DataType >::_resize2 ( Int64 d1,
Int64 d2,
InitBehaviour rb )
inlineprotected

◆ _resizeAndCopyView()

template<typename DataType>
void Arcane::Array2< DataType >::_resizeAndCopyView ( Span2< const DataType > rhs)
inlineprotected

◆ _resizeFromEmpty()

template<typename DataType>
void Arcane::Array2< DataType >::_resizeFromEmpty ( Int64 new_size1,
Int64 new_size2,
InitBehaviour rb )
inlineprotected

◆ _resizeSameDim1IncreaseDim2()

template<typename DataType>
void Arcane::Array2< DataType >::_resizeSameDim1IncreaseDim2 ( Int64 new_size2,
InitBehaviour rb )
inlineprotected

◆ _resizeSameDim1ReduceDim2()

template<typename DataType>
void Arcane::Array2< DataType >::_resizeSameDim1ReduceDim2 ( Int64 new_size2,
InitBehaviour rb )
inlineprotected

◆ _setMP()

template<typename DataType>
void Arcane::AbstractArray< DataType >::_setMP ( TrueImpl * new_mp)
inlineprotected

Definition at line 877 of file AbstractArray.h.

◆ _setMP2()

template<typename DataType>
void Arcane::AbstractArray< DataType >::_setMP2 ( TrueImpl * new_mp,
ArrayMetaData * new_md )
inlineprotected

Definition at line 882 of file AbstractArray.h.

◆ _swap()

template<typename DataType>
void Arcane::Array2< DataType >::_swap ( Array2< DataType > & rhs)
inlineprotected

◆ add()

template<typename DataType>
void Arcane::Array2< DataType >::add ( const DataType & value)
inline

◆ allocationOptions()

template<typename DataType>
MemoryAllocationOptions Arcane::AbstractArrayBase::allocationOptions ( ) const
inline

Definition at line 63 of file AbstractArray.h.

◆ at() [1/3]

template<typename DataType>
ArrayView< DataType > Arcane::Array2< DataType >::at ( Int64 i)
inline

Element at index i. Always checks for bounds.

Definition at line 205 of file arccore/src/collections/arccore/collections/Array2.h.

◆ at() [2/3]

template<typename DataType>
ConstArrayView< DataType > Arcane::Array2< DataType >::at ( Int64 i) const
inline

Element at index i. Always checks for bounds.

Definition at line 199 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::Array2VariableT< T >::compact().

Here is the caller graph for this function:

◆ at() [3/3]

template<typename DataType>
DataType Arcane::Array2< DataType >::at ( Int64 i,
Int64 j )
inline

◆ capacity()

template<typename DataType>
Integer Arcane::Array2< DataType >::capacity ( ) const
inline

Capacity (number of allocated elements) of the array.

Definition at line 238 of file arccore/src/collections/arccore/collections/Array2.h.

◆ clear()

template<typename DataType>
void Arcane::Array2< DataType >::clear ( )
inline

◆ clone()

template<typename DataType>
Array2< DataType > Arcane::Array2< DataType >::clone ( )
inline

◆ constSpan()

template<typename DataType>
Span2< const DataType > Arcane::Array2< DataType >::constSpan ( ) const
inline

◆ constView()

template<typename DataType>
ConstArray2View< DataType > Arcane::Array2< DataType >::constView ( ) const
inline

◆ copy()

template<typename DataType>
void Arcane::Array2< DataType >::copy ( Span2< const DataType > rhs)
inline

Resizes the instance based on the dimensions of rhs and copies the values of rhs into it.

Definition at line 233 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::Array2VariableT< T >::_compareVariable().

Here is the caller graph for this function:

◆ debugName()

template<typename DataType>
String Arcane::AbstractArrayBase::debugName ( ) const

Debug name (null if no name specified).

Definition at line 74 of file arccore/src/common/arccore/common/Array.cc.

◆ dim1Size()

template<typename DataType>
Integer Arcane::Array2< DataType >::dim1Size ( ) const
inline

◆ dim2Size()

template<typename DataType>
Integer Arcane::Array2< DataType >::dim2Size ( ) const
inline

◆ fill()

template<typename DataType>
void Arcane::Array2< DataType >::fill ( ConstReferenceType v)
inline

◆ item()

template<typename DataType>
DataType Arcane::Array2< DataType >::item ( Int64 i,
Int64 j )
inline

◆ largeCapacity()

template<typename DataType>
Int64 Arcane::Array2< DataType >::largeCapacity ( ) const
inline

Capacity (number of allocated elements) of the array.

Definition at line 241 of file arccore/src/collections/arccore/collections/Array2.h.

◆ largeDim1Size()

template<typename DataType>
Int64 Arcane::Array2< DataType >::largeDim1Size ( ) const
inline

◆ largeDim2Size()

template<typename DataType>
Int64 Arcane::Array2< DataType >::largeDim2Size ( ) const
inline

◆ largeTotalNbElement()

template<typename DataType>
Int64 Arcane::Array2< DataType >::largeTotalNbElement ( ) const
inline

Total number of elements (largeDim1Size()*largeDim2Size()).

Definition at line 370 of file arccore/src/collections/arccore/collections/Array2.h.

◆ operator Array2View< DataType >()

template<typename DataType>
Arcane::Array2< DataType >::operator Array2View< DataType > ( )
inline

◆ operator ConstArray2View< DataType >()

template<typename DataType>
Arcane::Array2< DataType >::operator ConstArray2View< DataType > ( ) const
inline

◆ operator Span2< const DataType >()

template<typename DataType>
Arcane::Array2< DataType >::operator Span2< const DataType > ( ) const
inline

◆ operator Span2< DataType >()

template<typename DataType>
Arcane::Array2< DataType >::operator Span2< DataType > ( )
inline

◆ operator()() [1/4]

template<typename DataType>
ArrayView< DataType > Arcane::Array2< DataType >::operator() ( Int64 i)
inline

◆ operator()() [2/4]

template<typename DataType>
ConstArrayView< DataType > Arcane::Array2< DataType >::operator() ( Int64 i) const
inline

◆ operator()() [3/4]

template<typename DataType>
DataType & Arcane::Array2< DataType >::operator() ( Int64 i,
Int64 j )
inline

◆ operator()() [4/4]

template<typename DataType>
ConstReferenceType Arcane::Array2< DataType >::operator() ( Int64 i,
Int64 j ) const
inline

◆ operator[]() [1/2]

template<typename DataType>
ArrayView< DataType > Arcane::Array2< DataType >::operator[] ( Int64 i)
inline

◆ operator[]() [2/2]

template<typename DataType>
ConstArrayView< DataType > Arcane::Array2< DataType >::operator[] ( Int64 i) const
inline

◆ reserve()

template<typename DataType>
void Arcane::Array2< DataType >::reserve ( Int64 new_capacity)
inline

Reserves memory for new_capacity elements.

Definition at line 244 of file arccore/src/collections/arccore/collections/Array2.h.

◆ resize() [1/2]

template<typename DataType>
void Arcane::Array2< DataType >::resize ( Int64 new_size)
inline

Resizes only the first dimension, leaving the second dimension unchanged.

Any new values are initialized with the default constructor.

Definition at line 330 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::SubDomain::_printCPUAffinity(), Arcane::Array2< T >::Array2(), Arcane::Array2< T >::Array2(), and Arcane::Array2VariableT< T >::compact().

Here is the caller graph for this function:

◆ resize() [2/2]

template<typename DataType>
void Arcane::Array2< DataType >::resize ( Int64 new_size1,
Int64 new_size2 )
inline

Reallocates both dimensions.

Any new values are initialized with the default constructor.

Definition at line 351 of file arccore/src/collections/arccore/collections/Array2.h.

◆ resizeNoInit() [1/2]

template<typename DataType>
void Arcane::Array2< DataType >::resizeNoInit ( Int64 new_size)
inline

Resizes only the first dimension, leaving the second dimension unchanged.

Any new values are NOT initialized.

Definition at line 341 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::GatherGroup::gatherToMasterIOT().

Here is the caller graph for this function:

◆ resizeNoInit() [2/2]

template<typename DataType>
void Arcane::Array2< DataType >::resizeNoInit ( Int64 new_size1,
Int64 new_size2 )
inline

Reallocates both dimensions.

Any new values are NOT initialized.

Definition at line 361 of file arccore/src/collections/arccore/collections/Array2.h.

◆ setDebugName()

template<typename DataType>
void Arcane::AbstractArrayBase::setDebugName ( const String & name)

Sets the array name for debug information.

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

Definition at line 72 of file arccore/src/common/arccore/common/Array.cc.

◆ setItem()

template<typename DataType>
void Arcane::Array2< DataType >::setItem ( Int64 i,
Int64 j,
ConstReferenceType v )
inline

◆ shrink() [1/2]

template<typename DataType>
void Arcane::Array2< DataType >::shrink ( )
inline

◆ shrink() [2/2]

template<typename DataType>
void Arcane::Array2< DataType >::shrink ( Int64 new_capacity)
inline

Reallocates memory to have a capacity close to new_capacity.

Definition at line 250 of file arccore/src/collections/arccore/collections/Array2.h.

◆ shrink_to_fit()

template<typename DataType>
void Arcane::Array2< DataType >::shrink_to_fit ( )
inline

◆ span()

template<typename DataType>
Span2< DataType > Arcane::Array2< DataType >::span ( )
inline

◆ to1DSpan() [1/2]

template<typename DataType>
Span< DataType > Arcane::Array2< DataType >::to1DSpan ( )
inline

View of the array as a 1D array.

Definition at line 266 of file arccore/src/collections/arccore/collections/Array2.h.

◆ to1DSpan() [2/2]

template<typename DataType>
Span< const DataType > Arcane::Array2< DataType >::to1DSpan ( ) const
inline

View of the array as a 1D array.

Definition at line 271 of file arccore/src/collections/arccore/collections/Array2.h.

◆ totalNbElement()

template<typename DataType>
Integer Arcane::Array2< DataType >::totalNbElement ( ) const
inline

Total number of elements (dim1Size()*dim2Size()).

Definition at line 367 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::Array2< T >::_resize().

Here is the caller graph for this function:

◆ view()

template<typename DataType>
Array2View< DataType > Arcane::Array2< DataType >::view ( )
inline

◆ viewAsArray() [1/2]

template<typename DataType>
ArrayView< DataType > Arcane::Array2< DataType >::viewAsArray ( )
inline

View of the array as a 1D array.

Definition at line 256 of file arccore/src/collections/arccore/collections/Array2.h.

Referenced by Arcane::SubDomain::_printCPUAffinity().

Here is the caller graph for this function:

◆ viewAsArray() [2/2]

template<typename DataType>
ConstArrayView< DataType > Arcane::Array2< DataType >::viewAsArray ( ) const
inline

View of the array as a 1D array.

Definition at line 261 of file arccore/src/collections/arccore/collections/Array2.h.

Member Data Documentation

◆ m_ptr

template<typename DataType>
DataType* Arcane::AbstractArray< DataType >::m_ptr
protected

Definition at line 413 of file AbstractArray.h.


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