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, the system displays a message indicating that the value of len is invalid. |
Input |
src1 |
|
Input vector src1 with length len. If the pointer is null, the system prompts a null pointer error. |
Input |
src2 |
|
Input vector src2 with length len. If the pointer is null, the system prompts a null pointer error. |
Input |
dst |
|
Output vector dst with length len. If the pointer is null, the system prompts a null pointer error. |
Output |
Return Value
Dependency
C: "kvml.h"
Example
#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)
*/