Changeset 2601 for branches/hpc34


Ignore:
Timestamp:
07/19/12 07:25:41 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: sdsmooth unit test

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Minor speedup of STMath::smooth.
Create Vector outside the loop.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/hpc34/src/STMath.cpp

    r2580 r2601  
    25032503    ArrayColumn<Float> specCol(tab, "SPECTRA");
    25042504    ArrayColumn<uChar> flagCol(tab, "FLAGTRA");
    2505     Vector<Float> tmpspec; specCol.get(0, tmpspec);
    2506     uInt nchan = tmpspec.nelements();
     2505    Vector<Float> spec = specCol( 0 );
     2506    uInt nchan = spec.nelements();
    25072507    Vector<Float> kvec = VectorKernel::make(type, width, nchan, True, False);
    25082508    Convolver<Float> conv(kvec, IPosition(1,nchan));
    2509     Vector<Float> spec;
    25102509    Vector<uChar> flag;
     2510    Vector<Bool> mask(nchan);
    25112511    for ( uInt i=0; i<tab.nrow(); ++i) {
    25122512      specCol.get(i, spec);
    25132513      flagCol.get(i, flag);
    2514       Vector<Bool> mask(flag.nelements());
    25152514      convertArray(mask, flag);
    25162515      Vector<Float> specout;
Note: See TracChangeset for help on using the changeset viewer.