00001
00002
00014
00015
00016 #ifndef polybori_groebner_Long64From32BitsPair_h_
00017 #define polybori_groebner_Long64From32BitsPair_h_
00018
00019
00020 #include "groebner_defs.h"
00021 #include "PseudoLongLong.h"
00022
00023 BEGIN_NAMESPACE_PBORIGB
00024
00030 template <unsigned long High, unsigned long Low, unsigned SizeOfLong>
00031 class Long64From32BitsPairBase;
00032
00033
00034 template <unsigned long High, unsigned long Low>
00035 class Long64From32BitsPairBase<High, Low, 4> {
00036 public:
00037 static PseudoLongLong<High, Low> get() {
00038 return PseudoLongLong<High, Low>();
00039 }
00040 };
00041
00042
00043 template <unsigned long High,
00044 unsigned long Low>
00045 class Long64From32BitsPairBase<High, Low, 8> {
00046 public:
00047 typedef unsigned long long_type;
00048 static long_type get() { return (High << sizeof(long_type)*4) + Low; }
00049 };
00050
00055 template <unsigned long High, unsigned long Low>
00056 class Long64From32BitsPair:
00057 public Long64From32BitsPairBase<High, Low,
00058 sizeof(unsigned long)> {
00059 public:
00060 typedef unsigned long long_type;
00061
00062 };
00063
00064
00065 END_NAMESPACE_PBORIGB
00066
00067 #endif