MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / TensorTupleIndex4ArgNameAndIndex

Method TensorTupleIndex4ArgNameAndIndex

oneflow/core/framework/arg_tuple.cpp:58–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58int32_t ArgTuple::TensorTupleIndex4ArgNameAndIndex(const std::string& name, int32_t index) const {
59 const auto& map = arg_name2bn_index2tensor_tuple_index_;
60 const auto& iter = map.find(name);
61 if (iter == map.end()) { return -1; }
62 const auto& vec = iter->second;
63 return vec.at(index);
64}
65
66} // namespace oneflow

Calls 3

findMethod · 0.80
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected