All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | List of all members
Log2< N, CURRENT_VAL, COUNT > Struct Template Reference

Detailed description

template< int N, int CURRENT_VAL = N, int COUNT = 0>
struct Log2< N, CURRENT_VAL, COUNT >

Statically determine log2(N), rounded up.

For example: Log2<8>::VALUE // 3 Log2<3>::VALUE // 2

Public Types

enum  { VALUE = Log2<N, (CURRENT_VAL >> 1), COUNT + 1>::VALUE }
 Static logarithm value. More...

Member Enumeration Documentation

template<int N, int CURRENT_VAL = N, int COUNT = 0>
anonymous enum

Static logarithm value.


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