Theoretica
A C++ numerical and automatic mathematical library
bit_op.h File Reference

Operations on bits. More...

#include <cstdint>

Go to the source code of this file.

Namespaces

 theoretica
 Main namespace of the library which contains all functions and objects.
 

Functions

void theoretica::mul_uint128 (uint64_t a, uint64_t b, uint64_t &c_low, uint64_t &c_high)
 Multiply two 64-bit unsigned integers and store the result in two 64-bit variables, keeping 128 bits of the result. More...
 
uint64_t theoretica::mix_mum (uint64_t a, uint64_t b)
 MUM bit mixing function, computes the 128-bit product of a and b and the XOR of their high and low 64-bit parts. More...
 
template<typename UnsignedIntType >
TH_CONSTEXPR UnsignedIntType theoretica::bit_rotate (UnsignedIntType x, unsigned int i)
 Bit rotation of unsigned integer types using shifts. More...
 
template<typename Vector , enable_vector< Vector > = true>
void theoretica::swap_bit_reverse (Vector &x, unsigned int m)
 Swap the elements of a vector pair-wise, by exchanging elements with indices related by bit reversion (e.g. More...
 

Detailed Description

Operations on bits.