cv::AsyncArray Class Reference
核心功能 » 异步 API

Returns result of asynchronous operations. 更多...

#include <opencv2/core/async.hpp>

Public Member Functions

AsyncArray () CV_NOEXCEPT
AsyncArray (const AsyncArray &o) CV_NOEXCEPT
~AsyncArray () CV_NOEXCEPT
void * _getImpl () const CV_NOEXCEPT
void get ( OutputArray dst) const
bool get ( OutputArray dst, int64 timeoutNs) const
bool get ( OutputArray dst, double timeoutNs) const
AsyncArray & operator= (const AsyncArray &o) CV_NOEXCEPT
void release () CV_NOEXCEPT
bool valid () const CV_NOEXCEPT
bool wait_for ( int64 timeoutNs) const
bool wait_for (double timeoutNs) const

Protected Attributes

Impl * p

Friends

struct Impl

详细描述

Returns result of asynchronous operations.

Object has attached asynchronous state. Assignment operator doesn't clone asynchronous state (it is shared between all instances).

Result can be fetched via get() method only once.

范例:
samples/dnn/object_detection.cpp .

Constructor & Destructor Documentation

~AsyncArray()

cv::AsyncArray::~AsyncArray ( )

AsyncArray() [1/2]

cv::AsyncArray::AsyncArray ( )
Python:
<AsyncArray object> = cv.AsyncArray( )

AsyncArray() [2/2]

cv::AsyncArray::AsyncArray ( const AsyncArray & o )
Python:
<AsyncArray object> = cv.AsyncArray( )

成员函数文档编制

_getImpl()

void* cv::AsyncArray::_getImpl ( ) const
inline

get() [1/3]

void cv::AsyncArray::get ( OutputArray dst ) const
Python:
dst = cv.AsyncArray.get( [, dst] )
retval, dst = cv.AsyncArray.get( timeoutNs[, dst] )

Fetch the result.

参数
[out] dst destination array

Waits for result until container has valid result. Throws exception if exception was stored as a result.

Throws exception on invalid container state.

注意
Result or stored exception can be fetched only once.
范例:
samples/dnn/object_detection.cpp .

get() [2/3]

bool cv::AsyncArray::get ( OutputArray dst ,
int64 timeoutNs
) const
Python:
dst = cv.AsyncArray.get( [, dst] )
retval, dst = cv.AsyncArray.get( timeoutNs[, dst] )

Retrieving the result with timeout

参数
[out] dst destination array
[in] timeoutNs timeout in nanoseconds, -1 for infinite wait
返回
true if result is ready, false if the timeout has expired
注意
Result or stored exception can be fetched only once.

get() [3/3]

bool cv::AsyncArray::get ( OutputArray dst ,
double timeoutNs
) const
inline
Python:
dst = cv.AsyncArray.get( [, dst] )
retval, dst = cv.AsyncArray.get( timeoutNs[, dst] )

operator=()

AsyncArray & cv::AsyncArray::operator= ( const AsyncArray & o )

release()

void cv::AsyncArray::release ( )
Python:
None = cv.AsyncArray.release( )

valid()

bool cv::AsyncArray::valid ( ) const
Python:
retval = cv.AsyncArray.valid( )

wait_for() [1/2]

bool cv::AsyncArray::wait_for ( int64 timeoutNs ) const
Python:
retval = cv.AsyncArray.wait_for( timeoutNs )

wait_for() [2/2]

bool cv::AsyncArray::wait_for ( double timeoutNs ) const
inline
Python:
retval = cv.AsyncArray.wait_for( timeoutNs )

Friends And Related Function Documentation

Impl

friend struct Impl
friend

Member Data Documentation

p

Impl * cv::AsyncArray::p
protected

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