aclGetViewShape
Function Usage
Obtains the ViewShape of an aclTensor.
ViewShape indicates the logical shape of the aclTensor, which is the size of the tensor required in actual use. If ViewShape is [2, 5, 20], when the operator is used, the aclTensor can be considered as a data block [2, 5, 20].
Prototype
aclnnStatus aclGetViewShape(const aclTensor *tensor, int64_t **viewDims, uint64_t *viewDimsNum)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
tensor |
Input |
Source tensor. The aclTensor must be created by calling the aclCreateTensor API in advance. |
viewDims |
Output |
Dimension value of the viewShape. |
viewDimsNum |
Output |
Number of dimensions of the viewShape. |
Returns
0 on success; else, failure.
Parent topic: Basic APIs