aclGetTensorListSize
Function
Obtains the size of the aclTensorList created by calling aclCreateTensorList.
Prototype
aclnnStatus aclGetTensorListSize(const aclTensorList *tensorList, uint64_t *size)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
tensorList |
Input |
Source aclTensorList. |
size |
Output |
Size of the aclTensorList. |
Returns
0 on success; otherwise, failure. For details about the return codes, see Common APIs and Return Codes.
Possible causes:
- If error code 161001 is returned, tensorList or size is a null pointer.
Constraints
None
Call Example
The following sample code is for reference only. Do not copy and run it.
1 2 3 4 5 6 7 8 9 10 | // Create an aclTensorList. std::vector<aclTensor *> tmp{input1, input2}; aclTensorList* tensorList = aclCreateTensorList(tmp.data(), tmp.size()); ... // Obtain the tensorList size. uint64_t size = 0; auto ret = aclGetTensorListSize(tensorList, &size); // The obtained size of the tensorList is 2. ... // Destroy the aclTensorList. ret = aclDestroyTensorList(tensorList); |
Parent topic: Basic APIs