Changeset 2440 in Sophya for trunk/SophyaProg/Tests/tpipe.cc


Ignore:
Timestamp:
Oct 2, 2003, 11:59:27 AM (22 years ago)
Author:
ansari
Message:

Correction de la logique de verification du flot de donnees ds tpipe.cc - Reza 02/10/2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/tpipe.cc

    r2439 r2440  
    6262  if (proc_or_thread == 'T') cout << " ----> avec Threads " << endl;
    6363  else cout << " ----> avec fork() / process  " << endl;
    64   cout << " -- NSample= " << NSample << " NBlk1=" << NBlk2
     64  cout << " -- NSample= " << NSample << " NBlk1=" << NBlk1
    6565       << " NBlk2=" << NBlk2 << endl;
    6666  cout << " ============================================================\n" << endl;
     
    160160  int nwait = 0;
    161161  cout << " ====> fonction read_frpipe : START read from pipe ... " << endl;
     162  int kkr = -1;
    162163  for(int k=0; k<NSample; k+=NBlk2) {
    163164    for(int ii=0; ii<NBlk2; ii++) d[ii] = -2.;
     
    177178    }
    178179    ns += nrd;
    179     int kkr = d[0];
    180     for(int i=1; i<nrd; i++) {
     180    for(int i=0; i<nrd; i++) {
     181      if ((k+i)%NBlk1 == 0)  { kkr = d[i]; continue; }
    181182      double xp = cos((k+i)*DeltaX)+log((k+i)*DeltaX*100.+0.1);
    182       if (i == kkr) xp *= 3.;
     183      if (((k+i)%NBlk1) == kkr) xp *= 3.;
    183184      if (fabs(d[i]-xp) > 1.e-39)  nerr++ ;
    184185    }
Note: See TracChangeset for help on using the changeset viewer.