NVIDIA DeepStream SDK API Reference

8.0 Release
nvdsinferserver::CudaTensorBuf Class Reference

Detailed Description

A batch buffer with CUDA memory allocation.

Definition at line 168 of file sources/libs/nvdsinferserver/infer_cuda_utils.h.

Inheritance diagram for nvdsinferserver::CudaTensorBuf:
Collaboration diagram for nvdsinferserver::CudaTensorBuf:

Public Member Functions

 CudaTensorBuf (const InferDims &dims, InferDataType dt, int batchSize, const std::string &name, InferMemType mt, int devId, bool initCuEvent)
 
 ~CudaTensorBuf () override
 
void setBatchSize (uint32_t size) override
 
void setName (const std::string &name)
 
void * getBufPtr (uint32_t batchIdx) const final
 
void reuse ()
 
 CudaTensorBuf (const InferDims &dims, InferDataType dt, int batchSize, const std::string &name, InferMemType mt, int devId, bool initCuEvent)
 
 ~CudaTensorBuf () override
 
void setBatchSize (uint32_t size) override
 
void setName (const std::string &name)
 
void * getBufPtr (uint32_t batchIdx) const final
 
void reuse ()
 
const InferBufferDescriptiongetBufDesc () const final
 
const InferBufferDescriptiongetBufDesc () const final
 
uint32_t getBatchSize () const final
 
uint32_t getBatchSize () const final
 
uint64_t getTotalBytes () const override
 
uint64_t getTotalBytes () const override
 
void setBufDesc (const InferBufferDescription &desc)
 
void setBufDesc (const InferBufferDescription &desc)
 
InferBufferDescriptionmutableBufDesc ()
 
InferBufferDescriptionmutableBufDesc ()
 
const SharedCuEventcuEvent () const
 
const SharedCuEventcuEvent () const
 
void setCuEvent (SharedCuEvent e)
 
void setCuEvent (SharedCuEvent e)
 
void setSyncObj (NvBufSurfTransformSyncObj_t SyncObj)
 
void setSyncObj (NvBufSurfTransformSyncObj_t SyncObj)
 
NvBufSurfTransformSyncObj_tgetSyncObj ()
 
NvBufSurfTransformSyncObj_tgetSyncObj ()
 
void waitForSyncObj ()
 
void waitForSyncObj ()
 
void attach (SharedBatchBuf buf)
 
void attach (SharedBatchBuf buf)
 
void detach ()
 
void detach ()
 
bool hasAttachedBufs () const
 
bool hasAttachedBufs () const
 
const std::vector< SharedBatchBuf > & attachedBufs () const
 
const std::vector< SharedBatchBuf > & attachedBufs () const
 
std::vector< SharedBatchBuf > & mutableAttachedBufs ()
 
std::vector< SharedBatchBuf > & mutableAttachedBufs ()
 
bool hasAttachLoop () const
 
bool hasAttachLoop () const
 
void setBufId (uint64_t id)
 
void setBufId (uint64_t id)
 
uint64_t bufId () const
 
uint64_t bufId () const
 
size_t getBufOffset (uint32_t batchIdx) const override
 Get the offset from start of the memory allocation to the buffer pointer. More...
 
size_t getBufOffset (uint32_t batchIdx) const override
 Get the offset from start of the memory allocation to the buffer pointer. More...
 

Constructor & Destructor Documentation

◆ CudaTensorBuf() [1/2]

nvdsinferserver::CudaTensorBuf::CudaTensorBuf ( const InferDims dims,
InferDataType  dt,
int  batchSize,
const std::string &  name,
InferMemType  mt,
int  devId,
bool  initCuEvent 
)

◆ ~CudaTensorBuf() [1/2]

nvdsinferserver::CudaTensorBuf::~CudaTensorBuf ( )
override

◆ CudaTensorBuf() [2/2]

nvdsinferserver::CudaTensorBuf::CudaTensorBuf ( const InferDims dims,
InferDataType  dt,
int  batchSize,
const std::string &  name,
InferMemType  mt,
int  devId,
bool  initCuEvent 
)

◆ ~CudaTensorBuf() [2/2]

nvdsinferserver::CudaTensorBuf::~CudaTensorBuf ( )
override

Member Function Documentation

◆ attach() [1/2]

void nvdsinferserver::BaseBatchBuffer::attach ( SharedBatchBuf  buf)
inlineinherited

◆ attach() [2/2]

void nvdsinferserver::BaseBatchBuffer::attach ( SharedBatchBuf  buf)
inlineinherited

◆ attachedBufs() [1/2]

const std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::attachedBufs ( ) const
inlineinherited

◆ attachedBufs() [2/2]

const std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::attachedBufs ( ) const
inlineinherited

◆ bufId() [1/2]

uint64_t nvdsinferserver::BaseBatchBuffer::bufId ( ) const
inlineinherited

◆ bufId() [2/2]

uint64_t nvdsinferserver::BaseBatchBuffer::bufId ( ) const
inlineinherited

◆ cuEvent() [1/2]

const SharedCuEvent& nvdsinferserver::BaseBatchBuffer::cuEvent ( ) const
inlineinherited

◆ cuEvent() [2/2]

const SharedCuEvent& nvdsinferserver::BaseBatchBuffer::cuEvent ( ) const
inlineinherited

◆ detach() [1/2]

void nvdsinferserver::BaseBatchBuffer::detach ( )
inlineinherited

◆ detach() [2/2]

void nvdsinferserver::BaseBatchBuffer::detach ( )
inlineinherited

Definition at line 72 of file sources/libs/nvdsinferserver/infer_batch_buffer.h.

Referenced by reuse().

◆ getBatchSize() [1/2]

uint32_t nvdsinferserver::BaseBatchBuffer::getBatchSize ( ) const
inlinefinalvirtualinherited

◆ getBatchSize() [2/2]

uint32_t nvdsinferserver::BaseBatchBuffer::getBatchSize ( ) const
inlinefinalvirtualinherited

◆ getBufDesc() [1/2]

const InferBufferDescription& nvdsinferserver::BaseBatchBuffer::getBufDesc ( ) const
inlinefinalvirtualinherited

◆ getBufDesc() [2/2]

const InferBufferDescription& nvdsinferserver::BaseBatchBuffer::getBufDesc ( ) const
inlinefinalvirtualinherited

◆ getBufOffset() [1/2]

size_t nvdsinferserver::BaseBatchBuffer::getBufOffset ( uint32_t  batchIdx) const
inlineoverridevirtualinherited

Get the offset from start of the memory allocation to the buffer pointer.

Needed for sharing CUDA memory with Triton server.

Implements nvdsinferserver::IBatchBuffer.

Reimplemented in nvdsinferserver::RefBatchBuffer, nvdsinferserver::RefBatchBuffer, nvdsinferserver::BatchSurfaceBuffer, nvdsinferserver::BatchSurfaceBuffer, nvdsinferserver::SurfaceBuffer, and nvdsinferserver::SurfaceBuffer.

Definition at line 100 of file sources/libs/nvdsinferserver/infer_batch_buffer.h.

◆ getBufOffset() [2/2]

size_t nvdsinferserver::BaseBatchBuffer::getBufOffset ( uint32_t  batchIdx) const
inlineoverridevirtualinherited

Get the offset from start of the memory allocation to the buffer pointer.

Needed for sharing CUDA memory with Triton server.

Implements nvdsinferserver::IBatchBuffer.

Reimplemented in nvdsinferserver::RefBatchBuffer, nvdsinferserver::BatchSurfaceBuffer, and nvdsinferserver::SurfaceBuffer.

Definition at line 100 of file 9.0/sources/libs/nvdsinferserver/infer_batch_buffer.h.

◆ getBufPtr() [1/2]

void* nvdsinferserver::CudaTensorBuf::getBufPtr ( uint32_t  batchIdx) const
finalvirtual

◆ getBufPtr() [2/2]

void* nvdsinferserver::CudaTensorBuf::getBufPtr ( uint32_t  batchIdx) const
finalvirtual

◆ getSyncObj() [1/2]

NvBufSurfTransformSyncObj_t& nvdsinferserver::BaseBatchBuffer::getSyncObj ( )
inlineinherited

◆ getSyncObj() [2/2]

NvBufSurfTransformSyncObj_t& nvdsinferserver::BaseBatchBuffer::getSyncObj ( )
inlineinherited

◆ getTotalBytes() [1/2]

uint64_t nvdsinferserver::BaseBatchBuffer::getTotalBytes ( ) const
inlineoverridevirtualinherited

◆ getTotalBytes() [2/2]

uint64_t nvdsinferserver::BaseBatchBuffer::getTotalBytes ( ) const
inlineoverridevirtualinherited

◆ hasAttachedBufs() [1/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachedBufs ( ) const
inlineinherited

◆ hasAttachedBufs() [2/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachedBufs ( ) const
inlineinherited

◆ hasAttachLoop() [1/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachLoop ( ) const
inlineinherited

◆ hasAttachLoop() [2/2]

bool nvdsinferserver::BaseBatchBuffer::hasAttachLoop ( ) const
inlineinherited

◆ mutableAttachedBufs() [1/2]

std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::mutableAttachedBufs ( )
inlineinherited

◆ mutableAttachedBufs() [2/2]

std::vector<SharedBatchBuf>& nvdsinferserver::BaseBatchBuffer::mutableAttachedBufs ( )
inlineinherited

◆ mutableBufDesc() [1/2]

InferBufferDescription& nvdsinferserver::BaseBatchBuffer::mutableBufDesc ( )
inlineinherited

Definition at line 50 of file sources/libs/nvdsinferserver/infer_batch_buffer.h.

Referenced by setName().

◆ mutableBufDesc() [2/2]

InferBufferDescription& nvdsinferserver::BaseBatchBuffer::mutableBufDesc ( )
inlineinherited

◆ reuse() [1/2]

void nvdsinferserver::CudaTensorBuf::reuse ( )
inline

◆ reuse() [2/2]

void nvdsinferserver::CudaTensorBuf::reuse ( )
inline

◆ setBatchSize() [1/2]

void nvdsinferserver::CudaTensorBuf::setBatchSize ( uint32_t  size)
inlineoverridevirtual

◆ setBatchSize() [2/2]

void nvdsinferserver::CudaTensorBuf::setBatchSize ( uint32_t  size)
inlineoverridevirtual

◆ setBufDesc() [1/2]

void nvdsinferserver::BaseBatchBuffer::setBufDesc ( const InferBufferDescription desc)
inlineinherited

◆ setBufDesc() [2/2]

◆ setBufId() [1/2]

void nvdsinferserver::BaseBatchBuffer::setBufId ( uint64_t  id)
inlineinherited

◆ setBufId() [2/2]

void nvdsinferserver::BaseBatchBuffer::setBufId ( uint64_t  id)
inlineinherited

◆ setCuEvent() [1/2]

void nvdsinferserver::BaseBatchBuffer::setCuEvent ( SharedCuEvent  e)
inlineinherited

◆ setCuEvent() [2/2]

void nvdsinferserver::BaseBatchBuffer::setCuEvent ( SharedCuEvent  e)
inlineinherited

◆ setName() [1/2]

void nvdsinferserver::CudaTensorBuf::setName ( const std::string &  name)
inline

◆ setName() [2/2]

void nvdsinferserver::CudaTensorBuf::setName ( const std::string &  name)
inline

◆ setSyncObj() [1/2]

void nvdsinferserver::BaseBatchBuffer::setSyncObj ( NvBufSurfTransformSyncObj_t  SyncObj)
inlineinherited

◆ setSyncObj() [2/2]

void nvdsinferserver::BaseBatchBuffer::setSyncObj ( NvBufSurfTransformSyncObj_t  SyncObj)
inlineinherited

◆ waitForSyncObj() [1/2]

void nvdsinferserver::BaseBatchBuffer::waitForSyncObj ( )
inlineinherited

◆ waitForSyncObj() [2/2]

void nvdsinferserver::BaseBatchBuffer::waitForSyncObj ( )
inlineinherited

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