Caxpy
Applicable Products
|
Hardware Model |
Supported or Not |
|---|---|
|
|
Not supported |
|
|
Not supported |
|
|
Not supported |
|
|
Supported |
|
|
Supported |
Function Description
API function:
- asdBlasMakeCaxpyPlan: initializes the Caxpy operator configuration corresponding to the handle.
- asdBlasCaxpy: multiplies a complex-number vector by a complex-number scalar and adds a complex-number vector.
Formula:
Function Prototype
- AspbStatus asdBlasMakeCaxpyPlan(asdBlasHandle handle)
- AspbStatus asdBlasCaxpy(asdBlasHandle handle, const int64_t n, const std::complex<float> *alpha, aclTensor* x,int64_t incx, aclTensor* y, int64_t incy)
Parameter Description
- asdBlasMakeCaxpyPlan
Parameter
Input/Output
Type
Description
handle
Input
asdBlasHandle
Caxpy operator handle.
- asdBlasCaxpy
Parameter
Input/Output
Type
Description
handle
Input
asdBlasHandle
Caxpy operator handle.
n
Input
const int64_t
Number of complex elements in the vector
alpha
Input
const std::complex<float> *
Alpha in the formula, which is the input complex scalar. The data type can be COMPLEX64.
x
Input
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
int64_t
Memory address increment between consecutive elements of vector 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
int64_t
Memory address increment between consecutive elements of vector y (currently restricted to 1).
Return Value Description
For details about the return values, see Return Value.
Constraints
- asdBlasMakeCaxpyPlan: none.
- asdBlasCaxpy
- The input element count n currently supports the range [1, 6.71e+06].
- The input shape of the operator is [n] and [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 Caxpy.
