1
0
Fork 0
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:
Steffen Vogel 2016-10-30 20:04:17 -04:00
parent c0645ab839
commit 1cfa7f05d9

View file

@ -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] )