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

Method GetTensorData

core/lib/graph_executor.cpp:464–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464bool GraphExecutor::GetTensorData(Tensor* tensor, void* output_data, int data_size)
465{
466 int tensor_size = tensor->GetTotalSize();
467
468 if(tensor_size != data_size)
469 return false;
470
471 void* tensor_addr = GetTensorBuffer(tensor);
472
473 if(tensor_addr == nullptr)
474 return false;
475
476 std::memcpy(output_data, tensor_addr, data_size);
477
478 return true;
479}
480
481static int MapExecStatus(int internal)
482{

Callers

nothing calls this directly

Calls 1

GetTotalSizeMethod · 0.80

Tested by

no test coverage detected