P99
Macros | Functions
p99_choice.h File Reference

Choice macros that implement ‘static inline’ table lookup. More...

#include "p99_id.h"
#include "p99_for.h"
+ Include dependency graph for p99_choice.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define P99_CASE_RETURN(...)   P99_FOR(,P99_NARG(__VA_ARGS__), P00_SEP, P00_CASE_RETURN, __VA_ARGS__)
 
#define P99_CHOICE_FUNCTION(TYPE, NAME, DEFAULT, ...)
 

Functions

P99_CONST_FUNCTION uint8_t p99_small_primes (size_t p00_x)
 Return a small prime number or 0 if x is too big. More...
 
P99_CONST_FUNCTION unsigned p99_unique_bit_16 (uint16_t p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION unsigned p99_unique_bit_32 (uint32_t p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION unsigned p99_unique_bit_64 (uint64_t p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION unsigned p99_unique_bit_8 (uint8_t p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION p99_inline unsigned p99_unique_bit_checked_16 (P99_PASTE3(uint, 16, _t) p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION p99_inline unsigned p99_unique_bit_checked_32 (P99_PASTE3(uint, 32, _t) p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION p99_inline unsigned p99_unique_bit_checked_64 (P99_PASTE3(uint, 64, _t) p00_x)
 Find the one unique bit that is set in p00_x
More...
 
P99_CONST_FUNCTION p99_inline unsigned p99_unique_bit_checked_8 (P99_PASTE3(uint, 8, _t) p00_x)
 Find the one unique bit that is set in p00_x
More...
 

Detailed Description

Choice macros that implement ‘static inline’ table lookup.

Definition in file p99_choice.h.