NVIDIA DeepStream SDK API Reference

8.0 Release
nvdsinferserver::BasePreprocessor Class Referenceabstract

Detailed Description

Base preprocessor class.

Definition at line 79 of file sources/libs/nvdsinferserver/infer_iprocess.h.

Inheritance diagram for nvdsinferserver::BasePreprocessor:
Collaboration diagram for nvdsinferserver::BasePreprocessor:

Public Types

using PreprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 
using PreprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)>
 

Public Member Functions

 ~BasePreprocessor () override=default
 Destructor default. More...
 
NvDsInferStatus transform (SharedBatchArray src, SharedCuStream mainStream, PreprocessDone done) override
 Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx. More...
 
virtual NvDsInferStatus allocateResource (const std::vector< int > &devIds)=0
 Allocate resource like output buffer pool. More...
 
 ~BasePreprocessor () override=default
 Destructor default. More...
 
NvDsInferStatus transform (SharedBatchArray src, SharedCuStream mainStream, PreprocessDone done) override
 Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx. More...
 
virtual NvDsInferStatus allocateResource (const std::vector< int > &devIds)=0
 Allocate resource like output buffer pool. More...
 

Member Typedef Documentation

◆ PreprocessDone [1/2]

◆ PreprocessDone [2/2]

Constructor & Destructor Documentation

◆ ~BasePreprocessor() [1/2]

nvdsinferserver::BasePreprocessor::~BasePreprocessor ( )
overridedefault

Destructor default.

◆ ~BasePreprocessor() [2/2]

nvdsinferserver::BasePreprocessor::~BasePreprocessor ( )
overridedefault

Destructor default.

Member Function Documentation

◆ allocateResource() [1/2]

virtual NvDsInferStatus nvdsinferserver::BasePreprocessor::allocateResource ( const std::vector< int > &  devIds)
pure virtual

Allocate resource like output buffer pool.

Parameters
[in]devIdsList of device IDs.
Returns
Error status.

Implemented in nvdsinferserver::NetworkPreprocessor, and nvdsinferserver::NetworkPreprocessor.

◆ allocateResource() [2/2]

virtual NvDsInferStatus nvdsinferserver::BasePreprocessor::allocateResource ( const std::vector< int > &  devIds)
pure virtual

Allocate resource like output buffer pool.

Parameters
[in]devIdsList of device IDs.
Returns
Error status.

Implemented in nvdsinferserver::NetworkPreprocessor, and nvdsinferserver::NetworkPreprocessor.

◆ setTransformIdx() [1/2]

void nvdsinferserver::BasePreprocessor::setTransformIdx ( int  idx)
inline

◆ setTransformIdx() [2/2]

void nvdsinferserver::BasePreprocessor::setTransformIdx ( int  idx)
inline

◆ setUniqueId() [1/2]

void nvdsinferserver::BasePreprocessor::setUniqueId ( int  id)
inline

◆ setUniqueId() [2/2]

void nvdsinferserver::BasePreprocessor::setUniqueId ( int  id)
inline

◆ transform() [1/2]

NvDsInferStatus nvdsinferserver::BasePreprocessor::transform ( SharedBatchArray  src,
SharedCuStream  mainStream,
PreprocessDone  done 
)
inlineoverridevirtual

Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx.

Parameters
[in]srcThe input batch buffer array.
[in]mainStreamThe main processing CUDA stream.
[in]doneThe call function to be called after transformation.
Returns
NVDSINFER_SUCCESS or NVDSINFER_RESOURCE_ERROR.

Implements nvdsinferserver::IPreprocessor.

Definition at line 103 of file 9.0/sources/libs/nvdsinferserver/infer_iprocess.h.

References NVDSINFER_RESOURCE_ERROR, and NVDSINFER_SUCCESS.

◆ transform() [2/2]

NvDsInferStatus nvdsinferserver::BasePreprocessor::transform ( SharedBatchArray  src,
SharedCuStream  mainStream,
PreprocessDone  done 
)
inlineoverridevirtual

Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx.

Parameters
[in]srcThe input batch buffer array.
[in]mainStreamThe main processing CUDA stream.
[in]doneThe call function to be called after transformation.
Returns
NVDSINFER_SUCCESS or NVDSINFER_RESOURCE_ERROR.

Implements nvdsinferserver::IPreprocessor.

Definition at line 103 of file sources/libs/nvdsinferserver/infer_iprocess.h.

References NVDSINFER_RESOURCE_ERROR, and NVDSINFER_SUCCESS.

◆ uniqueId() [1/2]

int nvdsinferserver::BasePreprocessor::uniqueId ( ) const
inline

◆ uniqueId() [2/2]

int nvdsinferserver::BasePreprocessor::uniqueId ( ) const
inline

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