MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / mod

Method mod

extern/libcds/cds/opt/buffer.h:274–280  ·  view source on GitHub ↗

Returns idx % capacity() If the buffer size is a power of two, binary arithmethics is used instead of modulo arithmetics */

Source from the content-addressed store, hash-verified

272 instead of modulo arithmetics
273 */
274 size_t mod( size_t idx )
275 {
276 constexpr_if ( c_bExp2 )
277 return idx & ( capacity() - 1 );
278 else
279 return idx % capacity();
280 }
281
282 //@cond
283 template <typename I>

Callers 12

~WeakRingBufferMethod · 0.45
pushMethod · 0.45
emplaceMethod · 0.45
enqueue_withMethod · 0.45
popMethod · 0.45
dequeue_withMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45
backMethod · 0.45
push_backMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected