NVIDIA DeepStream SDK API Reference

6.4 Release
cvcore::ArrayBase Class Reference

Detailed Description

Base implementation of Array.

Definition at line 23 of file Array.h.

Inheritance diagram for cvcore::ArrayBase:

Public Member Functions

 ArrayBase (std::size_t capacity, std::size_t elemSize, void *dataPtr, bool isCPU)
 Constructor of a non-owning arrays. More...
 
 ArrayBase (std::size_t capacity, std::size_t elemSize, bool isCPU)
 Constructor of a memory-owning arrays. More...
 
 ~ArrayBase ()
 Destructor of ArrayBase. More...
 
 ArrayBase (const ArrayBase &)=delete
 ArrayBase is non-copyable. More...
 
ArrayBaseoperator= (const ArrayBase &)=delete
 ArrayBase is non-copyable. More...
 
 ArrayBase (ArrayBase &&)
 Move constructor of ArrayBase. More...
 
ArrayBaseoperator= (ArrayBase &&)
 Move assignment operator of ArrayBase. More...
 
void * getElement (int idx) const
 Get the pointer to specified index. More...
 
std::size_t getSize () const
 Get the size of the array. More...
 
std::size_t getCapacity () const
 Get the capacity of the array. More...
 
std::size_t getElementSize () const
 Get the size of each element. More...
 
void setSize (std::size_t size)
 Set the size of the array. More...
 
bool isCPU () const
 Get the flag whether the array is CPU or GPU array. More...
 
bool isOwning () const
 Get the flag whether the array is owning memory space. More...
 
void * getData () const
 Get the raw pointer to the array data. More...
 

Constructor & Destructor Documentation

◆ ArrayBase() [1/4]

cvcore::ArrayBase::ArrayBase ( std::size_t  capacity,
std::size_t  elemSize,
void *  dataPtr,
bool  isCPU 
)

Constructor of a non-owning arrays.

Parameters
capacitycapacity of the array.
elemSizebyte size of each element.
dataPtrdata pointer to the raw source array.
isCPUwhether to allocate the array on CPU or GPU.

◆ ArrayBase() [2/4]

cvcore::ArrayBase::ArrayBase ( std::size_t  capacity,
std::size_t  elemSize,
bool  isCPU 
)

Constructor of a memory-owning arrays.

Parameters
capacitycapacity of the array.
elemSizebyte size of each element.
isCPUwhether to allocate the array on CPU or GPU.

◆ ~ArrayBase()

cvcore::ArrayBase::~ArrayBase ( )

Destructor of ArrayBase.

◆ ArrayBase() [3/4]

cvcore::ArrayBase::ArrayBase ( const ArrayBase )
delete

ArrayBase is non-copyable.

◆ ArrayBase() [4/4]

cvcore::ArrayBase::ArrayBase ( ArrayBase &&  )

Move constructor of ArrayBase.

Member Function Documentation

◆ getCapacity()

std::size_t cvcore::ArrayBase::getCapacity ( ) const

Get the capacity of the array.

Returns
size of the array.

◆ getData()

void* cvcore::ArrayBase::getData ( ) const

Get the raw pointer to the array data.

Returns
void pointer to the first element of the array.

◆ getElement()

void* cvcore::ArrayBase::getElement ( int  idx) const

Get the pointer to specified index.

Parameters
idxelement index.
Returns
pointer to the specified element.

Referenced by cvcore::Array< T >::operator[](), cvcore::ArrayN< T, N >::operator[](), cvcore::Array< T >::setSize(), and cvcore::ArrayN< T, N >::setSize().

◆ getElementSize()

std::size_t cvcore::ArrayBase::getElementSize ( ) const

Get the size of each element.

Returns
size of each element.

◆ getSize()

std::size_t cvcore::ArrayBase::getSize ( ) const

◆ isCPU()

bool cvcore::ArrayBase::isCPU ( ) const

Get the flag whether the array is CPU or GPU array.

Returns
whether the array is CPU array.

Referenced by cvcore::Array< T >::Array(), cvcore::ArrayN< T, N >::ArrayN(), cvcore::Array< T >::setSize(), and cvcore::ArrayN< T, N >::setSize().

◆ isOwning()

bool cvcore::ArrayBase::isOwning ( ) const

Get the flag whether the array is owning memory space.

Returns
whether the array owns memory.

◆ operator=() [1/2]

ArrayBase& cvcore::ArrayBase::operator= ( ArrayBase &&  )

Move assignment operator of ArrayBase.

◆ operator=() [2/2]

ArrayBase& cvcore::ArrayBase::operator= ( const ArrayBase )
delete

ArrayBase is non-copyable.

◆ setSize()

void cvcore::ArrayBase::setSize ( std::size_t  size)

Set the size of the array.

Parameters
sizesize of the array.

Referenced by cvcore::Array< T >::setSize(), and cvcore::ArrayN< T, N >::setSize().


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