AllocFloatArray
Function Usage
Allocates an aclFloatArray and initializes it with the value in the specified memory.
Prototype
aclFloatArray *AllocFloatArray(const float *value, uint64_t size)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
value |
Input |
Source data, which is used to initialize aclFloatArray. |
size |
Input |
Number of elements in the source data. |
Returns
Success: allocated aclFloatArray object. Failure: nullptr.
Constraints
The input parameter pointer must not be null.
Example
1 2 3 4 5 | // Allocate an aclFloatArray whose length is 10. void Func(aclOpExecutor *executor) { float myArray[10]; aclFloatArray *array = executor->AllocFloatArray(myArray, 10); } |
Parent topic: op_executor