NVIDIA DeepStream SDK API Reference

6.4 Release
nvdsinferserver::SurfaceBuffer Class Reference

Detailed Description

Definition at line 53 of file infer_surface_bufs.h.

Inheritance diagram for nvdsinferserver::SurfaceBuffer:
Collaboration diagram for nvdsinferserver::SurfaceBuffer:

Public Member Functions

 ~SurfaceBuffer () override
 
void * getBufPtr (uint32_t batchIdx) const override
 
size_t getBufOffset (uint32_t batchIdx) const override
 Get the offset from start of the memory allocation to the buffer pointer. More...
 
uint32_t getReservedSize ()
 
NvBufSurfacegetBufSurface ()
 
InferMediaFormat getColorFormat () const override
 
const BatchSurfaceInfogetSurfaceAlignInfo () const override
 
void reuse ()
 
const InferBufferDescriptiongetBufDesc () const final
 
uint32_t getBatchSize () const final
 
uint64_t getTotalBytes () const override
 
void setBufDesc (const InferBufferDescription &desc)
 
InferBufferDescriptionmutableBufDesc ()
 
virtual void setBatchSize (uint32_t size)
 
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
 

Protected Member Functions

 SurfaceBuffer (int batchSize)
 
bool init (int width, int height, InferMediaFormat format, int gpuId)
 

Friends

UniqSurfaceBuf createNvBufSurface (int width, int height, InferMediaFormat format, int batchSize, int gpuId)
 

Constructor & Destructor Documentation

◆ SurfaceBuffer()

nvdsinferserver::SurfaceBuffer::SurfaceBuffer ( int  batchSize)
explicitprotected

◆ ~SurfaceBuffer()

nvdsinferserver::SurfaceBuffer::~SurfaceBuffer ( )
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 nvdsinferserver::CudaTensorBuf::reuse().

◆ getBatchSize()

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

Implements nvdsinferserver::IBatchBuffer.

Definition at line 41 of file infer_batch_buffer.h.

Referenced by getBufOffset(), and getBufPtr().

◆ 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::SurfaceBuffer::getBufOffset ( uint32_t  batchIdx) const
inlineoverridevirtual

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

Needed for sharing CUDA memory with Triton server.

Reimplemented from nvdsinferserver::BaseBatchBuffer.

Definition at line 73 of file infer_surface_bufs.h.

References nvdsinferserver::BaseBatchBuffer::getBatchSize(), and NvBufSurface::isContiguous.

◆ getBufPtr()

void* nvdsinferserver::SurfaceBuffer::getBufPtr ( uint32_t  batchIdx) const
inlineoverridevirtual

◆ getBufSurface()

NvBufSurface* nvdsinferserver::SurfaceBuffer::getBufSurface ( )
inline

Definition at line 85 of file infer_surface_bufs.h.

◆ getColorFormat()

InferMediaFormat nvdsinferserver::SurfaceBuffer::getColorFormat ( ) const
inlineoverridevirtual

Implements nvdsinferserver::ImageAlignBuffer.

Definition at line 86 of file infer_surface_bufs.h.

◆ getReservedSize()

uint32_t nvdsinferserver::SurfaceBuffer::getReservedSize ( )
inline

Definition at line 84 of file infer_surface_bufs.h.

◆ getSurfaceAlignInfo()

const BatchSurfaceInfo& nvdsinferserver::SurfaceBuffer::getSurfaceAlignInfo ( ) const
overridevirtual

◆ 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.

◆ init()

bool nvdsinferserver::SurfaceBuffer::init ( int  width,
int  height,
InferMediaFormat  format,
int  gpuId 
)
protected

◆ 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 nvdsinferserver::CudaTensorBuf::setName().

◆ reuse()

void nvdsinferserver::SurfaceBuffer::reuse ( )
inline

◆ setBatchSize()

virtual void nvdsinferserver::BaseBatchBuffer::setBatchSize ( uint32_t  size)
inlinevirtualinherited

◆ 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.

◆ 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

Friends And Related Function Documentation

◆ createNvBufSurface

UniqSurfaceBuf createNvBufSurface ( int  width,
int  height,
InferMediaFormat  format,
int  batchSize,
int  gpuId 
)
friend

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