Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Static Public Member Functions | List of all members
libzeth::bit_utils< X > Class Template Reference

Compile-time computations related to bit representations of size_t values. More...

#include <utils.hpp>

Static Public Member Functions

static constexpr size_t bit_size ()
 
static constexpr size_t hamming_weight ()
 

Detailed Description

template<size_t X>
class libzeth::bit_utils< X >

Compile-time computations related to bit representations of size_t values.

Definition at line 19 of file utils.hpp.

Member Function Documentation

◆ bit_size()

template<size_t X>
static constexpr size_t libzeth::bit_utils< X >::bit_size ( )
staticconstexpr

Minimum number of bits required to represent this number. bit_size(7) == 3 bit_size(4) == 3 bit_size(0) == 0

◆ hamming_weight()

template<size_t X>
static constexpr size_t libzeth::bit_utils< X >::hamming_weight ( )
staticconstexpr

Count number of 1 bits. hamming_weight(7) == 3 hamming_weight(4) == 1 hamming_weight(0) == 0


The documentation for this class was generated from the following file: