OutputTensorInfo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | struct OutputTensorInfo { uint32_t data_type{}; // data type std::vector<int64_t> dims; // shape description std::unique_ptr<uint8_t[]> data; // tensor data int64_t length{}; // tensor length OutputTensorInfo() : dims({}), data(nullptr) {} OutputTensorInfo(OutputTensorInfo &&out) noexcept = default; OutputTensorInfo &operator=(OutputTensorInfo &&out)& noexcept { if (this != &out) { data_type = out.data_type; dims = out.dims; data = std::move(out.data); length = out.length; } return *this; } OutputTensorInfo(const OutputTensorInfo &) = delete; OutputTensorInfo &operator=(const OutputTensorInfo &)& = delete; }; |
父主题: 数据类型