00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <ppl-config.h>
00025
00026 #include "Coefficient.defs.hh"
00027
00028 namespace Parma_Polyhedra_Library {
00029
00030 #if defined(PPL_CHECKED_INTEGERS) || defined(PPL_NATIVE_INTEGERS)
00031 void
00032 Coefficient_constants_initialize() {
00033 }
00034
00035 void
00036 Coefficient_constants_finalize() {
00037 }
00038 #endif
00039
00040 #ifdef PPL_GMP_INTEGERS
00041 const Coefficient* Coefficient_zero_p = 0;
00042 const Coefficient* Coefficient_one_p = 0;
00043
00044 void
00045 Coefficient_constants_initialize() {
00046 PPL_ASSERT(Coefficient_zero_p == 0);
00047 Coefficient_zero_p = new Coefficient(0);
00048
00049 PPL_ASSERT(Coefficient_one_p == 0);
00050 Coefficient_one_p = new Coefficient(1);
00051 }
00052
00053 void
00054 Coefficient_constants_finalize() {
00055 PPL_ASSERT(Coefficient_zero_p != 0);
00056 delete Coefficient_zero_p;
00057 Coefficient_zero_p = 0;
00058
00059 PPL_ASSERT(Coefficient_one_p != 0);
00060 delete Coefficient_one_p;
00061 Coefficient_one_p = 0;
00062 }
00063 #endif
00064
00065 }