mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-29 19:12:30 +08:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user