Arcane  4.2.1.0
User documentation
Loading...
Searching...
No Matches
Arcane::AbstractArray< T > Class Template Reference

Abstract base class for a vector. More...

#include <arccore/common/AbstractArray.h>

Public Types

typedef ArrayTraits< T >::ConstReferenceType ConstReferenceType
typedef ArrayTraits< T >::IsPODType IsPODType
typedef AbstractArray< T > ThatClassType
using TrueImpl = T
typedef T 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

Public Member Functions

 AbstractArray (const AbstractArray< T > &rhs)=delete
AbstractArray< T > & operator= (const AbstractArray< T > &rhs)=delete
void dispose ()
 Frees the memory used by the array.
 operator ConstArrayView< T > () const
 operator Span< const T > () const
 operator SmallSpan< const T > () 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)
Public 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).
void printInfos (std::ostream &o)

Protected Member Functions

 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 T > &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 T *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 T > 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 T *values)
void _fill (ConstReferenceType value)
void _clone (const ThatClassType &orig_array)
template<typename PodType>
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 T *rhs_begin, TrueType)
void _copy (const T *rhs_begin, FalseType)
void _copy (const T *rhs_begin)
void _resizeAndCopyView (Span< const T > 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< T > &rhs)
void _setMP (TrueImpl *new_mp)
void _setMP2 (TrueImpl *new_mp, ArrayMetaData *new_md)
bool _isSharedNull ()
Protected Member Functions inherited from Arcane::AbstractArrayBase
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 Protected Member Functions

static constexpr Int64 typeSize ()
Static Protected Member Functions inherited from Arcane::AbstractArrayBase
static constexpr RunQueue_nullRunQueue ()
 Explicit method for a null RunQueue.

Protected Attributes

T * m_ptr = nullptr
Protected Attributes inherited from Arcane::AbstractArrayBase
ArrayMetaDatam_md = nullptr
ArrayMetaData m_meta_data

Friends

bool operator== (const AbstractArray< T > &rhs, const AbstractArray< T > &lhs)
bool operator!= (const AbstractArray< T > &rhs, const AbstractArray< T > &lhs)
bool operator== (const AbstractArray< T > &rhs, const Span< const T > &lhs)
bool operator!= (const AbstractArray< T > &rhs, const Span< const T > &lhs)
bool operator== (const Span< const T > &rhs, const AbstractArray< T > &lhs)
bool operator!= (const Span< const T > &rhs, const AbstractArray< T > &lhs)
std::ostream & operator<< (std::ostream &o, const AbstractArray< T > &val)

Detailed Description

template<typename T>
class Arcane::AbstractArray< T >

Abstract base class for a vector.

This class cannot be used directly. To use a vector, choose the SharedArray or UniqueArray class.

Definition at line 170 of file AbstractArray.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef ArrayIterator<const_pointer> Arcane::AbstractArray< T >::const_iterator

Type of the constant iterator over an array element.

Definition at line 191 of file AbstractArray.h.

◆ const_pointer

template<typename T>
typedef const value_type* Arcane::AbstractArray< T >::const_pointer

Constant pointer type of an array element.

Definition at line 187 of file AbstractArray.h.

◆ const_reference

template<typename T>
typedef ConstReferenceType Arcane::AbstractArray< T >::const_reference

Type constant reference of an array element.

Definition at line 195 of file AbstractArray.h.

◆ const_reverse_iterator

template<typename T>
typedef std::reverse_iterator<const_iterator> Arcane::AbstractArray< T >::const_reverse_iterator

Definition at line 202 of file AbstractArray.h.

◆ ConstReferenceType

template<typename T>
typedef ArrayTraits<T>::ConstReferenceType Arcane::AbstractArray< T >::ConstReferenceType

Definition at line 175 of file AbstractArray.h.

◆ difference_type

template<typename T>
typedef ptrdiff_t Arcane::AbstractArray< T >::difference_type

Type of a distance between array element iterators.

Definition at line 199 of file AbstractArray.h.

◆ IsPODType

template<typename T>
typedef ArrayTraits<T>::IsPODType Arcane::AbstractArray< T >::IsPODType

Definition at line 176 of file AbstractArray.h.

◆ iterator

template<typename T>
typedef ArrayIterator<pointer> Arcane::AbstractArray< T >::iterator

Type of the iterator over an array element.

Definition at line 189 of file AbstractArray.h.

◆ pointer

template<typename T>
typedef value_type* Arcane::AbstractArray< T >::pointer

Pointer type of an array element.

Definition at line 185 of file AbstractArray.h.

◆ reference

template<typename T>
typedef value_type& Arcane::AbstractArray< T >::reference

Type reference of an array element.

Definition at line 193 of file AbstractArray.h.

◆ reverse_iterator

template<typename T>
typedef std::reverse_iterator<iterator> Arcane::AbstractArray< T >::reverse_iterator

Definition at line 201 of file AbstractArray.h.

◆ size_type

template<typename T>
typedef Int64 Arcane::AbstractArray< T >::size_type

Type indexing the array.

Definition at line 197 of file AbstractArray.h.

◆ ThatClassType

template<typename T>
typedef AbstractArray<T> Arcane::AbstractArray< T >::ThatClassType

Definition at line 177 of file AbstractArray.h.

◆ TrueImpl

template<typename T>
using Arcane::AbstractArray< T >::TrueImpl = T

Definition at line 178 of file AbstractArray.h.

◆ value_type

template<typename T>
typedef T Arcane::AbstractArray< T >::value_type

Type of the array elements.

Definition at line 183 of file AbstractArray.h.

Constructor & Destructor Documentation

◆ AbstractArray() [1/2]

template<typename T>
Arcane::AbstractArray< T >::AbstractArray ( )
inlineprotected

Constructs an empty vector with the default allocator.

Definition at line 207 of file AbstractArray.h.

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

◆ AbstractArray() [2/2]

template<typename T>
Arcane::AbstractArray< T >::AbstractArray ( ThatClassType && rhs)
inlineprotected

Move constructor. Should only be used by UniqueArray.

Definition at line 211 of file AbstractArray.h.

◆ ~AbstractArray()

template<typename T>
Arcane::AbstractArray< T >::~AbstractArray ( )
inlineoverrideprotected

Definition at line 218 of file AbstractArray.h.

Member Function Documentation

◆ _addRange() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::_addRange ( ConstReferenceType val,
Int64 n )
inlineprotected

◆ _addRange() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::_addRange ( Span< const T > val)
inlineprotected

Adds n elements of value val to the end of the array.

Definition at line 601 of file AbstractArray.h.

◆ _assignFromArray()

template<typename T>
void Arcane::AbstractArray< T >::_assignFromArray ( const AbstractArray< T > & rhs)
inlineprotected

Definition at line 852 of file AbstractArray.h.

◆ _checkFreeMemory()

template<typename T>
void Arcane::AbstractArray< T >::_checkFreeMemory ( )
inlineprotected

Destroys the instance if no one references it.

Definition at line 613 of file AbstractArray.h.

◆ _clampSizeOffet()

template<typename T>
Integer Arcane::AbstractArray< T >::_clampSizeOffet ( Int64 offset,
Int32 asize ) const
inlineconstexprprotected

Definition at line 842 of file AbstractArray.h.

◆ _clear()

template<typename T>
void Arcane::AbstractArray< T >::_clear ( )
inlineprotected

Definition at line 708 of file AbstractArray.h.

◆ _clone()

template<typename T>
void Arcane::AbstractArray< T >::_clone ( const ThatClassType & orig_array)
inlineprotected

Definition at line 673 of file AbstractArray.h.

◆ _copy() [1/3]

template<typename T>
void Arcane::AbstractArray< T >::_copy ( const T * rhs_begin)
inlineprotected

Definition at line 739 of file AbstractArray.h.

◆ _copy() [2/3]

template<typename T>
void Arcane::AbstractArray< T >::_copy ( const T * rhs_begin,
FalseType  )
inlineprotected

Definition at line 734 of file AbstractArray.h.

◆ _copy() [3/3]

template<typename T>
void Arcane::AbstractArray< T >::_copy ( const T * rhs_begin,
TrueType  )
inlineprotected

Definition at line 730 of file AbstractArray.h.

◆ _copyFromMemory()

template<typename T>
void Arcane::AbstractArray< T >::_copyFromMemory ( const T * source)
inlineprotected

Definition at line 511 of file AbstractArray.h.

◆ _createRange() [1/3]

template<typename T>
void Arcane::AbstractArray< T >::_createRange ( Int64 abegin,
Int64 aend,
const T * values )
inlineprotected

Definition at line 659 of file AbstractArray.h.

◆ _createRange() [2/3]

template<typename T>
void Arcane::AbstractArray< T >::_createRange ( Int64 abegin,
Int64 aend,
ConstReferenceType value,
FalseType  )
inlineprotected

Definition at line 652 of file AbstractArray.h.

◆ _createRange() [3/3]

template<typename T>
void Arcane::AbstractArray< T >::_createRange ( Int64 abegin,
Int64 aend,
ConstReferenceType value,
TrueType  )
inlineprotected

Definition at line 645 of file AbstractArray.h.

◆ _createRangeDefault() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::_createRangeDefault ( Int64 abegin,
Int64 aend,
FalseType  )
inlineprotected

Definition at line 638 of file AbstractArray.h.

◆ _createRangeDefault() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::_createRangeDefault ( Int64 ,
Int64 ,
TrueType  )
inlineprotected

Definition at line 635 of file AbstractArray.h.

◆ _currentMemoryInfo()

template<typename T>
AllocatedMemoryInfo Arcane::AbstractArray< T >::_currentMemoryInfo ( ) const
inlineprotected

Definition at line 232 of file AbstractArray.h.

◆ _destroy()

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

Definition at line 620 of file AbstractArray.h.

◆ _destroyRange() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::_destroyRange ( Int64 abegin,
Int64 aend,
FalseType  )
inlineprotected

Definition at line 628 of file AbstractArray.h.

◆ _destroyRange() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::_destroyRange ( Int64 ,
Int64 ,
TrueType  )
inlineprotected

Definition at line 624 of file AbstractArray.h.

◆ _fill()

template<typename T>
void Arcane::AbstractArray< T >::_fill ( ConstReferenceType value)
inlineprotected

Definition at line 668 of file AbstractArray.h.

◆ _getNbRef()

template<typename T>
virtual Integer Arcane::AbstractArray< T >::_getNbRef ( )
inlineprotectedvirtual

Update references.

Reimplemented in Arcane::SharedArray2< T >, Arcane::SharedArray2< BFloat16 >, Arcane::SharedArray2< BFloat16 >, Arcane::SharedArray2< bool >, Arcane::SharedArray2< bool >, Arcane::SharedArray2< Byte >, Arcane::SharedArray2< Byte >, Arcane::SharedArray2< Float16 >, Arcane::SharedArray2< Float16 >, Arcane::SharedArray2< Float32 >, Arcane::SharedArray2< Float32 >, Arcane::SharedArray2< Int16 >, Arcane::SharedArray2< Int16 >, Arcane::SharedArray2< Int32 >, Arcane::SharedArray2< Int32 >, Arcane::SharedArray2< Int64 >, Arcane::SharedArray2< Int64 >, Arcane::SharedArray2< Int8 >, Arcane::SharedArray2< Int8 >, Arcane::SharedArray2< Integer >, Arcane::SharedArray2< Integer >, Arcane::SharedArray2< Pointer >, Arcane::SharedArray2< Pointer >, Arcane::SharedArray2< Real >, Arcane::SharedArray2< Real >, Arcane::SharedArray2< Real2 >, Arcane::SharedArray2< Real2 >, Arcane::SharedArray2< Real2x2 >, Arcane::SharedArray2< Real2x2 >, Arcane::SharedArray2< Real3 >, Arcane::SharedArray2< Real3 >, Arcane::SharedArray2< Real3x3 >, Arcane::SharedArray2< Real3x3 >, Arcane::SharedArray2< String >, Arcane::SharedArray2< String >, Arcane::SharedArray2< UChar >, Arcane::SharedArray2< UChar >, Arcane::SharedArray< T >, Arcane::SharedArray< BFloat16 >, Arcane::SharedArray< BFloat16 >, Arcane::SharedArray< bool >, Arcane::SharedArray< bool >, Arcane::SharedArray< Byte >, Arcane::SharedArray< Byte >, Arcane::SharedArray< DataType >, Arcane::SharedArray< EdgeTypeConstRef >, Arcane::SharedArray< EdgeTypeConstRef >, Arcane::SharedArray< EdgeTypeRef >, Arcane::SharedArray< EdgeTypeRef >, Arcane::SharedArray< Float16 >, Arcane::SharedArray< Float16 >, Arcane::SharedArray< Float32 >, Arcane::SharedArray< Float32 >, Arcane::SharedArray< Int16 >, Arcane::SharedArray< Int16 >, Arcane::SharedArray< Int32 >, Arcane::SharedArray< Int32 >, Arcane::SharedArray< Int64 >, Arcane::SharedArray< Int64 >, Arcane::SharedArray< Int8 >, Arcane::SharedArray< Int8 >, Arcane::SharedArray< Integer >, Arcane::SharedArray< Integer >, Arcane::SharedArray< Pointer >, Arcane::SharedArray< Pointer >, Arcane::SharedArray< Real >, Arcane::SharedArray< Real >, Arcane::SharedArray< Real2 >, Arcane::SharedArray< Real2 >, Arcane::SharedArray< Real2x2 >, Arcane::SharedArray< Real2x2 >, Arcane::SharedArray< Real3 >, Arcane::SharedArray< Real3 >, Arcane::SharedArray< Real3x3 >, Arcane::SharedArray< Real3x3 >, Arcane::SharedArray< String >, Arcane::SharedArray< String >, Arcane::SharedArray< UChar >, Arcane::SharedArray< UChar >, Arcane::SharedArray< VertexTypeConstRef >, Arcane::SharedArray< VertexTypeConstRef >, Arcane::SharedArray< VertexTypeRef >, Arcane::SharedArray< VertexTypeRef >, Arcane::SharedArray< XmlNode >, Arcane::SharedArray< XmlNode >, Arccore::SharedArray2< T >, and Arccore::SharedArray< T >.

Definition at line 585 of file AbstractArray.h.

◆ _initFromAllocator()

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

◆ _initFromSpan()

◆ _internalAllocate()

template<typename T>
void Arcane::AbstractArray< T >::_internalAllocate ( Int64 new_capacity,
RunQueue * queue )
inlineprotected

Definition at line 504 of file AbstractArray.h.

◆ _internalDeallocate()

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

Definition at line 495 of file AbstractArray.h.

◆ _internalRealloc()

template<typename T>
void Arcane::AbstractArray< T >::_internalRealloc ( Int64 new_capacity,
bool compute_capacity,
RunQueue * queue = nullptr )
inlineprotected

◆ _internalReallocate()

template<typename T>
void Arcane::AbstractArray< T >::_internalReallocate ( Int64 new_capacity,
RunQueue * queue )
inlineprotected

Definition at line 465 of file AbstractArray.h.

◆ _internalSetHostDeviceMemoryLocation()

template<typename T>
void Arcane::AbstractArray< T >::_internalSetHostDeviceMemoryLocation ( eHostDeviceMemoryLocation location)
inline

Sets the physical location of the memory region.

Warning
The caller must guarantee consistency between the allocator and the specified memory region.

Definition at line 356 of file AbstractArray.h.

◆ _isSharedNull()

template<typename T>
bool Arcane::AbstractArray< T >::_isSharedNull ( )
inlineprotected

Definition at line 886 of file AbstractArray.h.

◆ _move()

template<typename T>
void Arcane::AbstractArray< T >::_move ( ThatClassType & rhs)
inlineprotected

Implements the move assignment operator.

This call is only valid for UniqueArray type arrays that have only one reference. The info from rhs is directly copied to this instance. In return, rhs contains an empty array.

Definition at line 784 of file AbstractArray.h.

Referenced by Arcane::UniqueArray< CaseOptionEnumValue * >::operator=().

◆ _reserve()

template<typename T>
void Arcane::AbstractArray< T >::_reserve ( Int64 new_capacity)
inlineprotected

Reserves memory for new_capacity elements.

Definition at line 419 of file AbstractArray.h.

Referenced by Arcane::Array< IVariable * >::reserve().

◆ _reset()

template<typename T>
void Arcane::AbstractArray< T >::_reset ( )
inlineprotected

Resets the array to an empty array.

Warning
This method is only valid for UniqueArray and not SharedArray.

Definition at line 837 of file AbstractArray.h.

Referenced by Arcane::SmallArray< T, NbElement >::~SmallArray().

◆ _resize() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::_resize ( Int64 s)
inlineprotected

Definition at line 699 of file AbstractArray.h.

◆ _resize() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::_resize ( Int64 s,
ConstReferenceType value )
inlineprotected

Redimensionne et remplit les nouvelles valeurs avec value.

Definition at line 714 of file AbstractArray.h.

◆ _resizeAndCopyView()

template<typename T>
void Arcane::AbstractArray< T >::_resizeAndCopyView ( Span< const T > rhs)
inlineprotected

Redimensionne l'instance et recopie les valeurs de rhs.

Si la taille diminue, les éléments compris entre size() et rhs.size() sont détruits.

Postcondition
size()==rhs.size()

Definition at line 752 of file AbstractArray.h.

Referenced by Arcane::Array< IVariable * >::copy().

◆ _resizeHelper()

template<typename T>
template<typename PodType>
void Arcane::AbstractArray< T >::_resizeHelper ( Int64 s,
PodType pod_type,
RunQueue * queue )
inlineprotected

Definition at line 683 of file AbstractArray.h.

◆ _resizeNoInit()

template<typename T>
void Arcane::AbstractArray< T >::_resizeNoInit ( Int64 s,
RunQueue * queue = nullptr )
inlineprotected

Redimensionne sans initialiser les nouvelles valeurs.

Definition at line 704 of file AbstractArray.h.

Referenced by Arcane::Array< IVariable * >::resizeNoInit().

◆ _setMP()

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

Definition at line 871 of file AbstractArray.h.

◆ _setMP2()

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

Definition at line 876 of file AbstractArray.h.

◆ _shrink() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::_shrink ( )
inlineprotected

Definition at line 814 of file AbstractArray.h.

◆ _shrink() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::_shrink ( Int64 new_capacity)
inlineprotected

Definition at line 820 of file AbstractArray.h.

◆ _swap()

template<typename T>
void Arcane::AbstractArray< T >::_swap ( ThatClassType & rhs)
inlineprotected

Swaps the values of the instance with those of rhs.

This call is only valid for UniqueArray type arrays and the exchange is done only by swapping pointers. The operation is therefore constant complexity.

Definition at line 808 of file AbstractArray.h.

Referenced by Arcane::UniqueArray< CaseOptionEnumValue * >::swap().

◆ _updateReferences()

template<typename T>
virtual void Arcane::AbstractArray< T >::_updateReferences ( )
inlineprotectedvirtual

Update references.

Reimplemented in Arcane::SharedArray2< T >, Arcane::SharedArray2< BFloat16 >, Arcane::SharedArray2< BFloat16 >, Arcane::SharedArray2< bool >, Arcane::SharedArray2< bool >, Arcane::SharedArray2< Byte >, Arcane::SharedArray2< Byte >, Arcane::SharedArray2< Float16 >, Arcane::SharedArray2< Float16 >, Arcane::SharedArray2< Float32 >, Arcane::SharedArray2< Float32 >, Arcane::SharedArray2< Int16 >, Arcane::SharedArray2< Int16 >, Arcane::SharedArray2< Int32 >, Arcane::SharedArray2< Int32 >, Arcane::SharedArray2< Int64 >, Arcane::SharedArray2< Int64 >, Arcane::SharedArray2< Int8 >, Arcane::SharedArray2< Int8 >, Arcane::SharedArray2< Integer >, Arcane::SharedArray2< Integer >, Arcane::SharedArray2< Pointer >, Arcane::SharedArray2< Pointer >, Arcane::SharedArray2< Real >, Arcane::SharedArray2< Real >, Arcane::SharedArray2< Real2 >, Arcane::SharedArray2< Real2 >, Arcane::SharedArray2< Real2x2 >, Arcane::SharedArray2< Real2x2 >, Arcane::SharedArray2< Real3 >, Arcane::SharedArray2< Real3 >, Arcane::SharedArray2< Real3x3 >, Arcane::SharedArray2< Real3x3 >, Arcane::SharedArray2< String >, Arcane::SharedArray2< String >, Arcane::SharedArray2< UChar >, Arcane::SharedArray2< UChar >, Arcane::SharedArray< T >, Arcane::SharedArray< BFloat16 >, Arcane::SharedArray< BFloat16 >, Arcane::SharedArray< bool >, Arcane::SharedArray< bool >, Arcane::SharedArray< Byte >, Arcane::SharedArray< Byte >, Arcane::SharedArray< DataType >, Arcane::SharedArray< EdgeTypeConstRef >, Arcane::SharedArray< EdgeTypeConstRef >, Arcane::SharedArray< EdgeTypeRef >, Arcane::SharedArray< EdgeTypeRef >, Arcane::SharedArray< Float16 >, Arcane::SharedArray< Float16 >, Arcane::SharedArray< Float32 >, Arcane::SharedArray< Float32 >, Arcane::SharedArray< Int16 >, Arcane::SharedArray< Int16 >, Arcane::SharedArray< Int32 >, Arcane::SharedArray< Int32 >, Arcane::SharedArray< Int64 >, Arcane::SharedArray< Int64 >, Arcane::SharedArray< Int8 >, Arcane::SharedArray< Int8 >, Arcane::SharedArray< Integer >, Arcane::SharedArray< Integer >, Arcane::SharedArray< Pointer >, Arcane::SharedArray< Pointer >, Arcane::SharedArray< Real >, Arcane::SharedArray< Real >, Arcane::SharedArray< Real2 >, Arcane::SharedArray< Real2 >, Arcane::SharedArray< Real2x2 >, Arcane::SharedArray< Real2x2 >, Arcane::SharedArray< Real3 >, Arcane::SharedArray< Real3 >, Arcane::SharedArray< Real3x3 >, Arcane::SharedArray< Real3x3 >, Arcane::SharedArray< String >, Arcane::SharedArray< String >, Arcane::SharedArray< UChar >, Arcane::SharedArray< UChar >, Arcane::SharedArray< VertexTypeConstRef >, Arcane::SharedArray< VertexTypeConstRef >, Arcane::SharedArray< VertexTypeRef >, Arcane::SharedArray< VertexTypeRef >, Arcane::SharedArray< XmlNode >, Arcane::SharedArray< XmlNode >, Arccore::SharedArray2< T >, and Arccore::SharedArray< T >.

Definition at line 581 of file AbstractArray.h.

Referenced by Arcane::AbstractArray< DataType >::dispose().

◆ capacity()

template<typename T>
Integer Arcane::AbstractArray< T >::capacity ( ) const
inline

Capacity (number of allocated elements) of the vector.

Definition at line 307 of file AbstractArray.h.

Referenced by Arcane::ItemGroupImpl::capacity(), and Arcane::MemoryUtils::checkResizeArrayWithCapacity().

◆ changeAllocator() [1/2]

template<typename T>
void Arcane::AbstractArray< T >::changeAllocator ( const MemoryAllocationOptions & options)
inline

Definition at line 572 of file AbstractArray.h.

◆ changeAllocator() [2/2]

template<typename T>
void Arcane::AbstractArray< T >::changeAllocator ( const MemoryAllocationOptions & options,
RunQueue * queue )
inline

Definition at line 566 of file AbstractArray.h.

◆ contains()

template<typename T>
bool Arcane::AbstractArray< T >::contains ( ConstReferenceType v) const
inline

True if the array contains the value element v.

Definition at line 317 of file AbstractArray.h.

Referenced by Arcane::CaseOptionMultiExtended::_search(), and Arcane::CaseOptionMultiSimpleT< T >::_search().

◆ dispose()

template<typename T>
void Arcane::AbstractArray< T >::dispose ( )
inline

Frees the memory used by the array.

Definition at line 272 of file AbstractArray.h.

◆ empty()

template<typename T>
bool Arcane::AbstractArray< T >::empty ( ) const
inline

Capacity (number of allocated elements) of the vector.

Definition at line 315 of file AbstractArray.h.

Referenced by Arcane::CaseOptionMultiExtended::_search(), Arcane::CaseOptionMultiSimpleT< T >::_search(), and Arcane::ItemGroupImpl::clear().

◆ hostDeviceMemoryLocation()

template<typename T>
eHostDeviceMemoryLocation Arcane::AbstractArray< T >::hostDeviceMemoryLocation ( ) const
inline

Sets the physical location of the memory region.

Definition at line 362 of file AbstractArray.h.

◆ largeCapacity()

template<typename T>
Int64 Arcane::AbstractArray< T >::largeCapacity ( ) const
inline

Capacity (number of allocated elements) of the vector (in 64 bits).

Definition at line 313 of file AbstractArray.h.

◆ largeLength()

template<typename T>
Int64 Arcane::AbstractArray< T >::largeLength ( ) const
inline

Number of elements in the vector (in 64 bits).

Definition at line 311 of file AbstractArray.h.

◆ largeSize()

template<typename T>
Int64 Arcane::AbstractArray< T >::largeSize ( ) const
inline

◆ length()

template<typename T>
Integer Arcane::AbstractArray< T >::length ( ) const
inline

Number of elements in the vector.

Definition at line 305 of file AbstractArray.h.

◆ operator ConstArrayView< T >()

template<typename T>
Arcane::AbstractArray< T >::operator ConstArrayView< T > ( ) const
inline

Definition at line 287 of file AbstractArray.h.

◆ operator SmallSpan< const T >()

template<typename T>
Arcane::AbstractArray< T >::operator SmallSpan< const T > ( ) const
inline

Definition at line 295 of file AbstractArray.h.

◆ operator Span< const T >()

template<typename T>
Arcane::AbstractArray< T >::operator Span< const T > ( ) const
inline

Definition at line 291 of file AbstractArray.h.

◆ operator()()

template<typename T>
ConstReferenceType Arcane::AbstractArray< T >::operator() ( Int64 i) const
inline

Element at index i.

Definition at line 336 of file AbstractArray.h.

◆ operator[]()

template<typename T>
ConstReferenceType Arcane::AbstractArray< T >::operator[] ( Int64 i) const
inline

Element at index i.

Definition at line 330 of file AbstractArray.h.

◆ setMemoryLocationHint()

template<typename T>
void Arcane::AbstractArray< T >::setMemoryLocationHint ( eMemoryLocationHint new_hint)
inline

Modifies the memory location information.

Definition at line 345 of file AbstractArray.h.

◆ size()

template<typename T>
Integer Arcane::AbstractArray< T >::size ( ) const
inline

◆ typeSize()

template<typename T>
constexpr Int64 Arcane::AbstractArray< T >::typeSize ( )
inlinestaticconstexprprotected

Definition at line 231 of file AbstractArray.h.

◆ operator!= [1/3]

template<typename T>
bool operator!= ( const AbstractArray< T > & rhs,
const AbstractArray< T > & lhs )
friend

Definition at line 374 of file AbstractArray.h.

◆ operator!= [2/3]

template<typename T>
bool operator!= ( const AbstractArray< T > & rhs,
const Span< const T > & lhs )
friend

Definition at line 384 of file AbstractArray.h.

◆ operator!= [3/3]

template<typename T>
bool operator!= ( const Span< const T > & rhs,
const AbstractArray< T > & lhs )
friend

Definition at line 394 of file AbstractArray.h.

◆ operator<<

template<typename T>
std::ostream & operator<< ( std::ostream & o,
const AbstractArray< T > & val )
friend

Definition at line 399 of file AbstractArray.h.

◆ operator== [1/3]

template<typename T>
bool operator== ( const AbstractArray< T > & rhs,
const AbstractArray< T > & lhs )
friend

Definition at line 369 of file AbstractArray.h.

◆ operator== [2/3]

template<typename T>
bool operator== ( const AbstractArray< T > & rhs,
const Span< const T > & lhs )
friend

Definition at line 379 of file AbstractArray.h.

◆ operator== [3/3]

template<typename T>
bool operator== ( const Span< const T > & rhs,
const AbstractArray< T > & lhs )
friend

Definition at line 389 of file AbstractArray.h.

Member Data Documentation

◆ m_ptr

template<typename T>
T* Arcane::AbstractArray< T >::m_ptr = nullptr
protected

Definition at line 414 of file AbstractArray.h.


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