GetSize
Function Usage
Obtains the memory size of the tensor data.
Prototype
1 | size_t GetSize() const |
Parameters
None
Returns
Memory size, in bytes
Constraints
None
Examples
1 2 3 | StorageShape sh({1, 2, 3}, {1, 2, 3}); TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr}; auto td_size = t.GetSize(); // 1*2*3*sizeof(float) = 24; |
Parent topic: TensorV2