1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Implement asynchronous execution for islands

This commit is contained in:
Dmitry Matveev
2020-03-17 11:55:05 +03:00
committed by Ruslan Garnov
parent cb5921b375
commit b1f42a6506
9 changed files with 277 additions and 136 deletions
+24
View File
@@ -264,4 +264,28 @@ std::ostream& operator<<(std::ostream& os, const cv::GMetaArg &arg)
return os;
}
} // namespace cv
// TODO: This function requires thorough testing
const void* cv::gimpl::proto::ptr(const GRunArgP &arg)
{
switch (arg.index())
{
#if !defined(GAPI_STANDALONE)
case GRunArgP::index_of<cv::Mat*>():
return static_cast<const void*>(cv::util::get<cv::Mat*>(arg));
case GRunArgP::index_of<cv::Scalar*>():
return static_cast<const void*>(cv::util::get<cv::Scalar*>(arg));
case GRunArgP::index_of<cv::UMat*>():
return static_cast<const void*>(cv::util::get<cv::UMat*>(arg));
#endif
case GRunArgP::index_of<cv::gapi::own::Mat*>():
return static_cast<const void*>(cv::util::get<cv::gapi::own::Mat*>(arg));
case GRunArgP::index_of<cv::detail::VectorRef>():
return cv::util::get<cv::detail::VectorRef>(arg).ptr();
case GRunArgP::index_of<cv::detail::OpaqueRef>():
return cv::util::get<cv::detail::OpaqueRef>(arg).ptr();
default:
util::throw_error(std::logic_error("Unknown GRunArgP type!"));
}
}