aclGetBoolArraySize
Description
Obtains the size of the aclBoolArray created by calling aclCreateBoolArray.
Prototype
aclnnStatus aclGetBoolArraySize(const aclBoolArray *array, uint64_t *size)
Parameter Description
Parameter |
Input/Output |
Description |
|---|---|---|
array |
Input |
Source aclBoolArray. |
size |
Output |
Size of an aclBoolArray. |
Return Value
0 on success; otherwise, failure. For details about the return codes, see Common API Return Codes.
Possible causes:
- Error code 161001: array or size is a null pointer.
Constraints
None.
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 aclBoolArray. bool maskData[] = {true, false}; aclBoolArray *mask = aclCreateBoolArray(maskData, sizeof(maskData) / sizeof(maskData[0])); ... // Obtain the mask size by calling aclGetBoolArraySize. uint64_t size = 0; auto ret = aclGetBoolArraySize(mask, &size); // The obtained mask size is 2. ... // Destroy the aclBoolArray. ret = aclDestroyBoolArray(mask); |
Parent topic: Common APIs