mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Introduced a newStreamSignal() callback for Island Executables
This commit is contained in:
parent
016f9ab16e
commit
cb5921b375
@ -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…
Reference in New Issue
Block a user