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, an invalid parameter error is reported and the function returns. |
Input |
src |
|
Input vector src 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
- The conjugation of the input complex number is returned for each operation. 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
Dependencies
C: "kvml.h"
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #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) */ |