mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #13428 from rgarnov:gapi_add_kernels_pass_stage
This commit is contained in:
commit
4b33910449
@ -16,6 +16,4 @@ namespace util
|
||||
} // namespace util
|
||||
} // namespace cv
|
||||
|
||||
#define UNUSED(x) cv::util::suppress_unused_warning(x)
|
||||
|
||||
#endif /* OPENCV_GAPI_UTIL_COMPILER_HINTS_HPP */
|
||||
|
@ -340,7 +340,7 @@ static void run_arithm_s3(uchar out[], const uchar in[], int width, const uchar
|
||||
v_store_interleave(&out[3*w], x, y, z);
|
||||
}
|
||||
#endif
|
||||
UNUSED(v_op);
|
||||
cv::util::suppress_unused_warning(v_op);
|
||||
for (; w < width; w++)
|
||||
{
|
||||
out[3*w ] = saturate<uchar>( s_op(in[3*w ], scalar[0]) );
|
||||
@ -386,7 +386,7 @@ static void run_arithm_s1(uchar out[], const float in[], int width, const float
|
||||
v_store(&out[w], uc);
|
||||
}
|
||||
#endif
|
||||
UNUSED(v_op);
|
||||
cv::util::suppress_unused_warning(v_op);
|
||||
for (; w < width; w++)
|
||||
{
|
||||
out[w] = saturate<uchar>(s_op(in[w], scalar[0]), std::roundf);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <opencv2/gapi/util/compiler_hints.hpp> //UNUSED
|
||||
#include <opencv2/gapi/util/compiler_hints.hpp> //suppress_unused_warning
|
||||
#include <opencv2/gapi/own/saturate.hpp>
|
||||
|
||||
namespace cv {
|
||||
|
@ -104,11 +104,13 @@ cv::gimpl::GCompiler::GCompiler(const cv::GComputation &c,
|
||||
|
||||
// Remove GCompoundBackend to avoid calling setupBackend() with it in the list
|
||||
m_all_kernels.remove(cv::gapi::compound::backend());
|
||||
m_e.addPass("init", "resolve_kernels", std::bind(passes::resolveKernels, _1,
|
||||
|
||||
m_e.addPassStage("kernels");
|
||||
m_e.addPass("kernels", "resolve_kernels", std::bind(passes::resolveKernels, _1,
|
||||
std::ref(m_all_kernels), // NB: and not copied here
|
||||
lookup_order));
|
||||
m_e.addPass("kernels", "check_islands_content", passes::checkIslandsContent);
|
||||
|
||||
m_e.addPass("init", "check_islands_content", passes::checkIslandsContent);
|
||||
m_e.addPassStage("meta");
|
||||
m_e.addPass("meta", "initialize", std::bind(passes::initMeta, _1, std::ref(m_metas)));
|
||||
m_e.addPass("meta", "propagate", std::bind(passes::inferMeta, _1, false));
|
||||
|
@ -26,7 +26,7 @@ ade::NodeHandle GModel::mkOpNode(GModel::Graph &g, const GKernel &k, const std::
|
||||
ade::NodeHandle op_h = g.createNode();
|
||||
g.metadata(op_h).set(NodeType{NodeType::OP});
|
||||
//These extra empty {} are to please GCC (-Wmissing-field-initializers)
|
||||
g.metadata(op_h).set(Op{k, args, {}, {}, {}});
|
||||
g.metadata(op_h).set(Op{k, args, {}, {}});
|
||||
if (!island.empty())
|
||||
g.metadata(op_h).set(Island{island});
|
||||
return op_h;
|
||||
|
@ -61,7 +61,6 @@ struct Op
|
||||
std::vector<RcDesc> outs; // TODO: Introduce a new type for resource references
|
||||
|
||||
cv::gapi::GBackend backend;
|
||||
util::any opaque;
|
||||
};
|
||||
|
||||
struct Data
|
||||
|
Loading…
Reference in New Issue
Block a user