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

Function CreateStaticConstTensor

core/lib/static_graph.cpp:462–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462StaticTensor* CreateStaticConstTensor(StaticGraph* graph, const std::string& name)
463{
464 int tensor_idx = graph->tensor_list.size();
465
466 StaticTensorPtr tensor_ptr(new StaticConstTensor());
467
468 tensor_ptr->index = tensor_idx;
469 tensor_ptr->name = name;
470 tensor_ptr->type = kConstTensor;
471
472 graph->tensor_list.push_back(tensor_ptr);
473
474 graph->const_tensor_map[name] = tensor_ptr;
475
476 return dynamic_cast<StaticTensor*>(tensor_ptr.get());
477}
478
479void* GetConstTensorBuffer(StaticTensor* tensor)
480{

Callers 15

LoadTensorMethod · 0.85
LoadTensorMethod · 0.85
LoadCaffeBlobFunction · 0.85
CreatePresetNodeFunction · 0.85
LoadLiteTensorMethod · 0.85
LoadConstTensorMethod · 0.85
LoadMxnetEltScalarFunction · 0.85
LoadConstTensorFunction · 0.85
CreatePresetNodeFunction · 0.85
LoadLSTMInitStateFunction · 0.85
LoadGRUInitStateFunction · 0.85
LoadRNNInitStateFunction · 0.85

Calls 2

getMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected