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

Method GetRetvals

tensorflow/core/framework/function.cc:992–1004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992Status FunctionCallFrame::GetRetvals(std::vector<Tensor>* rets) const {
993 rets->clear();
994 rets->reserve(rets_.size());
995 for (size_t i = 0; i < rets_.size(); ++i) {
996 const auto& item = rets_[i];
997 if (item.has_val) {
998 rets->push_back(item.val);
999 } else {
1000 return errors::Internal("Retval[", i, "] does not have value");
1001 }
1002 }
1003 return Status::OK();
1004}
1005
1006Status FunctionCallFrame::ConsumeRetvals(std::vector<Tensor>* rets,
1007 bool allow_dead_tensors) {

Callers 4

TESTFunction · 0.80
RunMethod · 0.80
RunFunctionMethod · 0.80

Calls 5

InternalFunction · 0.85
clearMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by 4

TESTFunction · 0.64
RunMethod · 0.64
RunFunctionMethod · 0.64