Changeset 2033 in Sophya for trunk/ArchTOIPipe
- Timestamp:
- May 30, 2002, 10:44:31 PM (23 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Processors/nooppr.h
r1994 r2033 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: nooppr.h,v 1. 6 2002-05-13 13:11:32ansari Exp $7 // $Id: nooppr.h,v 1.7 2002-05-30 20:44:31 ansari Exp $ 8 8 9 9 … … 23 23 24 24 inline int WSize() const { return wsize; } 25 inline void SetWSize(int wsz) { if (wsz > 1) wsize = wsz; } 25 26 inline int_8 ProcessedSampleCount() const { return totnscount; } 26 27 -
trunk/ArchTOIPipe/TestPipes/mesovh2.cc
r2000 r2033 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: mesovh2.cc,v 1. 2 2002-05-14 13:06:58ansari Exp $5 // $Id: mesovh2.cc,v 1.3 2002-05-30 20:44:31 ansari Exp $ 6 6 /* mesure de performance de l'architecture 7 7 … … 32 32 else { 33 33 cout << "\n Usage : mesovh2 [-dbg] [-start snb] [-end sne] \n" 34 << " [-intoi name] [-wtoi sz] [-wnoop sz] [-bipro] \n" 34 << " [-intoi name] [-wtoi sz] [-wnoop sz] \n" 35 << " [-bipro sz2] [-tripro sz2,sz3] [-quadpro sz2,sz3,sz4] \n" 36 << " [-pentapro sz2,sz3,sz4,sz5] [-hexapro sz2,sz3,sz4,sz5,sz6] \n" 35 37 << " [-intoi2 name] [-prstat] [-useseqbuff] inFitsName \n" 36 38 << " -dbg : sets CGT class debug level to 1 \n" … … 41 43 << " -wtoi sz : sets TOISeqBuff/TOISegmented buffer size (def= 1024)\n" 42 44 << " -wnoop sz : sets NoOpProcessor window size \n" 43 << " -bipro : chain 2 processors \n" 45 << " -bipro sz2: chain 2 processors sz2= NoOpProcessor 2 window size\n" 46 << " -tripro -quadpro -pentapro -hexapro ... chain 3-6 processors \n" 44 47 << " -intoi2 toiName : chaine 2 procs with toi2->in2\n" 45 48 << " -prstat : PrintStat with ProcSampleCounter \n" … … 57 60 58 61 // --------- Decoding command line parameters 59 bool fgbipro = false; 62 int nb_procs = 1; 63 int proc_wsz[6] = {0,0,0,0,0,0}; 60 64 bool fgsetstart = false; 61 65 bool fgprstat = false; … … 94 98 wnoop = atoi(arg[ia+1]); ia++; 95 99 } 100 else if (strcmp(arg[ia],"-bipro") == 0) { 101 if (ia == narg-1) Usage(true); 102 nb_procs = 2; 103 sscanf(arg[ia+1],"%d",proc_wsz+1); ia++; 104 } 105 else if (strcmp(arg[ia],"-tripro") == 0) { 106 if (ia == narg-1) Usage(true); 107 nb_procs = 3; 108 sscanf(arg[ia+1],"%d,%d",proc_wsz+1,proc_wsz+2 ); ia++; 109 } 110 else if (strcmp(arg[ia],"-quadpro") == 0) { 111 if (ia == narg-1) Usage(true); 112 nb_procs = 4; 113 sscanf(arg[ia+1],"%d,%d,%d",proc_wsz+1,proc_wsz+2,proc_wsz+3 ); ia++; 114 } 115 else if (strcmp(arg[ia],"-pentapro") == 0) { 116 if (ia == narg-1) Usage(true); 117 nb_procs = 5; 118 sscanf(arg[ia+1],"%d,%d,%d,%d",proc_wsz+1,proc_wsz+2, 119 proc_wsz+3,proc_wsz+4); ia++; 120 } 121 else if (strcmp(arg[ia],"-pentapro") == 0) { 122 if (ia == narg-1) Usage(true); 123 nb_procs = 6; 124 sscanf(arg[ia+1],"%d,%d,%d,%d,%d",proc_wsz+1,proc_wsz+2, 125 proc_wsz+3,proc_wsz+4,proc_wsz+5 ); ia++; 126 } 96 127 else if (strcmp(arg[ia],"-intoi") == 0) { 97 128 if (ia == narg-1) Usage(true); … … 100 131 else if (strcmp(arg[ia],"-intoi2") == 0) { 101 132 if (ia == narg-1) Usage(true); 102 fg bipro = fgtoi2 = true;133 fgtoi2 = true; 103 134 intoi2 = arg[ia+1]; ia++; 104 135 } 105 else if (strcmp(arg[ia],"-bipro") == 0) fgbipro = true;106 136 else if (strcmp(arg[ia],"-dbg") == 0) dbglev = 1; 107 137 else if (strcmp(arg[ia],"-dbg2") == 0) dbglev = 2; … … 133 163 134 164 FITSTOIReader r(infile); 135 cout << "> FITSTOIReader reader created" << endl; 136 NoOpProcessor noop(wnoop); 137 NoOpProcessor noop2(wnoop); 138 cout << "> NoOpProcessor noop noop2 created" << endl; 165 cout << "> FITSTOIReader reader created File=" << infile << endl; 166 proc_wsz[0] = wnoop; 167 NoOpProcessor noop[6]; 168 int k; 169 for(k=0; k<nb_procs; k++) { 170 noop[k].SetWSize(proc_wsz[k]); 171 cout << "> NoOpProcessor noop[" << k << "] created WSz=" << proc_wsz[k] << endl; 172 } 139 173 140 174 cout << "> Connecting to Processors through plombier ... " << endl; 141 175 string inname = "in"; 142 plombier.Connect(r, intoi, noop , inname);176 plombier.Connect(r, intoi, noop[0], inname); 143 177 144 178 if (fgtoi2) { 145 179 int w2 = (wnoop > 0) ? wtoi+wnoop : wtoi; 146 180 inname = "in2"; 147 plombier.Connect(r, intoi2, noop , inname, "", w2);148 } 149 if (fgbipro) {150 plombier.Connect(noop , "out", noop2, "in");151 if (fgtoi2) plombier.Connect(noop , "out2", noop2, "in2");181 plombier.Connect(r, intoi2, noop[0], inname, "", w2); 182 } 183 for(k=1; k<nb_procs; k++) { 184 plombier.Connect(noop[k-1], "out", noop[k], "in"); 185 if (fgtoi2) plombier.Connect(noop[k-1], "out2", noop[k], "in2"); 152 186 } 153 187 … … 160 194 if (fgprstat) { 161 195 // --------------- Impression continu de stat ------------------- 162 ProcSampleCounter<NoOpProcessor> stats(noop );196 ProcSampleCounter<NoOpProcessor> stats(noop[0]); 163 197 stats.InfoMessage() = "mesovh2/Info"; 164 198 stats.PrintStats(); … … 170 204 PrtTim("End threads"); 171 205 172 cout << noop ;173 if ( fgbipro) cout << noop2;206 cout << noop[0] ; 207 if (nb_procs > 1) cout << noop[nb_procs-1] ; 174 208 } 175 209 catch (PThrowable & exc) {
Note:
See TracChangeset
for help on using the changeset viewer.