Returns the number of set bits (i.e. '1') in the bitset.
| 106 | |
| 107 | /// Returns the number of set bits (i.e. '1') in the bitset. |
| 108 | size_type count(command_queue &queue) const |
| 109 | { |
| 110 | ulong_ count = 0; |
| 111 | transform_reduce( |
| 112 | m_bits.begin(), |
| 113 | m_bits.end(), |
| 114 | &count, |
| 115 | popcount<block_type>(), |
| 116 | plus<ulong_>(), |
| 117 | queue |
| 118 | ); |
| 119 | return static_cast<size_type>(count); |
| 120 | } |
| 121 | |
| 122 | /// Resizes the bitset to contain \p num_bits. If the new size is greater |
| 123 | /// than the current size the new bits are set to zero. |
nothing calls this directly
no test coverage detected