00001
00002
00003 #ifndef AITOOLS_BIGHASHMAP_JNA_CONSTANT_SIZE_TYPES_HPP
00004 #define AITOOLS_BIGHASHMAP_JNA_CONSTANT_SIZE_TYPES_HPP
00005
00006 #include "value/pair.hpp"
00007 #include "value/triple.hpp"
00008 #include "value/quadruple.hpp"
00009
00013 namespace aitools {
00014 namespace value {
00015
00016 template <int type_id> struct mapper;
00017
00018
00019 typedef double SingleDouble;
00020 typedef int32_t SingleInt;
00021 typedef int64_t SingleLong;
00022
00023 template <> struct mapper<101> { typedef SingleDouble type; };
00024 template <> struct mapper<102> { typedef SingleInt type; };
00025 template <> struct mapper<103> { typedef SingleLong type; };
00026
00027
00028 typedef pair<double, double> DoubleDouble;
00029 typedef pair<double, int32_t> DoubleInt;
00030 typedef pair<double, int64_t> DoubleLong;
00031 typedef pair<int32_t, double> IntDouble;
00032 typedef pair<int32_t, int32_t> IntInt;
00033 typedef pair<int32_t, int64_t> IntLong;
00034 typedef pair<int64_t, double> LongDouble;
00035 typedef pair<int64_t, int32_t> LongInt;
00036 typedef pair<int64_t, int64_t> LongLong;
00037 typedef pair<int16_t, int32_t> ShortInt;
00038
00039 template <> struct mapper<201> { typedef DoubleDouble type; };
00040 template <> struct mapper<202> { typedef DoubleInt type; };
00041 template <> struct mapper<203> { typedef DoubleLong type; };
00042 template <> struct mapper<204> { typedef IntDouble type; };
00043 template <> struct mapper<205> { typedef IntInt type; };
00044 template <> struct mapper<206> { typedef IntLong type; };
00045 template <> struct mapper<207> { typedef LongDouble type; };
00046 template <> struct mapper<208> { typedef LongInt type; };
00047 template <> struct mapper<209> { typedef LongLong type; };
00048 template <> struct mapper<210> { typedef ShortInt type; };
00049
00050
00051 typedef triple<double, double, double> DoubleDoubleDouble;
00052 typedef triple<double, int32_t, double> DoubleIntDouble;
00053 typedef triple<double, int32_t, int32_t> DoubleIntInt;
00054 typedef triple<int32_t, double, double> IntDoubleDouble;
00055 typedef triple<int32_t, int32_t, double> IntIntDouble;
00056 typedef triple<int32_t, int32_t, int32_t> IntIntInt;
00057 typedef triple<int64_t, double, double> LongDoubleDouble;
00058 typedef triple<int64_t, int32_t, double> LongIntDouble;
00059 typedef triple<int64_t, int32_t, int32_t> LongIntInt;
00060
00061 template <> struct mapper<301> { typedef DoubleDoubleDouble type; };
00062 template <> struct mapper<302> { typedef DoubleIntDouble type; };
00063 template <> struct mapper<303> { typedef DoubleIntInt type; };
00064 template <> struct mapper<304> { typedef IntDoubleDouble type; };
00065 template <> struct mapper<305> { typedef IntIntDouble type; };
00066 template <> struct mapper<306> { typedef IntIntInt type; };
00067 template <> struct mapper<307> { typedef LongDoubleDouble type; };
00068 template <> struct mapper<308> { typedef LongIntDouble type; };
00069 template <> struct mapper<309> { typedef LongIntInt type; };
00070
00071
00072 typedef quadruple<double, double, int32_t, int32_t> DoubleDoubleIntInt;
00073 typedef quadruple<double, double, int64_t, int64_t> DoubleDoubleLongLong;
00074 typedef quadruple<int32_t, int32_t, double, double> IntIntDoubleDouble;
00075 typedef quadruple<int32_t, int32_t, int64_t, int64_t> IntIntLongLong;
00076 typedef quadruple<int64_t, double, int64_t, int32_t> LongDoubleLongInt;
00077 typedef quadruple<int64_t, int64_t, double, double> LongLongDoubleDouble;
00078 typedef quadruple<int64_t, int64_t, int32_t, int32_t> LongLongIntInt;
00079
00080 typedef quadruple<double, int64_t, int64_t, int32_t> DoubleLongLongInt;
00081
00082 template <> struct mapper<401> { typedef DoubleDoubleIntInt type; };
00083 template <> struct mapper<402> { typedef DoubleDoubleLongLong type; };
00084 template <> struct mapper<403> { typedef IntIntDoubleDouble type; };
00085 template <> struct mapper<404> { typedef IntIntLongLong type; };
00086 template <> struct mapper<405> { typedef LongDoubleLongInt type; };
00087 template <> struct mapper<406> { typedef LongLongDoubleDouble type; };
00088 template <> struct mapper<407> { typedef LongLongIntInt type; };
00089
00090 template <> struct mapper<408> { typedef DoubleLongLongInt type; };
00091
00092 }
00093 }
00094
00095 #endif // AITOOLS_BIGHASHMAP_JNA_CONSTANT_SIZE_TYPES_HPP