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

Method AddTensors

tensorflow/lite/core/subgraph.cc:891–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891TfLiteStatus Subgraph::AddTensors(int tensors_to_add,
892 int* first_new_tensor_index) {
893 const size_t base_index = tensors_.size();
894 if (first_new_tensor_index) *first_new_tensor_index = base_index;
895 tensors_.resize(tensors_.size() + tensors_to_add);
896 for (size_t i = base_index; i < tensors_.size(); i++) {
897 memset(&tensors_[i], 0, sizeof(tensors_[i]));
898 tensors_[i].buffer_handle = kTfLiteNullBufferHandle;
899 }
900 context_.tensors = tensors_.data();
901 context_.tensors_size = tensors_.size();
902 return kTfLiteOk;
903}
904
905TfLiteStatus Subgraph::AddTensors(TfLiteContext* context, int tensors_to_add,
906 int* first_new_tensor_index) {

Callers 15

InitFunction · 0.45
InitFunction · 0.45
InitTemporaryTensorsFunction · 0.45
InitFunction · 0.45
ConstructGraphMethod · 0.45
InitFunction · 0.45
BuildAddSubgraphMethod · 0.45
BuildMulSubgraphMethod · 0.45
BuildPadSubgraphMethod · 0.45
BuildIfSubgraphMethod · 0.45

Calls 3

sizeMethod · 0.45
resizeMethod · 0.45
dataMethod · 0.45

Tested by 10

ConstructGraphMethod · 0.36
BuildAddSubgraphMethod · 0.36
BuildMulSubgraphMethod · 0.36
BuildPadSubgraphMethod · 0.36
BuildIfSubgraphMethod · 0.36
BuildWhileSubgraphMethod · 0.36
TESTFunction · 0.36