NVIDIA DeepStream SDK API Reference

6.4 Release
nvdsinferserver::CudaTensorBuf Class Reference

Detailed Description

A batch buffer with CUDA memory allocation.

Definition at line 168 of file 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 ()
 
const InferBufferDescriptiongetBufDesc () const final
 
uint32_t getBatchSize () const final
 
uint64_t getTotalBytes () const override
 
void setBufDesc (const InferBufferDescription &desc)
 
InferBufferDescriptionmutableBufDesc ()
 
const SharedCuEventcuEvent () const
 
void setCuEvent (SharedCuEvent e)
 
void setSyncObj (NvBufSurfTransformSyncObj_t SyncObj)
 
NvBufSurfTransformSyncObj_tgetSyncObj ()
 
void waitForSyncObj ()
 
void attach (SharedBatchBuf buf)
 
void detach ()
 
bool hasAttachedBufs () const
 
const std::vector< SharedBatchBuf > & attachedBufs () const
 
std::vector< SharedBatchBuf > & mutableAttachedBufs ()
 
bool hasAttachLoop () const
 
void setBufId (uint64_t id)
 
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...
 

Constructor & Destructor Documentation

◆ CudaTensorBuf()

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

◆ ~CudaTensorBuf()

nvdsinferserver::CudaTensorBuf::~CudaTensorBuf ( )
override

Member Function Documentation

◆ attach()

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

Definition at line 67 of file infer_batch_buffer.h.

◆ attachedBufs()

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

Definition at line 74 of file infer_batch_buffer.h.

◆ bufId()

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

Definition at line 93 of file infer_batch_buffer.h.

◆ cuEvent()

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

Definition at line 52 of file infer_batch_buffer.h.

◆ detach()

void nvdsinferserver::BaseBatchBuffer::detach ( )
inlineinherited

Definition at line 72 of file infer_batch_buffer.h.

Referenced by reuse().

◆ getBatchSize()

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

◆ getBufDesc()

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

Implements nvdsinferserver::IBatchBuffer.

Definition at line 40 of file infer_batch_buffer.h.

◆ getBufOffset()

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 infer_batch_buffer.h.

◆ getBufPtr()

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

◆ getSyncObj()

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

Definition at line 55 of file infer_batch_buffer.h.

◆ getTotalBytes()

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

Implements nvdsinferserver::IBatchBuffer.

Reimplemented in nvdsinferserver::RefBatchBuffer.

Definition at line 42 of file infer_batch_buffer.h.

References nvdsinferserver::kNone.

◆ hasAttachedBufs()

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

Definition at line 73 of file infer_batch_buffer.h.

◆ hasAttachLoop()

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

Definition at line 79 of file infer_batch_buffer.h.

◆ mutableAttachedBufs()

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

Definition at line 78 of file infer_batch_buffer.h.

◆ mutableBufDesc()

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

Definition at line 50 of file infer_batch_buffer.h.

Referenced by setName().

◆ reuse()

void nvdsinferserver::CudaTensorBuf::reuse ( )
inline

◆ setBatchSize()

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

Reimplemented from nvdsinferserver::BaseBatchBuffer.

Definition at line 175 of file infer_cuda_utils.h.

References nvdsinferserver::BaseBatchBuffer::setBatchSize().

Referenced by reuse().

◆ setBufDesc()

◆ setBufId()

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

Definition at line 92 of file infer_batch_buffer.h.

◆ setCuEvent()

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

Definition at line 53 of file infer_batch_buffer.h.

◆ setName()

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

◆ setSyncObj()

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

Definition at line 54 of file infer_batch_buffer.h.

◆ waitForSyncObj()

void nvdsinferserver::BaseBatchBuffer::waitForSyncObj ( )
inlineinherited

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