OpenCV  4.9.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cv::cann::AscendStream::Impl Class Reference

Warpper of CANN streams. More...

#include <opencv2/cann_call.hpp>

Collaboration diagram for cv::cann::AscendStream::Impl:

Public Member Functions

 Impl ()
 
 Impl (aclrtStream stream)
 
void AddTensorHolder (const std::shared_ptr< uchar > &tensorData)
 

Public Attributes

bool ownStream
 
aclrtStream stream
 
std::set< std::shared_ptr< uchar > > tensorHolders
 Ascend and CANN use stream to implement asynchronous calls. Which means when function returns, operator may not finish, even not start. If caller free any tensors that participate in this operatation, it have a chance to access invalid memory. All tensors should add to holder, holder will be cleaned by waitForCompletion function, or when the stream is destructing.
 

Detailed Description

Warpper of CANN streams.

Constructor & Destructor Documentation

◆ Impl() [1/2]

cv::cann::AscendStream::Impl::Impl ( )

◆ Impl() [2/2]

cv::cann::AscendStream::Impl::Impl ( aclrtStream  stream)
explicit

Member Function Documentation

◆ AddTensorHolder()

void cv::cann::AscendStream::Impl::AddTensorHolder ( const std::shared_ptr< uchar > &  tensorData)

Member Data Documentation

◆ ownStream

bool cv::cann::AscendStream::Impl::ownStream

◆ stream

aclrtStream cv::cann::AscendStream::Impl::stream

◆ tensorHolders

std::set<std::shared_ptr<uchar> > cv::cann::AscendStream::Impl::tensorHolders

Ascend and CANN use stream to implement asynchronous calls. Which means when function returns, operator may not finish, even not start. If caller free any tensors that participate in this operatation, it have a chance to access invalid memory. All tensors should add to holder, holder will be cleaned by waitForCompletion function, or when the stream is destructing.


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