| 460 | } |
| 461 | |
| 462 | StaticTensor* 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 | |
| 479 | void* GetConstTensorBuffer(StaticTensor* tensor) |
| 480 | { |
no test coverage detected