MCPcopy Create free account
hub / github.com/OAID/Tengine / OnNodeInputTensorReady

Method OnNodeInputTensorReady

executor/lib/graph_task.cpp:767–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765}
766
767void SubgraphTask::OnNodeInputTensorReady(Node* node, int input_idx, bool sync_mode)
768{
769 std::atomic<std::uint64_t>* p_counter;
770 std::uint64_t mask = 1 << input_idx;
771
772 p_counter = GetNodeInputWaitCounter(node);
773
774 std::uint64_t prev_val = p_counter->fetch_sub(mask);
775
776 // if it is the last waited tensor?
777 if((prev_val - mask) == 0)
778 {
779 OnInputNodeReady(node, sync_mode);
780
781 // prepare for next run
782 (*p_counter) = GetNodeInputWaitMask(node);
783 }
784}
785
786void SubgraphTask::OnInputNodeReady(Node* node, bool sync_mode)
787{

Callers 1

OnOutputNodeDoneMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected