GNU Radio 3.6.5 C++ API

volk_complex.h File Reference

#include <complex.h>

Go to the source code of this file.

Defines

#define lv_cmake(r, i)   ((r) + _Complex_I*(i))
#define lv_creal(x)   (creal(x))
#define lv_cimag(x)   (cimag(x))
#define lv_conj(x)   (conj(x))

Typedefs

typedef char complex lv_8sc_t
 Provide typedefs and operators for all complex types in C and C++.
typedef short complex lv_16sc_t
typedef long complex lv_32sc_t
typedef long long complex lv_64sc_t
typedef float complex lv_32fc_t
typedef double complex lv_64fc_t

Define Documentation

#define lv_cimag (   x)    (cimag(x))
#define lv_cmake (   r,
 
)    ((r) + _Complex_I*(i))
#define lv_conj (   x)    (conj(x))
#define lv_creal (   x)    (creal(x))

Typedef Documentation

typedef short complex lv_16sc_t
typedef float complex lv_32fc_t
typedef long complex lv_32sc_t
typedef double complex lv_64fc_t
typedef long long complex lv_64sc_t
typedef char complex lv_8sc_t

Provide typedefs and operators for all complex types in C and C++.

The typedefs encompass all signed integer and floating point types. Each operator function is intended to work across all data types. Under C++, these operators are defined as inline templates. Under C, these operators are defined as preprocessor macros. The use of macros makes the operators agnostic to the type.

The following operator functions are defined:

  • lv_cmake - make a complex type from components
  • lv_creal - get the real part of the complex number
  • lv_cimag - get the imaginary part of the complex number
  • lv_conj - take the conjugate of the complex number