#include <_bitset.h>
Definition at line 70 of file _bitset.h.
◆ _S_count()
Definition at line 30 of file bitset.cpp.
32{
33 static const unsigned char _bit_count[256] = {
34 0, 1, 1, 2, 1,
35 2, 2, 3, 1, 2,
36 2, 3, 2, 3, 3,
37 4, 1, 2, 2, 3,
38 2, 3, 3, 4, 2,
39 3, 3, 4, 3, 4,
40 4, 5, 1, 2, 2,
41 3, 2, 3, 3, 4,
42 2, 3, 3, 4, 3,
43 4, 4, 5, 2, 3,
44 3, 4, 3, 4, 4,
45 5, 3, 4, 4, 5,
46 4, 5, 5, 6, 1,
47 2, 2, 3, 2, 3,
48 3, 4, 2, 3, 3,
49 4, 3, 4, 4, 5,
50 2, 3, 3, 4, 3,
51 4, 4, 5, 3, 4,
52 4, 5, 4, 5, 5,
53 6, 2, 3, 3, 4,
54 3, 4, 4, 5, 3,
55 4, 4, 5, 4, 5,
56 5, 6, 3, 4, 4,
57 5, 4, 5, 5, 6,
58 4, 5, 5, 6, 5,
59 6, 6, 7, 1, 2,
60 2, 3, 2, 3, 3,
61 4, 2, 3, 3, 4,
62 3, 4, 4, 5, 2,
63 3, 3, 4, 3, 4,
64 4, 5, 3, 4, 4,
65 5, 4, 5, 5, 6,
66 2, 3, 3, 4, 3,
67 4, 4, 5, 3, 4,
68 4, 5, 4, 5, 5,
69 6, 3, 4, 4, 5,
70 4, 5, 5, 6, 4,
71 5, 5, 6, 5, 6,
72 6, 7, 2, 3, 3,
73 4, 3, 4, 4, 5,
74 3, 4, 4, 5, 4,
75 5, 5, 6, 3, 4,
76 4, 5, 4, 5, 5,
77 6, 4, 5, 5, 6,
78 5, 6, 6, 7, 3,
79 4, 4, 5, 4, 5,
80 5, 6, 4, 5, 5,
81 6, 5, 6, 6, 7,
82 4, 5, 5, 6, 5,
83 6, 6, 7, 5, 6,
84 6, 7, 6, 7, 7,
85 8
86 };
87
88 size_t __result(0);
89 while ( __first <
__last ) {
90 __result += _bit_count[*(__first++)];
91 }
92 return __result;
93}
_STLP_INLINE_LOOP _InputIter __last
Referenced by _Base_bitset< _Nw >::_M_do_count(), and _Base_bitset< 1UL >::_M_do_count().
◆ _S_first_one()
Definition at line 95 of file bitset.cpp.
96{
97 static const unsigned char _first_one[256] = {
98 0, 0, 1, 0, 2,
99 0, 1, 0, 3, 0,
100 1, 0, 2, 0, 1,
101 0, 4, 0, 1, 0,
102 2, 0, 1, 0, 3,
103 0, 1, 0, 2, 0,
104 1, 0, 5, 0, 1,
105 0, 2, 0, 1, 0,
106 3, 0, 1, 0, 2,
107 0, 1, 0, 4, 0,
108 1, 0, 2, 0, 1,
109 0, 3, 0, 1, 0,
110 2, 0, 1, 0, 6,
111 0, 1, 0, 2, 0,
112 1, 0, 3, 0, 1,
113 0, 2, 0, 1, 0,
114 4, 0, 1, 0, 2,
115 0, 1, 0, 3, 0,
116 1, 0, 2, 0, 1,
117 0, 5, 0, 1, 0,
118 2, 0, 1, 0, 3,
119 0, 1, 0, 2, 0,
120 1, 0, 4, 0, 1,
121 0, 2, 0, 1, 0,
122 3, 0, 1, 0, 2,
123 0, 1, 0, 7, 0,
124 1, 0, 2, 0, 1,
125 0, 3, 0, 1, 0,
126 2, 0, 1, 0, 4,
127 0, 1, 0, 2, 0,
128 1, 0, 3, 0, 1,
129 0, 2, 0, 1, 0,
130 5, 0, 1, 0, 2,
131 0, 1, 0, 3, 0,
132 1, 0, 2, 0, 1,
133 0, 4, 0, 1, 0,
134 2, 0, 1, 0, 3,
135 0, 1, 0, 2, 0,
136 1, 0, 6, 0, 1,
137 0, 2, 0, 1, 0,
138 3, 0, 1, 0, 2,
139 0, 1, 0, 4, 0,
140 1, 0, 2, 0, 1,
141 0, 3, 0, 1, 0,
142 2, 0, 1, 0, 5,
143 0, 1, 0, 2, 0,
144 1, 0, 3, 0, 1,
145 0, 2, 0, 1, 0,
146 4, 0, 1, 0, 2,
147 0, 1, 0, 3, 0,
148 1, 0, 2, 0, 1,
149 0,
150 };
151 return _first_one[__byte];
152}
Referenced by _Base_bitset< _Nw >::_M_do_find_first(), _Base_bitset< 1UL >::_M_do_find_first(), _Base_bitset< _Nw >::_M_do_find_next(), and _Base_bitset< 1UL >::_M_do_find_next().
The documentation for this class was generated from the following files: