1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #15238 from andrey-golubev:fluid_fix_journal

G-API: Fix Journal usage in Fluid backend (#15238)

* Fix Journal usage in Fluid backend

* Delete dumpDotRequired(): invalid check

* Update mem consumption test

* Test that new test works

* Debug memory consumption function

* Increase iterations in test

* Re-write memory consumption measurement part

* Restore correct fix for Fluid journals
This commit is contained in:
Andrey Golubev
2019-08-14 10:03:52 +03:00
committed by Alexander Alekhin
parent f7f2438478
commit f6bb900259
4 changed files with 71 additions and 0 deletions
@@ -943,6 +943,8 @@ namespace
fd.skew = 0;
fd.max_consumption = 0;
}
GModel::log_clear(g, node);
}
}
+10
View File
@@ -185,6 +185,16 @@ void GModel::log(Graph &g, ade::EdgeHandle eh, std::string &&msg, ade::NodeHandl
}
}
void GModel::log_clear(Graph &g, ade::NodeHandle node)
{
if (g.metadata(node).contains<Journal>())
{
// according to documentation, clear() doesn't deallocate (__capacity__ of vector preserved)
g.metadata(node).get<Journal>().messages.clear();
}
}
ade::NodeHandle GModel::detail::dataNodeOf(const ConstLayoutGraph &g, const GOrigin &origin)
{
// FIXME: Does it still work with graph transformations, e.g. redirectWriter()??
+2
View File
@@ -226,6 +226,8 @@ namespace GModel
// appear in the dumped .dot file.x
GAPI_EXPORTS void log(Graph &g, ade::NodeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle());
GAPI_EXPORTS void log(Graph &g, ade::EdgeHandle op, std::string &&message, ade::NodeHandle updater = ade::NodeHandle());
// Clears logged messages of a node.
GAPI_EXPORTS void log_clear(Graph &g, ade::NodeHandle node);
GAPI_EXPORTS void linkIn (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t in_port);
GAPI_EXPORTS void linkOut (Graph &g, ade::NodeHandle op, ade::NodeHandle obj, std::size_t out_port);