projects
/
fio.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge branch 'gpudirect' of https://github.com/yufeiren/fio
[fio.git]
/
lib
/
pow2.h
1
#ifndef FIO_POW2_H
2
#define FIO_POW2_H
3
4
#include <inttypes.h>
5
#include "types.h"
6
7
static inline bool is_power_of_2(uint64_t val)
8
{
9
return (val != 0 && ((val & (val - 1)) == 0));
10
}
11
12
#endif