PolyBoRi
NBitsUsed.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_NBitsUsed_h_
17 #define polybori_groebner_NBitsUsed_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
23 
30 template<unsigned long NValue>
31 class NBitsUsed {
32 public:
33  enum { value = NBitsUsed<(NValue >> 1)>::value + 1};
34 };
35 
36 template<>
37 class NBitsUsed<0> {
38 public:
39  enum { value = 0};
40 };
41 
42 
44 
45 #endif /* polybori_groebner_NBitsUsed_h_ */
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class defines NBitsUsed whose value attribute computes the actual number of used bits at compile...
Definition: NBitsUsed.h:31