AllocBoolArray

Function Usage

Allocates an aclBoolArray and initializes it with the value in the specified memory.

Prototype

aclBoolArray *AllocBoolArray(const bool *value, uint64_t size)

Parameters

Parameter

Input/Output

Description

value

Input

Source data, which is used to initialize aclBoolArray.

size

Input

Number of elements in the source data.

Returns

Success: allocated aclBoolArray object. Failure: nullptr.

Constraints

The input parameter pointer must not be null.

Example

1
2
3
4
5
// Allocate an aclBoolArray whose length is 10.
void Func(aclOpExecutor *executor) {
    bool myArray[10];
    aclBoolArray *array = executor->AllocBoolArray(myArray, 10);
}