Csrot
Applicable Products
|
Hardware Model |
Supported or Not |
|---|---|
|
|
Not supported |
|
|
Not supported |
|
|
Not supported |
|
|
Supported |
|
|
Supported |
Function Description
API function
- asdBlasMakeRotPlan: initializes the Csrot operator configuration corresponding to the handle.
- asdBlasCsrot: rotates the input complex vector group (x, y).
Formula:
- asdBlasCsrot formula:


c is the cosine value of the rotation angle, s is the sine value of the rotation angle, and x and y are complex vectors.
Function Prototype
- AspbStatus asdBlasMakeRotPlan(asdBlasHandle handle)
- AspbStatus asdBlasCsrot(asdBlasHandle handle, const int64_t n, aclTensor *x, const int64_t incx, aclTensor *y,const int64_t incy, const float *c, const float *s)
Parameter Description
- asdBlasMakeRotPlan
Parameter
Input/Output
Type
Description
handle
Input
asdBlasHandle
Handle of the Csrot operator.
- asdBlasCsrot
Parameter
Input/Output
Type
Description
handle
Input
asdBlasHandle
Handle of the Csrot operator.
n
Input
const int64_t
Number of complex elements in the vector
x
Input/Output
aclTensor *
x in the formula, which is a tensor on the device. The data type can be COMPLEX64, the data format can be ND, and the shape is [n].
incx
Input
const int64_t
Memory address increment between consecutive elements of x (currently restricted to 1).
y
Input/Output
aclTensor *
y in the formula, which is a tensor on the device. The data type can be COMPLEX64, the data format can be ND, and the shape is [n].
incy
Input
const int64_t
Memory address increment between consecutive elements of y (currently restricted to 1).
c
Input
const float *
Pointer to the cosine value of the rotation matrix.
s
Input
const float *
Pointer to the sine value of the rotation matrix.
Return Value Description
For details about the return values, see Return Value.
Constraints
- asdBlasMakeRotPlan: none.
- asdBlasCsrot
- The input element count n currently supports the range [1, 2.50e+06].
- The input shape of the operator is [n], and the output shape is [n].
- The operator does not support the calculation for three or more dimensions.
Calling Example
For details about the operator calling example, see Csrot.

