aclGetScalarListSize
Function Usage
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; else, 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
Examples
The following code examples are for reference only and are not intended for direct copying and execution:
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 size of the scalarList. uint64_t size = 0; auto ret = aclGetScalarListSize(scalarList, &size); // The obtained size of the scalarList is 2. ... //Destroy the aclScalarList. ret = aclDestroyScalarList(scalarList); |
Parent topic: Common APIs