#include <sys/time.h>
#include <gmpxx.h>
#include "borderbasix/arithm/bignum.H"
#include "borderbasix/arithm/Zp.H"
#include <iostream>
#include <stdio.h>
#include <list>
#include <vector>
#include <map>
#include "borderbasix/mpoly.H"
#include <time.h>
#include "borderbasix/dlexorder.cc"
#include "borderbasix/general.h"
#include "borderbasix/arithm/zpspecial.cc"
#include "borderbasix/post_treatment/resolve2.cc"
Go to the source code of this file.
#define choice_grevlex choice |
Definition at line 36 of file solver_bb_mod.cpp.
#define COEFF Z<MON_PREMIER,short int> |
Definition at line 45 of file solver_bb_mod.cpp.
#define COMPUTE_MAT |
Definition at line 41 of file solver_bb_mod.cpp.
#define GOTZMANN |
Definition at line 56 of file solver_bb_mod.cpp.
#define MON_PREMIER 32051 |
Definition at line 43 of file solver_bb_mod.cpp.
#define NBDIGITS 160 |
Definition at line 42 of file solver_bb_mod.cpp.
#define NEED_INIT_ELEM |
Definition at line 51 of file solver_bb_mod.cpp.
#define nored |
Definition at line 29 of file solver_bb_mod.cpp.
#define PETITFERMAT |
Definition at line 50 of file solver_bb_mod.cpp.
#define REALSOLVE |
Definition at line 30 of file solver_bb_mod.cpp.
#define sparse2 |
Definition at line 55 of file solver_bb_mod.cpp.
#define unimul |
Definition at line 31 of file solver_bb_mod.cpp.
#define uninf |
Definition at line 32 of file solver_bb_mod.cpp.
#define WORKSPACE |
Definition at line 58 of file solver_bb_mod.cpp.
Definition at line 69 of file solver_bb_mod.cpp.
typedef Monom< RR , numexp<'x',7, long long > > Mon |
Definition at line 68 of file solver_bb_mod.cpp.
typedef predicat<mon> typpredicat |
Definition at line 76 of file solver_bb_mod.cpp.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 99 of file solver_bb_mod.cpp.
References countpoint(), Iszero(), printmatfile(), readfile(), sweep(), tempsCDSP, and tempsdssdp.
00100 { 00101 #ifdef tableop 00102 inittableop(); 00103 #endif 00104 #ifdef mymod 00105 macrev_Z dummy; 00106 dummy.init_Z("32051"); 00107 #endif 00108 list<harewell<COEFF> > lmat; 00109 list<mon> stockmon; 00110 #ifndef DENSE 00111 monomial_server<mon,pol<mon,COEFF> > serv; 00112 #endif 00113 FILE *fic; 00114 list<Poly> toto; 00115 list<dumpstruct<pol<mon,COEFF> > > dump; 00116 harewell<COEFF> m; 00117 Base<predicat<mon> > b; 00118 //cout<<"sizeof(long int) "<<sizeof(long int)<<endl; 00119 mpai_set_prec(3); 00120 Precision(90); 00121 printf("%s\n",argv[1]);fflush(stdout); 00122 readfile(toto,argv[1]); 00123 // perturb(toto); 00124 #ifndef DENSE 00125 algo<list<Poly>,list<pol<mon,COEFF> >, 00126 list<dumpstruct<pol<mon,COEFF> > > 00127 ,Base<predicat<mon> >, harewell >(toto,dump,b,serv); 00128 #else 00129 algo<list<Poly>,list<pol<mon,COEFF> >, 00130 list<dumpstruct<pol<mon,COEFF> > > 00131 ,Base<predicat<mon> >, harewell >(toto,dump,b); 00132 #endif 00133 #ifdef AFFICHE 00134 //debut affichage 00135 int total=0; 00136 for(list<dumpstruct<pol<mon,COEFF> > >::iterator iter=dump.begin(); 00137 iter!=dump.end();iter++) 00138 for(int i=0;i<iter->size;i++) 00139 { 00140 00141 int nbzero=0; 00142 for(int j=0;j<iter->nf[i].size;j++) 00143 if(Iszero(iter->nf[i].nf[j])) nbzero++; 00144 cout<<invconv<Poly>(iter->nf[i])<<","<<endl; 00145 total+=iter->nf[i].size; 00146 cout<<"taille "<<iter->nf[i].size<<"nbzero "<<nbzero<<endl; 00147 } 00148 cout<<"total place memoire "<<total<<endl; 00149 //fin affichage 00150 #endif 00151 #ifndef DENSE 00152 cout<<"nb point dans quotient "<<countpoint(b,dump,serv)<<endl; 00153 #else 00154 cout<<"nb point dans quotient "<<countpoint(b,dump)<<endl; 00155 #endif 00156 00157 #ifndef DENSE 00158 // affdebug(m); 00159 if(argc>2) 00160 { 00161 char nom[10]; 00162 harewell<complex< long double> > tmp; 00163 //harewell<complex< mpf_class> > tmp; 00164 int i,j; 00165 list<mon>::iterator iterstock; 00166 computestockmon(stockmon,b,dump); 00167 cout<<"coputestockmon "<<stockmon.size()<<endl; 00168 list<harewell<mpq_t> > loclmat; 00169 harewell<mpq_t > tmploc; 00170 fic=fopen(argv[2],"w"); 00171 for(int i=0;i<b.nbvar();i++) 00172 { 00173 #ifdef SYMBO 00174 tmploc= harewell<mpq_t >(stockmon.size(),stockmon.size()); 00175 #endif 00176 matmul(m,i,dump,b,stockmon,serv); 00177 sprintf(nom,"m%d",i); 00178 printmatfile(m,nom,fic); 00179 #ifdef SYMBO 00180 for(int k=0;k<stockmon.size();k++) 00181 for(int l=0;l<stockmon.size();l++) 00182 harewell_set_coeff(tmploc,l,k,&m(k,l).rep()); 00183 #endif 00184 lmat.push_back(m); 00185 loclmat.push_back(tmploc); 00186 } 00187 #ifdef SYMBO 00188 ptpol_t *res; 00189 res=(ptpol_t*)malloc((b.nbvar()+1)*sizeof(ptpol_t)); 00190 for(int i=0;i<b.nbvar()+1;i++) 00191 ptpol_init(res[i]); 00192 symbo(res,loclmat, stockmon,dump,b); 00193 for(int i=0;i<b.nbvar()+1;i++) 00194 { 00195 ptpol_out_str(fic,res[i]); 00196 fprintf(fic,";\n"); 00197 } 00198 #endif 00199 #ifdef REALSOLVE 00200 00201 if(argc>3) 00202 { 00203 realsolve2(lmat,b,tmp); 00204 printmatfile(tmp,"sol",fic); 00205 } 00206 #endif 00207 tmp.destroystore();m.destroystore(); 00208 fprintf(fic,"mon:=["); 00209 iterstock=stockmon.begin(); 00210 for(i=0;i<(int)(stockmon.size()-1);i++,iterstock++) 00211 { 00212 for( j=0;j<b.nbvar()-1;j++) 00213 fprintf(fic,"x%d^%d*",j,(int)iterstock->GetDegree(j)); 00214 fprintf(fic,"x%d^%d,",j,(int)iterstock->GetDegree(j)); 00215 } 00216 for(j=0;j<b.nbvar()-1;j++) 00217 fprintf(fic,"x%d^%d*",j,(int)iterstock->GetDegree(j)); 00218 fprintf(fic,"x%d^%d];\n",j,(int)iterstock->GetDegree(j)); 00219 00220 fclose(fic); 00221 } 00222 00223 #ifdef RS_OUT 00224 fic=fopen(argv[2],"w"); 00225 rs_out(dump,b,fic); 00226 #endif 00227 // printdump(stdout,dump); 00228 00229 //Liberation de la memoire 00230 /*#ifdef unimul 00231 #ifdef uninf 00232 sweep(dump,b,multiple,nfmul); 00233 #endif 00234 #else 00235 #ifdef unimul 00236 sweep(dump,b,multiple); 00237 #else 00238 #ifdef uninf 00239 sweep(dump,b,nfmul); 00240 #else 00241 */ 00242 sweep(dump,b); 00243 //#endif 00244 //#endif 00245 //#endif 00246 cout<<"temps dans generickernel "<<tempsdssdp<<endl; 00247 cout<<"temps dans CSDP "<<tempsCDSP<<endl; 00248 #endif //DENSE 00249 }
double tempsCDSP = 0 |
Definition at line 7 of file solver_bb_mod.cpp.
double tempsdssdp = 0 |
Definition at line 6 of file solver_bb_mod.cpp.
struct timeval initclock tmpclock |
Definition at line 5 of file solver_bb_mod.cpp.