Пример #1
0
void bench_fp()
{
   // const char * ch = "../TMP/f3Reduc1.tif";
   const char * ch = "/home/data/mpd/Andalousie/andaReduc1.tif";
   Tiff_Im tiff(ch);
   ELISE_fp fp(ch, ELISE_fp::READ);
tiff.show();



   INT NbTx =  tiff.sz().x/ tiff.SzTile()[0];
   INT NbTy =  tiff.sz().y/ tiff.SzTile()[1];

   REAL ttot =0;
   INT k=0;

   INT f = 1;
   char * c = new char [tiff.SzTile()[0] * tiff.SzTile()[1]*f*3];
   for (INT x=0; x< NbTx -1; x++)
       for (INT y=0; y< NbTy ; y++)
        {
           fp.seek_begin(tiff.offset_tile(x,y,0));
           ElTimer tim;
cout << tiff.offset_tile(x,y,0) << " " << tiff.byte_count_tile(x,y,0) << "\n";
           fp.read(c,1,tiff.byte_count_tile(x,y,0)/1);
           REAL  t = tim.sval();
           ttot += t;
           k++;
           cout << "Read Time  moy " << ttot/k << " " << x << " " << y << "\n";
	}
   REAL m1 =  ttot/k ;
   ttot = 0;
   k=0;

   {
   for (INT x=0; x< NbTx ; x++)
       for (INT y=0; y< NbTy ; y++)
        {
           fp.seek_begin(0);
           ElTimer tim;
           fp.seek_begin(tiff.offset_tile(x,y,0));
           REAL  t = tim.sval();
           ttot += t;
           k++;
           cout << "Time  moy " << ttot/k << " " << x << " " << y << "\n";
		}
   }

   REAL m2 =  ttot/k ;
   cout << "Moy read = " << m1 << " Moy Seek = " << m2 << "\n";
}
Пример #2
0
void Optim_L1FormLin::One_bench_craig()
{
/*

  ElMatrix<REAL> Smpd = MpdSolve();
  ElMatrix<REAL> SBar = BarrodaleSolve();

  for (INT v=0; v<_NbVar ; v++)
  {
       cout <<  SBar(0,v) << " " 
            << Smpd(0,v) <<  " " 
            << (SBar(0,v)-Smpd(0,v)) *1e10 <<"\n";
  }
*/
  ElTimer t;
  BarrodaleSolve();

   cout << "Time = " << t.sval() << " " << _NbVar << " " << _NbForm << "\n";
}