| 48 | ffi::Tensor Alloc1DTensor(std::initializer_list<float> data) { |
| 49 | struct CPUAllocator { |
| 50 | void AllocData(DLTensor* tensor) { |
| 51 | tensor->data = std::malloc(tensor->shape[0] * sizeof(float)); |
| 52 | } |
| 53 | void FreeData(DLTensor* tensor) { std::free(tensor->data); } |
| 54 | }; |
| 55 | DLDataType f32 = DLDataType({kDLFloat, 32, 1}); |
nothing calls this directly
no outgoing calls
no test coverage detected