| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
cv::cann::AscendStream Class Reference
Ascend-accelerated Computer Vision » Core part » Data Structures

In AscendCL Stream(AscendStream) is a task queue. Stream is used to manage the parallelism of tasks. The tasks inside a Stream are executed sequentially, that is, the Stream executes sequentially according to the sent tasks; the tasks in different Streams are executed in parallel. More...

`#include <opencv2/cann.hpp>`

Collaboration diagram for cv::cann::AscendStream:

## Classes
class | Impl
| Warpper of CANN streams. More...

## Public Member Functions
| AscendStream ()
void | addTensorHolder (const std::shared_ptr< uchar > &holder)
void | waitAscendEvent (const cv::cann::AscendEvent &event)
| blocks the current CPU thread until event trigger.
void | waitForCompletion ()
| blocks the current CPU thread until all operations in the stream are complete.

## Static Public Member Functions
static AscendStream & | Null ()
| return default AscendStream object for default Acl stream.

## Friends
class | AscendStreamAccessor
class | DefaultDeviceInitializer

## Detailed Description

In AscendCL Stream(AscendStream) is a task queue. Stream is used to manage the parallelism of tasks. The tasks inside a Stream are executed sequentially, that is, the Stream executes sequentially according to the sent tasks; the tasks in different Streams are executed in parallel.

All Non-blocking functions should pass parameter stream, These function returns immediately after the task is submitted. Caller should wait stream until completion.

Blocking functions implicityly use the default stream, and synchronize stream before function return.

See also
  cuda::Stream

## Constructor & Destructor Documentation

## ◆ AscendStream()

cv::cann::AscendStream::AscendStream | ( |  | ) |

## Member Function Documentation

## ◆ addTensorHolder()

void cv::cann::AscendStream::addTensorHolder | ( | const std::shared_ptr< uchar > & | holder | ) |

## ◆ Null()

static AscendStream & cv::cann::AscendStream::Null | ( |  | ) |
| static

return default AscendStream object for default Acl stream.

## ◆ waitAscendEvent()

void cv::cann::AscendStream::waitAscendEvent | ( | const cv::cann::AscendEvent & | event | ) |

blocks the current CPU thread until event trigger.

## ◆ waitForCompletion()

void cv::cann::AscendStream::waitForCompletion | ( |  | ) |

blocks the current CPU thread until all operations in the stream are complete.

## Friends And Related Symbol Documentation

## ◆ AscendStreamAccessor

friend class AscendStreamAccessor
| friend

## ◆ DefaultDeviceInitializer

friend class DefaultDeviceInitializer
| friend

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

- opencv2/cann.hpp