Unify the data type of tensor shape (#74)

int32_t->int64_t
This commit is contained in:
Jack Zhou
2022-08-08 14:02:56 +08:00
committed by GitHub
parent 0587c4bbac
commit 32c2154bbe
3 changed files with 10 additions and 16 deletions

View File

@@ -59,13 +59,14 @@ struct FASTDEPLOY_DECL FDTensor {
// Set user memory buffer for Tensor, the memory is managed by
// the user it self, but the Tensor will share the memory with user
// So take care with the user buffer
void SetExternalData(const std::vector<int>& new_shape,
void SetExternalData(const std::vector<int64_t>& new_shape,
const FDDataType& data_type, void* data_buffer);
// Initialize Tensor
// Include setting attribute for tensor
// and allocate cpu memory buffer
void Allocate(const std::vector<int>& new_shape, const FDDataType& data_type,
void Allocate(const std::vector<int64_t>& new_shape,
const FDDataType& data_type,
const std::string& tensor_name = "");
// Total size of tensor memory buffer in bytes