Introduced a newStreamSignal() callback for Island Executables

pull/17000/head
Dmitry Matveev 5 years ago committed by Ruslan Garnov
parent 016f9ab16e
commit cb5921b375
  1. 18
      modules/gapi/src/compiler/gislandmodel.hpp
  2. 1
      modules/gapi/src/executor/gstreamingexecutor.cpp

@ -123,6 +123,24 @@ public:
virtual bool canReshape() const = 0;
virtual void reshape(ade::Graph& g, const GCompileArgs& args) = 0;
// This method is called when the GStreamingCompiled gets a new
// input source to process. Normally this method is called once
// per stream execution.
//
// The idea of this method is to reset backend's stream-associated
// internal state, if there is any.
//
// The regular GCompiled invocation doesn't call this, there may
// be reset() introduced there but it is completely unnecessary at
// this moment.
//
// FIXME: The design on this and so-called "stateful" kernels is not
// closed yet.
// FIXME: This thing will likely break stuff once we introduce
// "multi-source streaming", a better design needs to be proposed
// at that stage.
virtual void handleNewStream() {}; // do nothing here by default
virtual ~GIslandExecutable() = default;
};

@ -859,6 +859,7 @@ void cv::gimpl::GStreamingExecutor::setSource(GRunArgs &&ins)
for (auto &&out_eh : op.nh->outNodes()) {
out_queues.push_back(reader_queues(*m_island_graph, out_eh));
}
op.isl_exec->handleNewStream();
m_threads.emplace_back(islandActorThread,
op.in_objects,

Loading…
Cancel
Save