MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RunShortCircuit

Function RunShortCircuit

tensorflow/core/kernels/data/captured_function.cc:110–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108};
109
110Status RunShortCircuit(const ShortCircuitInfo& info,
111 const std::vector<Tensor>& args,
112 const CapturedFunction* const func,
113 std::vector<Tensor>* rets) {
114 VLOG(3) << "Running function " << func->func().name() << " short circuit";
115 size_t num_args = args.size();
116 for (size_t i = 0; i < info.indices.size(); ++i) {
117 if (info.indices[i] < num_args) {
118 rets->push_back(args[info.indices[i]]);
119 } else {
120 rets->push_back(func->captured_inputs()[info.indices[i] - num_args]);
121 }
122 }
123 return Status::OK();
124}
125
126Status RunShortCircuit(const ShortCircuitInfo& info, std::vector<Tensor>&& args,
127 const CapturedFunction* const func,

Callers 4

RunMethod · 0.85
RunWithBorrowedArgsMethod · 0.85
RunInstantiatedMethod · 0.85
RunAsyncMethod · 0.85

Calls 5

nameMethod · 0.65
funcMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
captured_inputsMethod · 0.45

Tested by

no test coverage detected