mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Implement asynchronous execution for islands
This commit is contained in:
committed by
Ruslan Garnov
parent
cb5921b375
commit
b1f42a6506
@@ -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!"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,13 @@ GAPI_EXPORTS const GOrigin& origin_of (const GArg &arg);
|
||||
bool is_dynamic(const GArg &arg);
|
||||
GProtoArg rewrap (const GArg &arg);
|
||||
|
||||
const void* ptr (const GRunArgP &arg);
|
||||
|
||||
} // proto
|
||||
} // gimpl
|
||||
} // cv
|
||||
|
||||
// FIXME: the gproto.cpp file has more functions that listed here
|
||||
// where those are declared??
|
||||
|
||||
#endif // OPENCV_GAPI_GPROTO_PRIV_HPP
|
||||
|
||||
Reference in New Issue
Block a user