OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
cv::AsyncArray Class Reference

Returns result of asynchronous operations. More...

#include <opencv2/core/async.hpp>

Collaboration diagram for cv::AsyncArray:

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
 Fetch the result. More...
 
bool get (OutputArray dst, int64 timeoutNs) const
 Retrieving the result with timeout. More...
 
bool get (OutputArray dst, double timeoutNs) const
 
AsyncArrayoperator= (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

Implp
 

Friends

struct Impl
 

Detailed Description

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.

Examples:
samples/dnn/object_detection.cpp.

Constructor & Destructor Documentation

◆ ~AsyncArray()

cv::AsyncArray::~AsyncArray ( )

◆ AsyncArray() [1/2]

cv::AsyncArray::AsyncArray ( )

◆ AsyncArray() [2/2]

cv::AsyncArray::AsyncArray ( const AsyncArray o)

Member Function Documentation

◆ _getImpl()

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

◆ get() [1/3]

void cv::AsyncArray::get ( OutputArray  dst) const

Fetch the result.

Parameters
[out]dstdestination array

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

Throws exception on invalid container state.

Note
Result or stored exception can be fetched only once.
Examples:
samples/dnn/object_detection.cpp.

◆ get() [2/3]

bool cv::AsyncArray::get ( OutputArray  dst,
int64  timeoutNs 
) const

Retrieving the result with timeout.

Parameters
[out]dstdestination array
[in]timeoutNstimeout in nanoseconds, -1 for infinite wait
Returns
true if result is ready, false if the timeout has expired
Note
Result or stored exception can be fetched only once.

◆ get() [3/3]

bool cv::AsyncArray::get ( OutputArray  dst,
double  timeoutNs 
) const
inline

References CV_WRAP.

◆ operator=()

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

◆ release()

void cv::AsyncArray::release ( )

◆ valid()

bool cv::AsyncArray::valid ( ) const

◆ wait_for() [1/2]

bool cv::AsyncArray::wait_for ( int64  timeoutNs) const

◆ wait_for() [2/2]

bool cv::AsyncArray::wait_for ( double  timeoutNs) const
inline

References CV_NOEXCEPT, CV_WRAP, p, cv::swap(), and wait_for().

Referenced by wait_for().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Impl

friend struct Impl
friend

Member Data Documentation

◆ p

Impl* cv::AsyncArray::p
protected

Referenced by wait_for().


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