cv::cuda::Stream Class ReferenceCUDA-accelerated Computer Vision » Core part » Data Structures
This class encapsulates a queue of asynchronous calls. More...
#include <opencv2/core/cuda.hpp>
This class encapsulates a queue of asynchronous calls. More...
#include <opencv2/core/cuda.hpp>
| typedef void(*) | StreamCallback(int status, void *userData) |
Public Member Functions | |
| Stream () | |
| creates a new asynchronous stream | |
| Stream (const Ptr< GpuMat::Allocator > &allocator) | |
| creates a new asynchronous stream with custom allocator | |
| Stream (const size_t cudaFlags) | |
| creates a new Stream using the cudaFlags argument to determine the behaviors of the stream | |
| void * | cudaPtr () const |
| return Pointer to CUDA stream | |
| void | enqueueHostCallback (StreamCallback callback, void *userData) |
| Adds a callback to be called on the host after all currently enqueued items in the stream have completed. | |
| operator bool_type () const | |
| returns true if stream object is not default (!= 0) | |
| bool | queryIfComplete () const |
| Returns true if the current stream queue is finished. Otherwise, it returns false. | |
| void | waitEvent (const Event &event) |
| Makes a compute stream wait on an event. | |
| void | waitForCompletion () |
| Blocks the current CPU thread until all operations in the stream are complete. | |
Friends | |
| class | BufferPool |
| class | DefaultDeviceInitializer |
| struct | StreamAccessor |
This class encapsulates a queue of asynchronous calls.
void thread1()
{
cv::cuda::Stream stream1;
cv::cuda::func1(..., stream1);
}
void thread2()
{
cv::cuda::Stream stream2;
cv::cuda::func2(..., stream2);
}| void(*) cv::cuda::Stream::StreamCallback(int status, void *userData) |
| cv::cuda::Stream::Stream | ( | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream( | ) -> | <cuda_Stream object> | ||
| cv.cuda.Stream( | allocator | ) -> | <cuda_Stream object> | |
| cv.cuda.Stream( | cudaFlags | ) -> | <cuda_Stream object> |
creates a new asynchronous stream
| cv::cuda::Stream::Stream | ( | const Ptr< GpuMat::Allocator > & | allocator | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream( | ) -> | <cuda_Stream object> | ||
| cv.cuda.Stream( | allocator | ) -> | <cuda_Stream object> | |
| cv.cuda.Stream( | cudaFlags | ) -> | <cuda_Stream object> |
creates a new asynchronous stream with custom allocator
| cv::cuda::Stream::Stream | ( | const size_t | cudaFlags | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream( | ) -> | <cuda_Stream object> | ||
| cv.cuda.Stream( | allocator | ) -> | <cuda_Stream object> | |
| cv.cuda.Stream( | cudaFlags | ) -> | <cuda_Stream object> |
creates a new Stream using the cudaFlags argument to determine the behaviors of the stream
| void * cv::cuda::Stream::cudaPtr | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream.cudaPtr( | ) -> | retval |
return Pointer to CUDA stream
| void cv::cuda::Stream::enqueueHostCallback | ( | StreamCallback | callback, |
| void * | userData ) |
Adds a callback to be called on the host after all currently enqueued items in the stream have completed.
| cv::cuda::Stream::operator bool_type | ( | ) | const |
returns true if stream object is not default (!= 0)
| bool cv::cuda::Stream::queryIfComplete | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream.queryIfComplete( | ) -> | retval |
Returns true if the current stream queue is finished. Otherwise, it returns false.
| void cv::cuda::Stream::waitEvent | ( | const Event & | event | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream.waitEvent( | event | ) -> | None |
Makes a compute stream wait on an event.
| void cv::cuda::Stream::waitForCompletion | ( | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.Stream.waitForCompletion( | ) -> | None |
Blocks the current CPU thread until all operations in the stream are complete.
| friend |
| friend |
| friend |