aclGetBoolArraySize
Function Usage
Obtains the size of the aclBoolArray created by calling aclCreateBoolArray.
Prototype
aclnnStatus aclGetBoolArraySize(const aclBoolArray *array, uint64_t *size)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
array |
Input |
Source aclBoolArray. |
size |
Output |
Size of the aclBoolArray. |
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, array 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 aclBoolArray. std::vector<bool> maskData = {true, false}; aclBoolArray *mask = aclCreateBoolArray(maskData.data(), maskData.size()); ... //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