v?conj
Perform element-wise conjugation of the input complex number.
Interface Definition
C interface:
void vcconj(const int len, const float complex* src, float complex* dst);
void vzconj(const int len, const double complex* src, 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 |
src |
|
Input vector src 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
- The conjugation of the input complex number is returned for each operation value. The formula is: conj(x + yi) = (x - yi)
- For special values, see the following table.
Real Part of the Input (src->real)
Imaginary Part of the Input (src->imag)
Real Part of the Output (dst->real)
Imaginary Part of the Output (dst->imag)
Any value xR
nan
xR
nan
Any value xR
0
xR
-0
Any value xR
-0
xR
+0
Any value xR
-inf
xR
inf
Any value xR
+inf
xR
-inf
Dependency
C: "kvml.h"
Example
#define N 4
const complex float src[N] = {
__builtin_complex(-8.0f, 25.0f),
__builtin_complex(-2.1f, +INFINITY),
__builtin_complex(2.6f, 25.0f),
__builtin_complex(+0.1f, NAN)
};
float complex dst[N] = {0};
vcconj(N, src, dst);
printFCArr("input: ", N, src);
printFCArr("output:", N, dst);
/**
* input: (-8.000,25.000) (-2.100, inf) (2.600,25.000) (0.100, nan)
* output:(-8.000,-25.000) (-2.100, -inf) (2.600,-25.000) (0.100, -nan)
*/