Changeset 1744 in Sophya


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

optim...

Location:
trunk/ArchTOIPipe
Files:
3 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);
  • trunk/ArchTOIPipe/ProcWSophya/toi2map.cc

    r1738 r1744  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toi2map.cc,v 1.11 2001-11-08 15:47:46 aubourg Exp $
     5// $Id: toi2map.cc,v 1.12 2001-11-10 00:14:55 aubourg Exp $
    66
    77#include "machdefs.h"
     
    115115double mjd = MJDfrYear(mActualYear);
    116116
     117 int bufsz = 100;
     118 uint_8* bfgbolo = new uint_8[bufsz];
     119 double* bbolo   = new double[bufsz];
     120 double* bc1     = new double[bufsz];
     121 double* bc2     = new double[bufsz];
     122 int i0 = -1;
     123
    117124// Remplissage des spheres
    118125for(int s=snb;s<=sne;s++) {
     126  if (i0<0 ||
     127      s<i0 ||
     128      s>=i0+bufsz) {
     129    i0 = s;
     130    int nget = bufsz;
     131    if (sne-s+1 < bufsz) {
     132      nget = sne-s+1;
     133    }
     134    getData(0, i0, nget, bc1);
     135    getData(1, i0, nget, bc2);
     136    getData(2, i0, nget, bbolo, bfgbolo);
     137  }
     138
     139 
    119140  uint_8 fgbolo = 0;
    120141  double bolo;
    121142  //              Equatoriales   /   Galactiques
    122143  // coord1,2 =   alpha,delta    /   gLon,gLat
    123   double coord1 = getData(0,s);
    124   double coord2 = getData(1,s);
    125 
    126   getData(2,s,bolo,fgbolo);
     144  //double coord1 = getData(0,s);
     145  //double coord2 = getData(1,s);
     146
     147  //getData(2,s,bolo,fgbolo);
     148  bolo = bbolo[s-i0];
     149  fgbolo = bfgbolo[s-i0];
     150  double coord1 = bc1[s-i0];
     151  double coord2 = bc2[s-i0];
    127152  if (s%100 == 0) wontNeedBefore(s-1);
    128153  if(mTFlag && fgbolo&mBadFlag) continue;
Note: See TracChangeset for help on using the changeset viewer.