asdMul
Applicable Products
Hardware Model |
Supported or Not |
|---|---|
Not supported |
|
Not supported |
|
Not supported |
|
Supported |
|
Not supported |
Function Description
API function: This API supports the element-wise product (Hadamard) capability of vectors. It returns a complex matrix with the same shape and size as the input matrix.
Formula:
- The calculation formula of asdMul is
. That is, the elements in the corresponding positions of two matrices are multiplied.
Function Prototype
AspbStatus asdMul(int n, const void *x, const void *y, const void *z, void *stream, void *workspace = nullptr)
Parameter Description
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
n |
Input |
int |
Number of input elements. |
x |
Input |
const void * |
A in the formula, which is a tensor on the device. The data type can be COMPLEX32 or COMPLEX64, the data format can be ND, and the shape is [n]. |
y |
Input |
const void * |
B in the formula, tensor on the device. The data type can be COMPLEX32 or COMPLEX64, the data format can be ND, and the shape is [n]. |
z |
Input |
const void * |
result in the formula, which is a tensor on the device. The data type can be COMPLEX32 or COMPLEX64, the data format can be ND, and the shape is [n]. |
stream |
Input |
void* |
NPU execution stream. |
workspace |
Input |
void * |
Workspace required by the asdMul operator. |
Return Value Description
For details about the return values, see Return Value.
Constraints
asdMul
- The supported input data types are COMPLEX32 and COMPLEX64.
- The supported output data types are COMPLEX32 and COMPLEX64.
- The theoretical range of the number of input elements n is [1, 9.22e+18].
- The input shape of the operator is [n] and [n], and the output shape is [n].
Calling Example
For details about the operator calling example, see mul_complex32 or mul_complex64.