Changeset 2393 for trunk/src/STGrid.h


Ignore:
Timestamp:
01/05/12 12:10:37 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Parallel version of STGrid. Implemented using concurrent module.
Two threads are running in parallel. Those are responsible for
retrieving data and processing data respectively.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.h

    r2390 r2393  
    2626#include <tables/Tables/ScalarColumn.h>
    2727#include <tables/Tables/ArrayColumn.h>
     28
     29#include "concurrent.h"
    2830//#include <tables/Tables/TableRow.h>
    2931
     
    100102                      Array<uInt> &rflag,
    101103                      Array<Float> &weight ) ;
     104  Int getDataChunk( IPosition const &wshape,
     105                    IPosition const &vshape,
     106                    IPosition const &dshape,
     107                    Array<Complex> &spectra,
     108                    Array<Double> &direction,
     109                    Array<Int> &flagtra,
     110                    Array<Int> &rflag,
     111                    Array<Float> &weight ) ;
    102112  Int getDataChunk( Array<Complex> &spectra,
    103113                    Array<Double> &direction,
     
    128138  void prepareTable( Table &tab, String &name ) ;
    129139
    130   Bool pastEnd() ;
     140//   Bool pastEnd() ;
    131141
    132142  void selectData() ;
     
    160170  void initTable( uInt idx ) ;
    161171  Bool isMultiIF( Table &tab ) ;
     172  static bool produceChunk(void *ctx) throw(concurrent::PCException);
     173  static void consumeChunk(void *ctx) throw(concurrent::PCException);
    162174
    163175
     
    172184  uInt nfile_ ;
    173185  Int ifno_ ;
     186
    174187  Int nx_ ;
    175188  Int ny_ ;
     
    177190  Int npolOrg_ ;
    178191  Int nchan_ ;
    179   Int nrow_ ;
    180   Block<Int> rows_ ;
    181192  Double cellx_ ;
    182193  Double celly_ ;
     
    186197  Int userSupport_ ;
    187198  Int convSampling_ ;
    188   Array<Float> data_ ;
    189199  Vector<uInt> pollist_ ;
    190200  Vector<uInt> scanlist_ ;
    191201  String wtype_ ;
     202  Block<Table> tableList_ ;
     203  Vector<uInt> rows_ ;
     204  Int nchunk_ ;
     205
     206  /////////////// gridPerRow variable
     207  IPosition vshape_;
     208  IPosition wshape_;
     209  IPosition dshape_;
     210  // loop variable
     211  Int nrow_ ;
     212  Array<Float> data_ ;
    192213
    193214  Table tab_ ;
    194   Block<Table> tableList_ ;
     215  // per pol
    195216  Table ptab_ ;
    196217  ROArrayColumn<Float> spectraCol_ ;
     
    200221  ROArrayColumn<Float> tsysCol_ ;
    201222  ROScalarColumn<Double> intervalCol_ ;
     223
    202224  Int nprocessed_ ;
    203   Int nchunk_ ;
    204 
    205   Array<Float> spectraF_ ;
    206   Array<uChar> flagtraUC_ ;
    207   Array<uInt> rflagUI_ ;
    208 
     225
     226
     227  double eGetData_;
     228  double eToPixel_;
     229  double eGGridSD_;
    209230};
    210231}
Note: See TracChangeset for help on using the changeset viewer.