GetLength
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the data length of the LocalTensor.
Prototype
1 | __aicore__ inline uint32_t GetLength() const |
Parameters
None
Returns
Data length of the LocalTensor, in bytes.
Restrictions
None
Examples
1 2 3 4 | // Obtain the length (in bytes) of localTensor. The data type is int32_t. Therefore, the length is 16 × sizeof(int32_t). uint32_t len = inputLocal.GetLength(); // inputLocal:0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // len: 64 |
Parent topic: LocalTensor