PolyBoRi
NBitsUsed.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00014 //*****************************************************************************
00015 
00016 #ifndef polybori_groebner_NBitsUsed_h_
00017 #define polybori_groebner_NBitsUsed_h_
00018 
00019 // include basic definitions
00020 #include "groebner_defs.h"
00021 
00022 BEGIN_NAMESPACE_PBORIGB
00023 
00030 template<unsigned long NValue>
00031 class NBitsUsed {
00032 public:
00033   enum { value = NBitsUsed<(NValue >> 1)>::value + 1};
00034 };
00035 
00036 template<>
00037 class NBitsUsed<0> {
00038 public:
00039   enum { value = 0};
00040 };
00041 
00042 
00043 END_NAMESPACE_PBORIGB
00044 
00045 #endif /* polybori_groebner_NBitsUsed_h_ */