Searched defs:is_power_of_2 (Results 1 – 6 of 6) sorted by relevance
26 static int is_power_of_2(int x) in is_power_of_2() function
67 static inline bool is_power_of_2(unsigned long n) in is_power_of_2() function
26 #define is_power_of_2(x) (((x) != 0U) && (((x) & ((x) - 1U)) == 0U)) macro
135 static bool is_power_of_2(size_t n) { return (n & (n - 1)) == 0; } in is_power_of_2() function
62 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) macro
631 static int is_power_of_2(unsigned long x) in is_power_of_2() function