GNU Radio 3.5.3.2 C++ API
gr_math.h File Reference
#include <gr_core_api.h>
#include <gr_complex.h>
Include dependency graph for gr_math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static bool gr_is_power_of_2 (long x)
GR_CORE_API float gr_fast_atan2f (float y, float x)
 Fast arc tangent using table lookup and linear interpolation.
static float gr_fast_atan2f (gr_complex z)
static float gr_branchless_clip (float x, float clip)
static float gr_clip (float x, float clip)
static unsigned int gr_binary_slicer (float x)
static unsigned int gr_quad_45deg_slicer (float r, float i)
static unsigned int gr_quad_0deg_slicer (float r, float i)
static unsigned int gr_quad_45deg_slicer (gr_complex x)
static unsigned int gr_quad_0deg_slicer (gr_complex x)
static unsigned int gr_branchless_binary_slicer (float x)
static unsigned int gr_branchless_quad_0deg_slicer (float r, float i)
static unsigned int gr_branchless_quad_0deg_slicer (gr_complex x)
static unsigned int gr_branchless_quad_45deg_slicer (float r, float i)
static unsigned int gr_branchless_quad_45deg_slicer (gr_complex x)
static size_t gr_p2_round_down (size_t x, size_t pow2)
static size_t gr_p2_round_up (size_t x, size_t pow2)
static size_t gr_p2_modulo (size_t x, size_t pow2)
static size_t gr_p2_modulo_neg (size_t x, size_t pow2)

Function Documentation

static unsigned int gr_binary_slicer ( float  x) [inline, static]
static unsigned int gr_branchless_binary_slicer ( float  x) [inline, static]
static float gr_branchless_clip ( float  x,
float  clip 
) [inline, static]
static unsigned int gr_branchless_quad_0deg_slicer ( float  r,
float  i 
) [inline, static]
static unsigned int gr_branchless_quad_0deg_slicer ( gr_complex  x) [inline, static]
static unsigned int gr_branchless_quad_45deg_slicer ( float  r,
float  i 
) [inline, static]
static unsigned int gr_branchless_quad_45deg_slicer ( gr_complex  x) [inline, static]
static float gr_clip ( float  x,
float  clip 
) [inline, static]
static float gr_fast_atan2f ( gr_complex  z) [inline, static]

References gr_fast_atan2f().

static bool gr_is_power_of_2 ( long  x) [inline, static]
static size_t gr_p2_modulo ( size_t  x,
size_t  pow2 
) [inline, static]
Parameters:
xany value
pow2must be a power of 2
Returns:
x modulo pow2.

Referenced by gr_p2_modulo_neg().

static size_t gr_p2_modulo_neg ( size_t  x,
size_t  pow2 
) [inline, static]
Parameters:
xany value
pow2must be a power of 2
Returns:
pow2 - (x modulo pow2).

References gr_p2_modulo().

static size_t gr_p2_round_down ( size_t  x,
size_t  pow2 
) [inline, static]
Parameters:
xany value
pow2must be a power of 2
Returns:
x rounded down to a multiple of pow2.

Referenced by gr_p2_round_up().

static size_t gr_p2_round_up ( size_t  x,
size_t  pow2 
) [inline, static]
Parameters:
xany value
pow2must be a power of 2
Returns:
x rounded up to a multiple of pow2.

References gr_p2_round_down().

static unsigned int gr_quad_0deg_slicer ( float  r,
float  i 
) [inline, static]

Referenced by gr_quad_0deg_slicer().

static unsigned int gr_quad_0deg_slicer ( gr_complex  x) [inline, static]

References gr_quad_0deg_slicer().

static unsigned int gr_quad_45deg_slicer ( gr_complex  x) [inline, static]
static unsigned int gr_quad_45deg_slicer ( float  r,
float  i 
) [inline, static]

Referenced by gr_quad_45deg_slicer().