libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::dyn::lookup::private_::cache< NumBits > Struct Template Reference

#include <count_setbits.hpp>

Public Types

enum  { max_size =NumBits, num_chars =((max_size+7)/8) }
 
typedef bits_to_type< num_chars >::type range_type
 
typedef gen_nums< max_size, mpl::count_setbits, range_type >::type type
 
typedef type::container_type container_type
 

Static Public Member Functions

constexpr static float efficiency () noexcept(true)
 

Detailed Description

template<u_int8_t NumBits>
struct jmmcg::dyn::lookup::private_::cache< NumBits >

Definition at line 211 of file count_setbits.hpp.

Member Typedef Documentation

◆ container_type

template<u_int8_t NumBits>
typedef type::container_type jmmcg::dyn::lookup::private_::cache< NumBits >::container_type

Definition at line 218 of file count_setbits.hpp.

◆ range_type

template<u_int8_t NumBits>
typedef bits_to_type<num_chars>::type jmmcg::dyn::lookup::private_::cache< NumBits >::range_type

Definition at line 216 of file count_setbits.hpp.

◆ type

template<u_int8_t NumBits>
typedef gen_nums<max_size, mpl::count_setbits, range_type>::type jmmcg::dyn::lookup::private_::cache< NumBits >::type

Definition at line 217 of file count_setbits.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<u_int8_t NumBits>
anonymous enum
Enumerator
max_size 
num_chars 

Definition at line 212 of file count_setbits.hpp.

Member Function Documentation

◆ efficiency()

template<u_int8_t NumBits>
constexpr static float jmmcg::dyn::lookup::private_::cache< NumBits >::efficiency ( )
inlinestaticconstexprnoexcept
Returns
If ratio of the number of bits requested in the cache and the actual number of bits required to represent that number of bits. For example if 8, 16, 32 or 64 bits are requested, then the efficiency will be 1. If the number of bits requested is 33 then the efficiency will be 33/64, i.e. lots of wasted bits will be required.

Definition at line 223 of file count_setbits.hpp.


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