39 return x != 0 && (x & (x-1)) == 0;
70 float x1 = fabsf(x+clip);
71 float x2 = fabsf(x-clip);
88 static inline unsigned int 97 static inline unsigned int 100 unsigned int ret = 0;
101 if((r >= 0) && (i >= 0))
103 else if((r < 0) && (i >= 0))
105 else if((r < 0) && (i < 0))
112 static inline unsigned int 115 unsigned int ret = 0;
116 if(fabsf(r) > fabsf(i)) {
132 static inline unsigned int 138 static inline unsigned int 145 static inline unsigned int 151 static inline unsigned int 154 unsigned int ret = 0;
155 ret = (fabsf(r) > fabsf(i)) * (((r < 0) << 0x1));
156 ret |= (fabsf(i) > fabsf(r)) * (((i < 0) << 0x1) | 0x1);
161 static inline unsigned int 167 static inline unsigned int 171 ret |= ((i <= 0) << 1);
172 return (ret ^ ((ret & 0x2) >> 0x1));
175 static inline unsigned int 211 return x & (pow2 - 1);
static unsigned int branchless_quad_45deg_slicer(float r, float i)
Definition: math.h:168
static unsigned int quad_45deg_slicer(float r, float i)
Definition: math.h:98
static size_t p2_modulo_neg(size_t x, size_t pow2)
Definition: math.h:220
static size_t p2_round_down(size_t x, size_t pow2)
Definition: math.h:187
static unsigned int binary_slicer(float x)
Definition: math.h:89
static size_t p2_round_up(size_t x, size_t pow2)
Definition: math.h:198
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
static bool is_power_of_2(long x)
Definition: math.h:37
GR_RUNTIME_API float fast_atan2f(float y, float x)
Fast arc tangent using table lookup and linear interpolation.
std::complex< float > gr_complex
Definition: gr_complex.h:27
static size_t p2_modulo(size_t x, size_t pow2)
Definition: math.h:209
Include this header to use the message passing features.
Definition: logger.h:695
static float branchless_clip(float x, float clip)
Definition: math.h:68
static unsigned int branchless_quad_0deg_slicer(float r, float i)
Definition: math.h:152
static unsigned int quad_0deg_slicer(float r, float i)
Definition: math.h:113
static unsigned int branchless_binary_slicer(float x)
Definition: math.h:146
static float clip(float x, float clip)
Definition: math.h:77