MCPcopy Create free account
hub / github.com/boostorg/compute / test

Method test

include/boost/compute/container/dynamic_bitset.hpp:174–183  ·  view source on GitHub ↗

Returns \c true if the bit at position \p n is set (i.e. '1').

Source from the content-addressed store, hash-verified

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)

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

copy_nFunction · 0.85
beginMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64