v?mulbyconj
Compute the product of input vector 1 multiplied by the conjugate of input vector 2.
Interface Definition
C interface:
void vcmulbyconj(const int len, const float complex* src1, const float complex* src2, float complex* dst);
void vzmulbyconj(const int len, const double complex* src1, const double complex* src2, double complex* dst);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
len |
Integer |
Number of elements in the input vector. If len ≤ 0, an invalid parameter error is reported and the function returns. |
Input |
src1 |
|
Input vector src1 with length len. If the pointer is null, a null pointer error is reported and the function returns. |
Input |
src2 |
|
Input vector src2 with length len. If the pointer is null, a null pointer error is reported and the function returns. |
Input |
dst |
|
Output vector dst with length len. If the pointer is null, a null pointer error is reported and the function returns. |
Output |
Return Value
Dependencies
C: "kvml.h"
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #define N 4 const complex float src1[N] = { __builtin_complex(-8.0f, 25.0f), __builtin_complex(-2.1f, +INFINITY), __builtin_complex(2.6f, 25.0f), __builtin_complex(+0.1f, NAN) }; const complex float src2[N] = { __builtin_complex(-3.0f, 5.2f), __builtin_complex(NAN, -0.0f), __builtin_complex(-9.5f, 6.0f), __builtin_complex(-1.1f, 1.1f) }; float complex dst[N] = {0}; vcmulbyconj(N, src1, src2, dst); printFCArr("input1:", N, src1); printFCArr("input2:", N, src2); printFCArr("output:", N, dst); /** * input1: (-8.000,25.000) (-2.100, inf) (2.600,25.000) (0.100, nan) * input2: (-3.000,5.200) ( nan,-0.000) (-9.500,6.000) (-1.100,1.100) * output: (154.000,-33.400) ( nan, nan) (125.300,-253.100) ( -nan, nan) */ |