Class cv::dnn::BackendWrapper#

Derivatives of this class wraps cv::Mat for different backends and targets.

Collaboration diagram for cv::dnn::BackendWrapper:

Detailed Description#

Derivatives of this class wraps cv::Mat for different backends and targets.

Constructor & Destructor Documentation#

BackendWrapper()#

cv::dnn::BackendWrapper::BackendWrapper(
const Ptr< BackendWrapper > & base,
const MatShape & shape )

Make wrapper for reused cv::Mat.

Initialize wrapper from another one. It’ll wrap the same host CPU memory and mustn’t allocate memory on device(i.e. GPU). It might has different shape. Use in case of CPU memory reusing for reuse associated memory on device too.

Parameters

  • base — Wrapper of cv::Mat that will be reused.

  • shape — Specific shape.

BackendWrapper()#

cv::dnn::BackendWrapper::BackendWrapper(
int backendId,
int targetId )

BackendWrapper()#

cv::dnn::BackendWrapper::BackendWrapper(
int targetId,
const cv::Mat & m )

Wrap cv::Mat for specific backend and target.

Make CPU->GPU data transfer if it’s require for the target.

Parameters

  • targetId — Target identifier.

  • mcv::Mat for wrapping.

~BackendWrapper()#

cv::dnn::BackendWrapper::~BackendWrapper()

Virtual destructor to make polymorphism.

Member Function Documentation#

copyToHost()#

void cv::dnn::BackendWrapper::copyToHost()

Transfer data to CPU host memory.

getHostMatDepth()#

int cv::dnn::BackendWrapper::getHostMatDepth()

setHostDirty()#

void cv::dnn::BackendWrapper::setHostDirty()

Indicate that an actual data is on CPU.

Member Data Documentation#

backendId#

int cv::dnn::BackendWrapper::backendId

Backend identifier.

targetId#

int cv::dnn::BackendWrapper::targetId

Target identifier.

hostMatDepth#

int cv::dnn::BackendWrapper::hostMatDepth = -1

Source file#

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