|
|
1.1 root 1: #ifndef __COMMON_TRICKS_H__
2: #define __COMMON_TRICKS_H__
3:
4: /*
5: * Export some of the definitions from <common/_tricks.h> into the user
6: * namespace.
7: */
8:
9: #include <common/_tricks.h>
10:
11: #define IS_POWER_OF_TWO(i) __IS_POWER_OF_TWO (i)
12: #define DIVIDE_ROUNDUP_CONST(num,den) __DIVIDE_ROUNDUP_CONST (num, den)
13: #define DIVIDE_ROUNDUP(num,den) __DIVIDE_ROUNDUP (num, den)
14: #define ROUND_UP_TO_MULTIPLE_CONST(n,m) __ROUND_UP_TO_MULTIPLE_CONST (n, m)
15: #define ROUND_UP_TO_MULTIPLE(n,mult) __ROUND_UP_TO_MULTIPLE (n, mult)
16: #define LEAST_BIT_UCHAR(i) __LEAST_BIT_UCHAR (i)
17: #define LEAST_BIT_USHRT(i) __LEAST_BIT_USHRT (i)
18: #define LEAST_BIT_UINT(i) __LEAST_BIT_UINT (i)
19: #define LEAST_BIT_ULONG(i) __LEAST_BIT_ULONG (i)
20: #define MOST_BIT_UCHAR(i) __MOST_BIT_UCHAR (i)
21: #define MOST_BIT_USHRT(i) __MOST_BIT_USHRT (i)
22: #define MOST_BIT_UINT(i) __MOST_BIT_UINT (i)
23: #define MOST_BIT_ULONG(i) __MOST_BIT_ULONG (i)
24: #define LEAST_BIT_UCHAR_CONST(i) __LEAST_BIT_UCHAR_CONST (i)
25: #define LEAST_BIT_USHRT_CONST(i) __LEAST_BIT_USHRT_CONST (i)
26: #define LEAST_BIT_UINT_CONST(i) __LEAST_BIT_UINT_CONST (i)
27: #define LEAST_BIT_ULONG_CONST(i) __LEAST_BIT_ULONG_CONST (i)
28: #define MOST_BIT_UCHAR_CONST(i) __MOST_BIT_UCHAR_CONST (i)
29: #define MOST_BIT_USHRT_CONST(i) __MOST_BIT_USHRT_CONST (i)
30: #define MOST_BIT_UINT_CONST(i) __MOST_BIT_UINT_CONST (i)
31: #define MOST_BIT_ULONG_CONST(i) __MOST_BIT_ULONG_CONST (i)
32: #define ARRAY_LENGTH(a) __ARRAY_LENGTH (a)
33: #define ADD_UINT_WITH_MAX(add,aug) __ADD_UINT_WITH_MAX (add, aug)
34: #define SUB_UINT_WITH_MIN(min,sub) __SUB_UINT_WITH_MIN (min, sub)
35:
36: #endif /* ! defined (__COMMON_TRICKS_H__) */
37:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.