|
WinTer 0.1.1
Windows Terminal Emulator
|
Fast, bitwise macros for aligning pointers and sizes to powers of 2. More...
Macros | |
| #define | ALIGN_UP_POW2(x, p) |
| Aligns a value UP to the nearest power of 2. | |
| #define | ALIGN_DOWN_POW2(x, p) |
| Aligns a value DOWN to the nearest power of 2. | |
| #define | IS_POW2_OR_ZERO(x) |
| Checks if a given integer is a power of 2 (or zero). | |
Fast, bitwise macros for aligning pointers and sizes to powers of 2.
| #define ALIGN_DOWN_POW2 | ( | x, | |
| p ) |
Aligns a value DOWN to the nearest power of 2.
| x | The value to align. |
| p | The alignment boundary (must be a power of 2). |
Definition at line 340 of file base_macros.h.
| #define ALIGN_UP_POW2 | ( | x, | |
| p ) |
Aligns a value UP to the nearest power of 2.
| x | The value to align. |
| p | The alignment boundary (must be a power of 2). |
Definition at line 332 of file base_macros.h.
| #define IS_POW2_OR_ZERO | ( | x | ) |
Checks if a given integer is a power of 2 (or zero).
| x | The value to check. |
Definition at line 347 of file base_macros.h.