13 #ifndef DATATOOLS_BIT_MASK_H 14 #define DATATOOLS_BIT_MASK_H 18 #include <boost/cstdint.hpp> 27 static const uint32_t
bit00 = 0x00000001;
28 static const uint32_t
bit01 = 0x00000002;
29 static const uint32_t
bit02 = 0x00000004;
30 static const uint32_t
bit03 = 0x00000008;
31 static const uint32_t
bit04 = 0x00000010;
32 static const uint32_t
bit05 = 0x00000020;
33 static const uint32_t
bit06 = 0x00000040;
34 static const uint32_t
bit07 = 0x00000080;
35 static const uint32_t
bit08 = 0x00000100;
36 static const uint32_t
bit09 = 0x00000200;
37 static const uint32_t
bit10 = 0x00000400;
38 static const uint32_t
bit11 = 0x00000800;
39 static const uint32_t
bit12 = 0x00001000;
40 static const uint32_t
bit13 = 0x00002000;
41 static const uint32_t
bit14 = 0x00004000;
42 static const uint32_t
bit15 = 0x00008000;
43 static const uint32_t
bit16 = 0x00010000;
44 static const uint32_t
bit17 = 0x00020000;
45 static const uint32_t
bit18 = 0x00040000;
46 static const uint32_t
bit19 = 0x00080000;
47 static const uint32_t
bit20 = 0x00100000;
48 static const uint32_t
bit21 = 0x00200000;
49 static const uint32_t
bit22 = 0x00400000;
50 static const uint32_t
bit23 = 0x00800000;
51 static const uint32_t
bit24 = 0x01000000;
52 static const uint32_t
bit25 = 0x02000000;
53 static const uint32_t
bit26 = 0x04000000;
54 static const uint32_t
bit27 = 0x08000000;
55 static const uint32_t
bit28 = 0x10000000;
56 static const uint32_t
bit29 = 0x20000000;
57 static const uint32_t
bit30 = 0x40000000;
58 static const uint32_t
bit31 = 0x80000000;
60 static const uint32_t
nbits00 = 0x00000000;
61 static const uint32_t
nbits01 = 0x00000001;
62 static const uint32_t
nbits02 = 0x00000003;
63 static const uint32_t
nbits03 = 0x00000007;
64 static const uint32_t
nbits04 = 0x0000000f;
65 static const uint32_t
nbits05 = 0x0000001f;
66 static const uint32_t
nbits06 = 0x0000003f;
67 static const uint32_t
nbits07 = 0x0000007f;
68 static const uint32_t
nbits08 = 0x000000ff;
69 static const uint32_t
nbits09 = 0x000001ff;
70 static const uint32_t
nbits10 = 0x000003ff;
71 static const uint32_t
nbits11 = 0x000007ff;
72 static const uint32_t
nbits12 = 0x00000fff;
73 static const uint32_t
nbits13 = 0x00001fff;
74 static const uint32_t
nbits14 = 0x00003fff;
75 static const uint32_t
nbits15 = 0x00007fff;
76 static const uint32_t
nbits16 = 0x0000ffff;
77 static const uint32_t
nbits17 = 0x0001ffff;
78 static const uint32_t
nbits18 = 0x0003ffff;
79 static const uint32_t
nbits19 = 0x0007ffff;
80 static const uint32_t
nbits20 = 0x000fffff;
81 static const uint32_t
nbits21 = 0x001fffff;
82 static const uint32_t
nbits22 = 0x003fffff;
83 static const uint32_t
nbits23 = 0x007fffff;
84 static const uint32_t
nbits24 = 0x00ffffff;
85 static const uint32_t
nbits25 = 0x01ffffff;
86 static const uint32_t
nbits26 = 0x03ffffff;
87 static const uint32_t
nbits27 = 0x07ffffff;
88 static const uint32_t
nbits28 = 0x0fffffff;
89 static const uint32_t
nbits29 = 0x1fffffff;
90 static const uint32_t
nbits30 = 0x3fffffff;
91 static const uint32_t
nbits31 = 0x7fffffff;
92 static const uint32_t
nbits32 = 0xffffffff;
97 #endif // DATATOOLS_BIT_MASK_H