mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
compiler.h: add popcount
This commit is contained in:
parent
4e915837a4
commit
b2ff4eb2c9
1 changed files with 4 additions and 0 deletions
|
@ -106,3 +106,7 @@
|
|||
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
|
||||
static inline int popcount(uint x) {
|
||||
return __builtin_popcount(x);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue