Changeset 1744 in Sophya for trunk/ArchTOIPipe/Kernel


Ignore:
Timestamp:
Nov 10, 2001, 1:14:55 AM (24 years ago)
Author:
aubourg
Message:

optim...

Location:
trunk/ArchTOIPipe/Kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/fitstoirdr.cc

    r1738 r1744  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: fitstoirdr.cc,v 1.17 2001-11-08 15:47:44 aubourg Exp $
     5// $Id: fitstoirdr.cc,v 1.18 2001-11-10 00:14:54 aubourg Exp $
    66
    77#include "fitstoirdr.h"
     
    214214   if(colsinput[k].second) colflg[k] = new long[Buff_Sz];
    215215 }
     216 uint_8 * tmpflg = new uint_8[Buff_Sz];
    216217
    217218 //////// Read data and put into pipe
     
    253254   if(sn > mgr->getRequestedEnd()) break;
    254255   if(sn < mgr->getRequestedBegin()) continue;
     256#if 0
    255257   for(int k=0; k<getNOut(); k++) {
    256258     if(colval[k]==NULL)  continue;
     
    258260     putData(k,sn,colval[k][ip],flg);
    259261   }
     262#else
     263   if (ip == 0) {
     264     for(int k=0; k<getNOut(); k++) {
     265       if(colval[k]==NULL)  continue;
     266       if (colflg[k] != NULL) {
     267         for (int ii=0; ii<Buff_Sz; ii++) {
     268           tmpflg[ii] = colflg[k][ii];
     269         }
     270         putData(k, sn, ifin-ideb+1, colval[k], tmpflg);
     271       } else {
     272         putData(k, sn, ifin-ideb+1, colval[k]);
     273       }
     274     }
     275   }
     276#endif
    260277   totnscount++;
    261278 }
     
    263280 //////// des-allocate buffers
    264281 delete [] samplenum;
     282 delete [] tmpflg;
    265283 for(int k=0; k<getNOut(); k++) {
    266284   if(colval[k]!=NULL) delete [] colval[k];
  • trunk/ArchTOIPipe/Kernel/toisegment.cc

    r1743 r1744  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toisegment.cc,v 1.16 2001-11-09 23:13:15 aubourg Exp $
     5// $Id: toisegment.cc,v 1.17 2001-11-10 00:14:55 aubourg Exp $
    66
    77#include "toisegment.h"
     
    187187
    188188void TOISegmented::BufferSegment::putData(int sn, int n, double const* d, uint_8 const* f) {
    189   checkCommitted();
     189  if (status == NEW) {
     190    status = WRITE;
     191    sn0 = sn;
     192  }
     193  if (status == COMMITTED) {
     194    throw(ForbiddenError("TOISegment : putData in committed buffer"));
     195  }
    190196  checkInRange(sn);
    191197  checkInRange(sn+n-1);
Note: See TracChangeset for help on using the changeset viewer.