aclGetScalarListSize
Function
Obtains the size of the aclScalarList created by calling aclCreateScalarList.
Prototype
aclnnStatus aclGetScalarListSize(const aclScalarList *scalarList, uint64_t *size)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
scalarList |
Input |
Source aclScalarList. |
size |
Output |
Size of aclScalarList. |
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, scalarList 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 aclScalarList. std::vector<aclScalar *> tempscalar{alpha1, alpha2}; aclScalarList *scalarList = aclCreateScalarList(tempscalar.data(), tempscalar.size()); ... // Obtain the scalarList size. uint64_t size = 0; auto ret = aclGetScalarListSize(scalarList, &size); // The obtained scalarList size is 2. ... // Destroy the aclScalarList. ret = aclDestroyScalarList(scalarList); |
Parent topic: Basic APIs