mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
added missing defines
This commit is contained in:
parent
c0645ab839
commit
1cfa7f05d9
1 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,12 @@
|
|||
|
||||
#define CEIL(x, y) ((x + y - 1) / y)
|
||||
|
||||
/** Get nearest up-rounded power of 2 */
|
||||
#define LOG2_CEIL(x) (1 << (log2i((x) - 1) + 1))
|
||||
|
||||
/** Check if the number is a power of 2 */
|
||||
#define IS_POW2(x) (((x) != 0) && !((x) & ((x) - 1)))
|
||||
|
||||
/** Calculate the number of elements in an array. */
|
||||
#define ARRAY_LEN(a) ( sizeof (a) / sizeof (a)[0] )
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue