Data Structures
This chapter provides the basic data structures required for calling CANN operator APIs. Developers do not need to focus on their internal implementation and can use them directly.
Note: These basic data structures can be created through the "public interfaces" in Operator Acceleration Library, such as aclCreateTensor.
aclTensor
A structure defined by the framework for managing and storing tensor data (such as vectors, matrices, and other multi-dimensional data). This object can be created through the aclCreateTensor interface.
typedef struct aclTensor aclTensoraclScalar
A framework-defined structure for managing and storing scalar data (i.e., a single numeric value). The object can be created through the aclCreateScalar interface.
typedef struct aclScalar aclScalaraclIntArray
A framework-defined array structure for managing and storing integer data. The object can be created through the aclCreateIntArray interface.
typedef struct aclIntArray aclIntArrayaclFloatArray
An array structure defined by the framework for managing and storing float32 data. This object can be created through the aclCreateFloatArray interface.
typedef struct aclFloatArray aclFloatArrayaclBoolArray
An array structure defined by the framework for managing and storing Boolean data. This object can be created through the aclCreateBoolArray interface.
typedef struct aclBoolArray aclBoolArrayaclTensorList
An array structure defined by the framework for managing and storing multiple tensor data. This object can be created through the aclCreateTensorList interface.
typedef struct aclTensorList aclTensorListaclScalarList
An array structure defined by the framework for managing and storing scalar data. This object can be created through the aclCreateScalarList interface.
typedef struct aclScalarList aclScalarListaclOpExecutor
An executor data structure defined by the framework, serving as a container for executing operator computations.
Typically, when calling the one-stage operator interface aclxxXxxGetWorkspaceSize, the framework automatically creates an aclOpExecutor; after calling the two-stage interface aclxxXxx, the object is automatically released.
typedef struct aclOpExecutor aclOpExecutoraclrtStream
A stream processing data structure defined by the framework, used to manage and maintain the execution order of some asynchronous operations.
typedef void *aclrtStream