mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Async API for GAPI
- minor cosmetic changes : comments, typos
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#ifndef OPENCV_GAPI_GCOMPILED_ASYNC_HPP
|
||||
#define OPENCV_GAPI_GCOMPILED_ASYNC_HPP
|
||||
|
||||
#include <future>
|
||||
#include <future> //for std::future
|
||||
#include <exception> //for std::exception_ptr
|
||||
#include <functional> //for std::function
|
||||
#include "opencv2/gapi/garg.hpp"
|
||||
@@ -19,6 +19,9 @@ namespace cv {
|
||||
|
||||
namespace gapi{
|
||||
namespace wip {
|
||||
//These functions asynchronously (i.e. probably on a separate thread of execution) call operator() member function of their first argument with copies of rest of arguments (except callback) passed in.
|
||||
//The difference between the function is the way to get the completion notification (via callback or a waiting on std::future object)
|
||||
//If exception is occurred during execution of apply it is transfered to the callback (via function parameter) or passed to future (and will be thrown on call to std::future::get)
|
||||
GAPI_EXPORTS void async(GCompiled& gcmpld, std::function<void(std::exception_ptr)>&& callback, GRunArgs &&ins, GRunArgsP &&outs);
|
||||
GAPI_EXPORTS std::future<void> async(GCompiled& gcmpld, GRunArgs &&ins, GRunArgsP &&outs);
|
||||
} // namespace gapi
|
||||
|
||||
@@ -19,6 +19,9 @@ namespace cv {
|
||||
class GComputation;
|
||||
namespace gapi {
|
||||
namespace wip {
|
||||
//These functions asynchronously (i.e. probably on a separate thread of execution) call apply member function of their first argument with copies of rest of arguments (except callback) passed in.
|
||||
//The difference between the function is the way to get the completion notification (via callback or a waiting on std::future object)
|
||||
//If exception is occurred during execution of apply it is transfered to the callback (via function parameter) or passed to future (and will be thrown on call to std::future::get)
|
||||
GAPI_EXPORTS void async_apply(GComputation& gcomp, std::function<void(std::exception_ptr)>&& callback, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args = {});
|
||||
GAPI_EXPORTS std::future<void> async_apply(GComputation& gcomp, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args = {});
|
||||
} // nmaepspace gapi
|
||||
|
||||
Reference in New Issue
Block a user