85#ifndef RBT_KEY_H_PREFIX_
86#error RBT_KEY_H_PREFIX_ is not defined.
90#error RBT_PIN_T is not defined.
94#error RBT_KEY_SIZE_T is not defined.
97#ifndef RBT_KEY_SIZE_T_FORMAT
98#error RBT_KEY_SIZE_T_FORMAT is not defined.
107typedef RBT_KEY_SIZE_T
RBT_TOKEN_2_W(RBT_KEY_H_PREFIX_, key_size_t);
109#undef RBT_FPRINT_BITS
110#define RBT_FPRINT_BITS RBT_TOKEN_2_W(RBT_KEY_H_PREFIX_, fprint_bits)
112#undef RBT_COMMON_BIT_PREFIX_LEN
113#define RBT_COMMON_BIT_PREFIX_LEN RBT_TOKEN_2_W(RBT_KEY_H_PREFIX_, common_bit_prefix_len)
128#define RBT_PIN_SIZE sizeof(RBT_PIN_T)
132#undef RBT_PIN_SIZE_BITS
133#define RBT_PIN_SIZE_BITS (RBT_PIN_SIZE * BITS_PER_BYTE)
142#define BITS_TO_PINS(x) DIV_UP(x, RBT_PIN_SIZE_BITS)
151#define PINS_TO_BYTES(x) ((x) * RBT_PIN_SIZE)
161#undef BITS_TO_PINS_TO_BYTES
162#define BITS_TO_PINS_TO_BYTES(x) PINS_TO_BYTES(BITS_TO_PINS(x))
192 for (i = skip; n > 0; i++,n--)
224#define RBT_DIVMOD(a,b,c,d) \
257 RBT_KEY_SIZE_T length;
261 while (length < max && * a == * b)
281 if (__builtin_types_compatible_p(RBT_PIN_T,
unsigned int))
284 length += (RBT_KEY_SIZE_T) __builtin_clz(c);
286 else if (__builtin_types_compatible_p(RBT_PIN_T,
unsigned long int))
289 length += (RBT_KEY_SIZE_T) __builtin_clzl(c);
291 else if (__builtin_types_compatible_p(RBT_PIN_T,
unsigned long long int))
294 length += (RBT_KEY_SIZE_T) __builtin_clzll(c);
318 return (length > max) ? max : length;
#define MOST_SIGNIFICANT_BIT(x)
The most significant bit of the given integer's type.
Definition: common.h:274
#define RBT_TOKEN_2_W(a, b)
A wrapper for RBT_TOKEN_2() to ensure macro expansion.
Definition: common.h:240
#define MOST_SIGNIFICANT_BIT_W(x)
A wrapper for MOST_SIGNIFICANT_BIT() to ensure macro expansion.
Definition: common.h:283
#define debug_print(msg)
Definition: debug.h:160
RBT_KEY_SIZE_T RBT_COMMON_BIT_PREFIX_LEN(RBT_PIN_T *a, RBT_PIN_T *b, RBT_KEY_SIZE_T max)
Definition: key.h:250
#define RBT_PIN_SIZE_BITS
Definition: key.h:133
void RBT_FPRINT_BITS(FILE *fd, RBT_PIN_T *key, RBT_KEY_SIZE_T n, RBT_KEY_SIZE_T skip)
Definition: key.h:189