axa_bits
contains bitwise macros and function declarations for libaxa.
◆ AXA_WORD_BITS
◆ BYTES_TO_AXA_WORDS
#define BYTES_TO_AXA_WORDS |
( |
|
b | ) |
|
Value:
Convert bytes to number of AXA words.
- Parameters
-
- Returns
- number of AXA words
◆ AXA_WORDS_TO_BYTES
#define AXA_WORDS_TO_BYTES |
( |
|
w | ) |
((w)*sizeof(axa_word_t)) |
Convert AXA words to number of bytes.
- Parameters
-
- Returns
- number of bytes
◆ BITS_TO_AXA_WORDS
Convert bits to number of AXA words.
- Parameters
-
- Returns
- number of AXA words
◆ axa_fls_word
#define axa_fls_word |
( |
|
w | ) |
|
Value:
Find the index of the most significant non-zero bit in a 64-bit word by counting its leading zeros.
- Parameters
-
- Returns
- the index of the MSB or 64 if the word is 0
◆ AXA_NMSG_CH_MAX
#define AXA_NMSG_CH_MAX 255 |
◆ axa_word_t
an AXA word is 64 unsigned bits
◆ axa_find_bitwords()
uint axa_find_bitwords |
( |
axa_word_t * |
w, |
|
|
uint |
bits_len |
|
) |
| |
Find the index of the first bit set in an array of 64-bit words.
- Parameters
-
[in] | w | pointer to an AXA word |
[in] | bits_len | length of bits |
- Returns
- index of the first bit set or bits_len * 64 if no bits are set