mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #20119 from TolyaTalamanov:at/compile-arg-for-queue-capacity
* Support queue capacity as graph compilation argument * Fix comments to review * Fix comments to review * Fix comments to review
This commit is contained in:
committed by
GitHub
parent
1e1ddd3279
commit
b67c0e5f4a
@@ -195,6 +195,14 @@ private:
|
||||
|
||||
using GCompileArgs = std::vector<GCompileArg>;
|
||||
|
||||
inline cv::GCompileArgs& operator += ( cv::GCompileArgs &lhs,
|
||||
const cv::GCompileArgs &rhs)
|
||||
{
|
||||
lhs.reserve(lhs.size() + rhs.size());
|
||||
lhs.insert(lhs.end(), rhs.begin(), rhs.end());
|
||||
return lhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Wraps a list of arguments (a parameter pack) into a vector of
|
||||
* compilation arguments (cv::GCompileArg).
|
||||
|
||||
@@ -371,6 +371,31 @@ protected:
|
||||
};
|
||||
/** @} */
|
||||
|
||||
namespace gapi {
|
||||
namespace streaming {
|
||||
/**
|
||||
* @brief Specify queue capacity for streaming execution.
|
||||
*
|
||||
* In the streaming mode the pipeline steps are connected with queues
|
||||
* and this compile argument controls every queue's size.
|
||||
*/
|
||||
struct GAPI_EXPORTS queue_capacity
|
||||
{
|
||||
explicit queue_capacity(size_t cap = 1) : capacity(cap) { };
|
||||
size_t capacity;
|
||||
};
|
||||
/** @} */
|
||||
} // namespace streaming
|
||||
} // namespace gapi
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template<> struct CompileArgTag<cv::gapi::streaming::queue_capacity>
|
||||
{
|
||||
static const char* tag() { return "gapi.queue_capacity"; }
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // OPENCV_GAPI_GSTREAMING_COMPILED_HPP
|
||||
|
||||
Reference in New Issue
Block a user