Grok 10.0.5
utils.hpp File Reference
#include <cstdint>
#include <cstdlib>
#include <x86intrin.h>

Go to the source code of this file.

Macros

#define round_up(x, n)
 
#define round_down(x, n)
 
#define ceil_int(a, b)
 

Functions

static size_t popcount32 (uintmax_t num)
 
static uint32_t int_log2 (const uint32_t x)
 
static uint32_t count_leading_zeros (const uint32_t x)
 

Macro Definition Documentation

◆ ceil_int

#define ceil_int ( a,
b )
Value:
((a) + ((b)-1)) / (b)
uint32_t a
only used by MQ decoder
Definition mqc.h:48

Referenced by ht_cleanup_decode(), htj2k_encode(), and print_block().

◆ round_down

#define round_down ( x,
n )
Value:
((x) & (-n))
uint32_t x
Definition BlockExec.h:38

◆ round_up

#define round_up ( x,
n )
Value:
(((x) + (n)-1) & (-n))

Referenced by htj2k_encode().

Function Documentation

◆ count_leading_zeros()

static uint32_t count_leading_zeros ( const uint32_t x)
inlinestatic

References int_log2(), x, and y.

Referenced by ht_cleanup_decode(), make_storage(), and make_storage_one().

◆ int_log2()

static uint32_t int_log2 ( const uint32_t x)
inlinestatic

References x, and y.

Referenced by count_leading_zeros().

◆ popcount32()

static size_t popcount32 ( uintmax_t num)
inlinestatic

Referenced by htj2k_encode().