Returns \c true if the bit at position \p n is set (i.e. '1').
| 172 | |
| 173 | /// Returns \c true if the bit at position \p n is set (i.e. '1'). |
| 174 | bool test(size_type n, command_queue &queue) |
| 175 | { |
| 176 | const size_type bit = n % (sizeof(block_type) * CHAR_BIT); |
| 177 | const size_type block = n / (sizeof(block_type) * CHAR_BIT); |
| 178 | |
| 179 | block_type block_value; |
| 180 | copy_n(m_bits.begin() + block, 1, &block_value, queue); |
| 181 | |
| 182 | return block_value & (size_type(1) << bit); |
| 183 | } |
| 184 | |
| 185 | /// Flips the value of the bit at position \p n. |
| 186 | void flip(size_type n, command_queue &queue) |