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

Container for the NumArray class. More...

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

Inheritance diagram for Arcane::Impl::NumArrayContainer< DataType >:
Collaboration diagram for Arcane::Impl::NumArrayContainer< DataType >:

Public Member Functions

 NumArrayContainer (eMemoryResource r)
 NumArrayContainer (const ThatClass &rhs)
 NumArrayContainer (ThatClass &&rhs)
ThatClass & operator= (const ThatClass &rhs)=delete
ThatClass & operator= (ThatClass &&rhs)
void resize (Int64 new_size)
Span< DataType > to1DSpan ()
Span< const DataType > to1DSpan () const
Span< std::byte > bytes ()
Span< const std::byte > bytes () const
void swap (NumArrayContainer< DataType > &rhs)
void copy (Span< const DataType > rhs)
IMemoryAllocatorallocator () const
eMemoryResource memoryRessource () const
eMemoryResource memoryResource () const
void copyInitializerList (std::initializer_list< DataType > alist)
void copyOnly (const Span< const DataType > &v, eMemoryResource input_ressource, const RunQueue *queue=nullptr)
 Copies the values of v into the instance.
void fill (const DataType &v, SmallSpan< const Int32 > indexes, const RunQueue *queue)
 Fills the indices provided by indexes with the value v.
void fill (const DataType &v, const RunQueue *queue)
 Fills the elements of the instance with the value v.
void fill (ConstReferenceType value)
 Fills the array with the value value.

Private Types

using BaseClass = Array<DataType>
using ThatClass = NumArrayContainer<DataType>
Private Types inherited from Arcane::Array< DataType >
typedef AbstractArray< DataType > BaseClassType
typedef AbstractArray< DataType > BaseClassType
typedef ArrayTraits< DataType >::ConstReferenceType ConstReferenceType
typedef ArrayTraits< DataType >::ConstReferenceType ConstReferenceType
typedef ArrayIterator< const_pointerconst_iterator
 Type of the constant iterator over an array element.
typedef ArrayIterator< const_pointerconst_iterator
 Type of the constant iterator over an array element.
typedef const value_typeconst_pointer
 Constant pointer type of an array element.
typedef const value_typeconst_pointer
 Constant pointer type of an array element.
typedef ConstReferenceType const_reference
 Type constant reference of an array element.
typedef ConstReferenceType const_reference
 Type constant reference of an array element.
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
typedef ptrdiff_t difference_type
 Type of a distance between array element iterators.
typedef ptrdiff_t difference_type
 Type of a distance between array element iterators.
typedef ArrayIterator< pointeriterator
 Type of the iterator over an array element.
typedef ArrayIterator< pointeriterator
 Type of the iterator over an array element.
typedef value_typepointer
 Pointer type of an array element.
typedef value_typepointer
 Pointer type of an array element.
typedef value_typereference
 Type reference of an array element.
typedef value_typereference
 Type reference of an array element.
typedef std::reverse_iterator< iteratorreverse_iterator
typedef std::reverse_iterator< iteratorreverse_iterator
typedef Int64 size_type
 Type indexing the array.
typedef Int64 size_type
 Type indexing the array.
typedef DataType value_type
 Type of the array elements.
typedef DataType value_type
 Type of the array elements.
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

 NumArrayContainer (const MemoryAllocationOptions &a)
void _memoryAwareCopy (const Span< const DataType > &v, eMemoryResource input_ressource, const RunQueue *queue)
void _resizeAndCopy (const ThatClass &v)
Private Member Functions inherited from Arcane::Array< DataType >
 operator ConstArrayView< DataType > () const
 operator ArrayView< DataType > ()
 operator Span< const DataType > () const
 operator Span< DataType > ()
ConstArrayView< DataType > constView () const
 Constant view of this array.
Span< const DataType > constSpan () const
 Constant view of this array.
ConstArrayView< DataType > subConstView (Int64 abegin, Int32 asize) const
 Sub-view starting from element abegin and containing asize elements.
ArrayView< DataType > view () const
 Mutable view of this array.
Span< const DataType > span () const
 Immutable view of this array.
Span< DataType > span ()
 Mutable view of this array.
SmallSpan< const DataType > smallSpan () const
 Immutable view of this array.
SmallSpan< const DataType > constSmallSpan () const
 Immutable view of this array.
SmallSpan< DataType > smallSpan ()
 Mutable view of this array.
ArrayView< DataType > subView (Int64 abegin, Integer asize)
 Sub-view starting from element abegin and containing asize elements.
void sample (ConstArrayView< Integer > indexes, ArrayView< DataType > result) const
 Extracts a sub-array from a list of indices.
void add (ConstReferenceType val)
 Adds element val to the end of the array.
void addRange (ConstReferenceType val, Int64 n)
 Adds n elements of value val to the end of the array.
void addRange (ConstArrayView< DataType > val)
 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 addRange (ArrayView< DataType > val)
 Adds n elements of value val to the end of the array.
void addRange (Span< DataType > val)
 Adds n elements of value val to the end of the array.
void addRange (const Array< DataType > &val)
 Adds n elements of value val to the end of the array.
void resize (Int64 s)
 Changes the number of elements in the array to s.
void resize (Int64 s, ConstReferenceType fill_value)
 Changes the number of elements in the array to s.
void resizeNoInit (Int64 s)
 Resizes without initializing new values.
void reserve (Int64 new_capacity)
 Reserves memory for new_capacity elements.
void shrink ()
 Reallocates to free unused memory.
void shrink (Int64 new_capacity)
 Reallocates memory to have a capacity close to new_capacity.
void shrink_to_fit ()
 Reallocates to free unused memory.
void remove (Int64 index)
 Removes the entity at index index.
void popBack ()
 Removes the last entity from the array.
DataType & at (Int64 i)
 Element at index i. Always checks for overflows.
ConstReferenceType at (Int64 i) const
 Element at index i. Always checks for overflows.
void setAt (Int64 i, ConstReferenceType value)
 Sets the element at index i. Always checks for overflows.
ConstReferenceType item (Int64 i) const
 Element at index i.
void setItem (Int64 i, ConstReferenceType v)
 Element at index i.
ConstReferenceType operator[] (Int64 i) const
 Element at index i.
DataType & operator[] (Int64 i)
 Element at index i.
ConstReferenceType operator() (Int64 i) const
DataType & operator() (Int64 i)
 Element at index i.
DataType & back ()
 Last element of the array.
ConstReferenceType back () const
 Last element of the array (const).
DataType & front ()
 First element of the array.
ConstReferenceType front () const
 First element of the array (const).
void clear ()
 Removes the elements from the array.
void fill (ConstReferenceType value)
 Fills the array with the value value.
void copy (Span< const DataType > rhs)
 Copies the values from rhs into the instance.
Array< DataType > clone () const
 Clones the array.
const DataType * unguardedBasePointer () const
DataType * unguardedBasePointer ()
const DataType * data () const
 Access to the root of the array without any protection.
DataType * data ()
iterator begin ()
 Iterator over the first element of the array.
const_iterator begin () const
 Constant iterator over the first element of the array.
iterator end ()
 Iterator over the first element after the end of the array.
const_iterator end () const
 Constant iterator over the first element after the end of the array.
reverse_iterator rbegin ()
 Reverse iterator over the first element of the array.
const_reverse_iterator rbegin () const
 Reverse iterator over the first element of the array.
reverse_iterator rend ()
 Reverse iterator over the first element after the end of the array.
const_reverse_iterator rend () const
 Reverse iterator over the first element after the end of the array.
ArrayRange< pointerrange ()
 Iteration range from the first to the last element.
ArrayRange< const_pointerrange () const
 Iteration range from the first to the last element.
void push_back (ConstReferenceType val)
 Adds the element val to the end of the array.
 operator ConstArrayView< DataType > () const
 operator ArrayView< DataType > ()
 operator Span< const DataType > () const
 operator Span< DataType > ()
ConstArrayView< DataType > constView () const
 Constant view of this array.
Span< const DataType > constSpan () const
 Constant view of this array.
ConstArrayView< DataType > subConstView (Int64 abegin, Int32 asize) const
 Sub-view starting from element abegin and containing asize elements.
ArrayView< DataType > view () const
 Mutable view of this array.
Span< const DataType > span () const
 Immutable view of this array.
Span< DataType > span ()
 Mutable view of this array.
SmallSpan< const DataType > smallSpan () const
 Immutable view of this array.
SmallSpan< DataType > smallSpan ()
 Mutable view of this array.
SmallSpan< const DataType > constSmallSpan () const
 Immutable view of this array.
ArrayView< DataType > subView (Int64 abegin, Integer asize)
 Sub-view starting from element abegin and containing asize elements.
void sample (ConstArrayView< Integer > indexes, ArrayView< DataType > result) const
 Extracts a sub-array from a list of indices.
void add (ConstReferenceType val)
 Adds element val to the end of the array.
void addRange (ConstReferenceType val, Int64 n)
 Adds n elements of value val to the end of the array.
void addRange (ConstArrayView< DataType > val)
 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 addRange (ArrayView< DataType > val)
 Adds n elements of value val to the end of the array.
void addRange (Span< DataType > val)
 Adds n elements of value val to the end of the array.
void addRange (const Array< DataType > &val)
 Adds n elements of value val to the end of the array.
void resize (Int64 s)
 Changes the number of elements in the array to s.
void resize (Int64 s, ConstReferenceType fill_value)
 Changes the number of elements in the array to s.
void resizeNoInit (Int64 s)
 Resizes without initializing new values.
void reserve (Int64 new_capacity)
 Reserves memory for new_capacity elements.
void shrink ()
 Reallocates to free unused memory.
void shrink (Int64 new_capacity)
 Reallocates memory to have a capacity close to new_capacity.
void shrink_to_fit ()
 Reallocates to free unused memory.
void remove (Int64 index)
 Removes the entity at index index.
void popBack ()
 Removes the last entity from the array.
DataType & at (Int64 i)
 Element at index i. Always checks for overflows.
ConstReferenceType at (Int64 i) const
 Element at index i. Always checks for overflows.
void setAt (Int64 i, ConstReferenceType value)
 Sets the element at index i. Always checks for overflows.
ConstReferenceType item (Int64 i) const
 Element at index i.
void setItem (Int64 i, ConstReferenceType v)
 Element at index i.
ConstReferenceType operator[] (Int64 i) const
 Element at index i.
DataType & operator[] (Int64 i)
 Element at index i.
ConstReferenceType operator() (Int64 i) const
DataType & operator() (Int64 i)
 Element at index i.
DataType & back ()
 Last element of the array.
ConstReferenceType back () const
 Last element of the array (const).
DataType & front ()
 First element of the array.
ConstReferenceType front () const
 First element of the array (const).
void clear ()
 Removes the elements from the array.
void fill (ConstReferenceType value)
 Fills the array with the value value.
void copy (Span< const DataType > rhs)
 Copies the values from rhs into the instance.
Array< DataType > clone () const
 Clones the array.
const DataType * unguardedBasePointer () const
DataType * unguardedBasePointer ()
const DataType * data () const
 Access to the root of the array without any protection.
DataType * data ()
iterator begin ()
 Iterator over the first element of the array.
const_iterator begin () const
 Constant iterator over the first element of the array.
iterator end ()
 Iterator over the first element after the end of the array.
const_iterator end () const
 Constant iterator over the first element after the end of the array.
reverse_iterator rbegin ()
 Reverse iterator over the first element of the array.
const_reverse_iterator rbegin () const
 Reverse iterator over the first element of the array.
reverse_iterator rend ()
 Reverse iterator over the first element after the end of the array.
const_reverse_iterator rend () const
 Reverse iterator over the first element after the end of the array.
ArrayRange< pointerrange ()
 Iteration range from the first to the last element.
ArrayRange< const_pointerrange () const
 Iteration range from the first to the last element.
void push_back (ConstReferenceType val)
 Adds the element val to the end of the array.
 operator ConstArrayView< DataType > () const
 operator ArrayView< DataType > ()
 operator Span< const DataType > () const
 operator Span< DataType > ()
 operator ConstArrayView< DataType > () const
 operator ArrayView< DataType > ()
 operator Span< const DataType > () const
 operator Span< DataType > ()
 Array (Array< DataType > &&rhs) ARCCORE_NOEXCEPT
 Move constructor (only for UniqueArray).
void _initFromInitializerList (std::initializer_list< DataType > alist)
 Array (Array< DataType > &&rhs) ARCCORE_NOEXCEPT
 Move constructor (only for UniqueArray).
void _initFromInitializerList (std::initializer_list< DataType > alist)
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 ()

Static Private Member Functions

static constexpr Int32 _typeSize ()
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.
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)

Private Attributes

eMemoryResource m_memory_ressource = eMemoryResource::UnifiedMemory
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::Impl::NumArrayContainer< DataType >

Container for the NumArray class.

Wrapper of Arccore::Array for the NumArray class.

Definition at line 57 of file arccore/src/common/arccore/common/NumArrayContainer.h.

Member Typedef Documentation

◆ BaseClass

template<typename DataType>
using Arcane::Impl::NumArrayContainer< DataType >::BaseClass = Array<DataType>
private

◆ ThatClass

template<typename DataType>
using Arcane::Impl::NumArrayContainer< DataType >::ThatClass = NumArrayContainer<DataType>
private

Constructor & Destructor Documentation

◆ NumArrayContainer() [1/5]

template<typename DataType>
Arcane::Impl::NumArrayContainer< DataType >::NumArrayContainer ( const MemoryAllocationOptions & a)
inlineexplicitprivate

◆ NumArrayContainer() [2/5]

template<typename DataType>
Arcane::Impl::NumArrayContainer< DataType >::NumArrayContainer ( )
inlineexplicit

◆ NumArrayContainer() [3/5]

template<typename DataType>
Arcane::Impl::NumArrayContainer< DataType >::NumArrayContainer ( eMemoryResource r)
inlineexplicit

◆ NumArrayContainer() [4/5]

template<typename DataType>
Arcane::Impl::NumArrayContainer< DataType >::NumArrayContainer ( const ThatClass & rhs)
inline

◆ NumArrayContainer() [5/5]

template<typename DataType>
Arcane::Impl::NumArrayContainer< DataType >::NumArrayContainer ( ThatClass && rhs)
inline

Member Function Documentation

◆ _memoryAwareCopy()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::_memoryAwareCopy ( const Span< const DataType > & v,
eMemoryResource input_ressource,
const RunQueue * queue )
inlineprivate

◆ _resizeAndCopy()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::_resizeAndCopy ( const ThatClass & v)
inlineprivate

◆ _typeSize()

template<typename DataType>
constexpr Int32 Arcane::Impl::NumArrayContainer< DataType >::_typeSize ( )
inlinestaticconstexprprivate

◆ allocator()

template<typename DataType>
IMemoryAllocator * Arcane::Impl::NumArrayContainer< DataType >::allocator ( ) const
inline

◆ bytes() [1/2]

template<typename DataType>
Span< std::byte > Arcane::Impl::NumArrayContainer< DataType >::bytes ( )
inline

◆ bytes() [2/2]

template<typename DataType>
Span< const std::byte > Arcane::Impl::NumArrayContainer< DataType >::bytes ( ) const
inline

◆ copy()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::copy ( Span< const DataType > rhs)
inline

◆ copyInitializerList()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::copyInitializerList ( std::initializer_list< DataType > alist)
inline

◆ copyOnly()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::copyOnly ( const Span< const DataType > & v,
eMemoryResource input_ressource,
const RunQueue * queue = nullptr )
inline

Copies the values of v into the instance.

input_ressource indicates the origin of the memory area (or eMemoryRessource::Unknown if unknown)

Definition at line 156 of file arccore/src/common/arccore/common/NumArrayContainer.h.

◆ fill() [1/3]

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::fill ( const DataType & v,
const RunQueue * queue )
inline

Fills the elements of the instance with the value v.

Definition at line 171 of file arccore/src/common/arccore/common/NumArrayContainer.h.

References Arcane::asWritableBytes(), and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ fill() [2/3]

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

Fills the indices provided by indexes with the value v.

Definition at line 163 of file arccore/src/common/arccore/common/NumArrayContainer.h.

References Arcane::asWritableBytes(), and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ fill() [3/3]

template<typename DataType>
void Arcane::Array< DataType >::fill ( ConstReferenceType value)
inline

Fills the array with the value value.

Definition at line 417 of file arccore/src/common/arccore/common/Array.h.

◆ memoryResource()

template<typename DataType>
eMemoryResource Arcane::Impl::NumArrayContainer< DataType >::memoryResource ( ) const
inline

◆ memoryRessource()

template<typename DataType>
eMemoryResource Arcane::Impl::NumArrayContainer< DataType >::memoryRessource ( ) const
inline

◆ operator=()

template<typename DataType>
ThatClass & Arcane::Impl::NumArrayContainer< DataType >::operator= ( ThatClass && rhs)
inline

◆ resize()

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

◆ swap()

template<typename DataType>
void Arcane::Impl::NumArrayContainer< DataType >::swap ( NumArrayContainer< DataType > & rhs)
inline

◆ to1DSpan() [1/2]

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

◆ to1DSpan() [2/2]

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

Member Data Documentation

◆ m_memory_ressource

template<typename DataType>
eMemoryResource Arcane::Impl::NumArrayContainer< DataType >::m_memory_ressource = eMemoryResource::UnifiedMemory
private

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