CalcTotalSize
Description
Calculate the memory space occupied by the TilingData instance based on the maximum capacity.
Prototype
static ge::graphStatus CalcTotalSize(const size_t cap_size, size_t &total_size)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
cap_size |
Input |
Maximum capacity, in bytes. |
total_size |
Output |
Memory space, in bytes. |
Returns
- ge::GRAPH_SUCCESS on success.
- ge::GRAPH_FAILED on failure.
Restrictions
None
Example
auto td_buf = TilingData::CreateCap(100U); auto td = reinterpret_cast<TilingData *>(td_buf.get()); size_t total_size = 0U; auto ret = td->CalcTotalSize(td.GetCapacity, total_size); // total_size = 100 + sizeof(TilingData)
Parent topic: TilingData