NVIDIA DeepStream SDK API Reference

6.4 Release
CudaBuffer Class Reference

Detailed Description

Helper base class for managing Cuda allocated buffers.

Definition at line 133 of file nvdspreprocess_impl.h.

Inheritance diagram for CudaBuffer:

Public Member Functions

virtual ~CudaBuffer ()=default
 
size_t bytes () const
 size of cuda buffer in bytes More...
 
template<typename T >
T * ptr ()
 template to return cuda buffer More...
 
void * ptr ()
 pointer to cuda buffer More...
 

Protected Member Functions

 CudaBuffer (size_t s)
 helper move copy functionality More...
 
void move_copy (CudaBuffer &&o)
 move_copy cuda buffer More...
 
 DISABLE_CLASS_COPY (CudaBuffer)
 disable class copy More...
 

Protected Attributes

void * m_Buf = nullptr
 pointer to cuda buffer More...
 
size_t m_Size = 0
 buffer size More...
 

Constructor & Destructor Documentation

◆ ~CudaBuffer()

virtual CudaBuffer::~CudaBuffer ( )
virtualdefault

◆ CudaBuffer()

CudaBuffer::CudaBuffer ( size_t  s)
inlineexplicitprotected

helper move copy functionality

Definition at line 151 of file nvdspreprocess_impl.h.

Member Function Documentation

◆ bytes()

size_t CudaBuffer::bytes ( ) const
inline

size of cuda buffer in bytes

Definition at line 138 of file nvdspreprocess_impl.h.

References m_Size.

◆ DISABLE_CLASS_COPY()

CudaBuffer::DISABLE_CLASS_COPY ( CudaBuffer  )
protected

disable class copy

◆ move_copy()

void CudaBuffer::move_copy ( CudaBuffer &&  o)
inlineprotected

move_copy cuda buffer

Definition at line 153 of file nvdspreprocess_impl.h.

References m_Buf, and m_Size.

◆ ptr() [1/2]

template<typename T >
T* CudaBuffer::ptr ( )
inline

template to return cuda buffer

Definition at line 141 of file nvdspreprocess_impl.h.

References m_Buf.

◆ ptr() [2/2]

void* CudaBuffer::ptr ( )
inline

pointer to cuda buffer

Definition at line 146 of file nvdspreprocess_impl.h.

References m_Buf.

Field Documentation

◆ m_Buf

void* CudaBuffer::m_Buf = nullptr
protected

pointer to cuda buffer

Definition at line 163 of file nvdspreprocess_impl.h.

Referenced by move_copy(), and ptr().

◆ m_Size

size_t CudaBuffer::m_Size = 0
protected

buffer size

Definition at line 165 of file nvdspreprocess_impl.h.

Referenced by bytes(), and move_copy().


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