Changeset 2597 for branches


Ignore:
Timestamp:
07/11/12 18:26:56 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

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...

Use Block instead of Matrix to store processed pair of
(feedId,spwId) and (polId,spwId) for addFeed and addDataDescription.


File:
1 edited

Legend:

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

    r2592 r2597  
    994994  {
    995995    Int idx = -1 ;
    996     uInt nEntry = ddEntry.nrow() ;
    997     Vector<Int> key( 2 ) ;
    998     key[0] = pid ;
    999     key[1] = sid ;
     996    uInt nItem = 2 ;
     997    uInt len = ddEntry.nelements() ;
     998    uInt nEntry = len / nItem ;
     999    const Int *dd_p = ddEntry.storage() ;
    10001000    for ( uInt i = 0 ; i < nEntry ; i++ ) {
    1001       if ( allEQ( ddEntry.row(i), key ) ) {
     1001      Int pol = *dd_p ;
     1002      dd_p++ ;
     1003      Int spw = *dd_p ;
     1004      dd_p++ ;
     1005      if ( pid == pol && sid == spw ) {
    10021006        idx = i ;
    10031007        break ;
     
    10151019      idx = nrow ;
    10161020
    1017       ddEntry.resize( nEntry+1, 2, True ) ;
    1018       ddEntry.row(nEntry) = key ;
     1021      ddEntry.resize( len+nItem ) ;
     1022      ddEntry[len] = pid ;
     1023      ddEntry[len+1] = sid ;
    10191024    }
    10201025
     
    10871092  {
    10881093    Int idx = -1 ;
    1089     uInt nEntry = feedEntry.nrow() ;
    1090     Vector<Int> key( 2 ) ;
    1091     key[0] = fid ;
    1092     key[1] = sid ;
     1094    uInt nItem = 2 ;
     1095    uInt len = feedEntry.nelements() ;
     1096    uInt nEntry = len / nItem ;
     1097    const Int *fe_p = feedEntry.storage() ;
    10931098    for ( uInt i = 0 ; i < nEntry ; i++ ) {
    1094       if ( allEQ( feedEntry.row(i), key ) ) {
     1099      Int feed = *fe_p ;
     1100      fe_p++ ;
     1101      Int spw = *fe_p ;
     1102      fe_p++ ;
     1103      if ( fid == feed && sid == spw ) {
    10951104        idx = i ;
    10961105        break ;
    10971106      }
    10981107    }
     1108
    10991109
    11001110    if ( idx == -1 ) {
     
    11331143      tr.put( nrow ) ;
    11341144
    1135       feedEntry.resize( nEntry+1, 2, True ) ;
    1136       feedEntry.row( nEntry ) = key ;
     1145      feedEntry.resize( len+nItem ) ;
     1146      feedEntry[len] = fid ;
     1147      feedEntry[len+1] = sid ;
    11371148    }
    11381149  }
     
    14471458
    14481459  Vector<String> stateEntry;
    1449   Matrix<Int> ddEntry;
    1450   Matrix<Int> feedEntry;
     1460  Block<Int> ddEntry;
     1461  Block<Int> feedEntry;
    14511462  vector< Vector<Int> > polEntry;
    14521463  map<uInt,Bool> processedFreqId;
Note: See TracChangeset for help on using the changeset viewer.