Changeset 2597
- Timestamp:
- 07/11/12 18:26:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc34/src/MSWriter.cpp
r2592 r2597 994 994 { 995 995 Int idx = -1 ; 996 uInt n Entry = 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() ; 1000 1000 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 ) { 1002 1006 idx = i ; 1003 1007 break ; … … 1015 1019 idx = nrow ; 1016 1020 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 ; 1019 1024 } 1020 1025 … … 1087 1092 { 1088 1093 Int idx = -1 ; 1089 uInt n Entry = 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() ; 1093 1098 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 ) { 1095 1104 idx = i ; 1096 1105 break ; 1097 1106 } 1098 1107 } 1108 1099 1109 1100 1110 if ( idx == -1 ) { … … 1133 1143 tr.put( nrow ) ; 1134 1144 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 ; 1137 1148 } 1138 1149 } … … 1447 1458 1448 1459 Vector<String> stateEntry; 1449 Matrix<Int> ddEntry;1450 Matrix<Int> feedEntry;1460 Block<Int> ddEntry; 1461 Block<Int> feedEntry; 1451 1462 vector< Vector<Int> > polEntry; 1452 1463 map<uInt,Bool> processedFreqId;
Note:
See TracChangeset
for help on using the changeset viewer.