mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #20184 from sivanov-work:fix_gapi_empty_input
G-API: Add standalone fix for graph empty input * Add sandalone fix for graph empty input * Apply some review comments * Fix whitespace * Apply review comment: make Mat check more deeper * Apply some comments * Remove tracer apply exception throwing * Apply comments: move validatio into gproto_priv.hpp * Apply minor text correction * Fix alignment, remove try-catch
This commit is contained in:
@@ -343,19 +343,26 @@ void cv::gimpl::GCompiler::validateInputMeta()
|
||||
return false; // should never happen
|
||||
};
|
||||
|
||||
GAPI_LOG_DEBUG(nullptr, "Total count: " << m_metas.size());
|
||||
for (const auto meta_arg_idx : ade::util::indexed(ade::util::zip(m_metas, c_expr.m_ins)))
|
||||
{
|
||||
const auto &meta = std::get<0>(ade::util::value(meta_arg_idx));
|
||||
const auto &proto = std::get<1>(ade::util::value(meta_arg_idx));
|
||||
|
||||
const auto index = ade::util::index(meta_arg_idx);
|
||||
GAPI_LOG_DEBUG(nullptr, "Process index: " << index);
|
||||
|
||||
// check types validity
|
||||
if (!meta_matches(meta, proto))
|
||||
{
|
||||
const auto index = ade::util::index(meta_arg_idx);
|
||||
util::throw_error(std::logic_error
|
||||
("GComputation object type / metadata descriptor mismatch "
|
||||
"(argument " + std::to_string(index) + ")"));
|
||||
// FIXME: report what we've got and what we've expected
|
||||
}
|
||||
|
||||
// check value consistency
|
||||
gimpl::proto::validate_input_meta_arg(meta); //may throw
|
||||
}
|
||||
// All checks are ok
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class GAPI_EXPORTS GCompiler
|
||||
cv::gapi::GKernelPackage m_all_kernels;
|
||||
cv::gapi::GNetPackage m_all_networks;
|
||||
|
||||
// Patters built from transformations
|
||||
// Patterns built from transformations
|
||||
std::vector<std::unique_ptr<ade::Graph>> m_all_patterns;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user