src/base/sat_counter.hh
/**
     * Constructor for the counter. The explicit keyword is used to make
     * sure the user does not assign a number to the counter thinking it
     * will be used as a counter value when it is in fact used as the number
     * of bits.
     *
     * @param bits How many bits the counter will have.
     * @param initial_val Starting value for the counter.
     *
     * @ingroup api_sat_counter
     */
Constructor for the counter. The explicit keyword is used to make
sure the user does not assign a number to the counter thinking it
will be used as a counter value when it is in fact used as the number
of bits.

@param bits How many bits the counter will have.
@param initial_val Starting value for the counter.


Constructor for the counter . The explicit keyword is used to make sure the user does not assign a number to the counter thinking it will be used as a counter value when it is in fact used as the number of bits . @param bits How many bits the counter will have . @param initial_val Starting value for the counter .
explicit GenericSatCounter(unsigned bits, T initial_val = 0)
        : initialVal(initial_val), maxVal((1ULL << bits) - 1),
          counter(initial_val)
    {
        fatal_if(bits > 8*sizeof(T),
                 "Number of bits exceeds counter size");
        fatal_if(initial_val > maxVal,
                 "Saturating counter's initial value exceeds max value.");
    }
explicit GenericSatCounter ( unsigned bits , T initial_val = 0 ) : initialVal ( initial_val ) , maxVal ( ( 1ULL << bits ) - 1 ) , counter ( initial_val ) { fatal_if ( bits > 8 * sizeof ( T ) , " " ) ; fatal_if ( initial_val > maxVal , " " ) ; }
Constructor for the counter.
Constructor for the counter .