Changeset 2037 in Sophya for trunk/ArchTOIPipe
- Timestamp:
- May 31, 2002, 10:10:58 AM (23 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/cgt.cc
r2000 r2037 11 11 12 12 #include "cgt.h" 13 #include <typeinfo> 13 14 #include "toiseqbuff.h" 14 15 #include "toisegment.h" … … 108 109 // for(it = lesProcs.begin(); it != lesProcs.end(); it++) { 109 110 for(int i=0; i< lesProcs.size(); i++) { 110 os << " >> Proc Id= " << i << " @ " << hex << lesProcs[i] << dec << endl; 111 os << " >> Proc Id= " << i << " @ " << hex << lesProcs[i] << dec ; 112 string ctyp = typeid(*lesProcs[i]).name(); 113 os << " Type= " << ctyp << endl; 111 114 if (prstat) lesProcs[i]->PrintStatus(os); 112 115 } … … 115 118 void CGT::ListTOIs(::ostream& os, bool prstat) 116 119 { 117 os << " --- CGT::ListTOIs() , Nb Procs=" << lesTuyaux.size();120 os << " --- CGT::ListTOIs() , NbTOIs=" << lesTuyaux.size(); 118 121 if ( fgSegmented ) os << " Default TOI: TOISegmented " << endl; 119 122 else os << " Default TOI: TOISeqBuffered " << endl; … … 121 124 os << " >> TOI " << lesTuyaux[i].toi->getName() << " Connecting Procs (Id): " 122 125 << lesTuyaux[i].pr1id << " <---> " << lesTuyaux[i].pr2id << endl; 123 if (prstat) lesTuyaux[i].toi->PrintStatus(os); 126 if (prstat > 1) lesTuyaux[i].toi->PrintStatus(os); 127 else if (prstat == 1) 128 os << " PutCountWait= " << lesTuyaux[i].toi->getCountWaitPut() 129 << " GetCountWait= " << lesTuyaux[i].toi->getCountWaitGet() << endl; 124 130 } 125 131 } -
trunk/ArchTOIPipe/Processors/nooppr.cc
r1994 r2037 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: nooppr.cc,v 1.1 0 2002-05-13 13:11:32ansari Exp $5 // $Id: nooppr.cc,v 1.11 2002-05-31 08:10:58 ansari Exp $ 6 6 7 7 #include <typeinfo> … … 16 16 if (wsz < 1) wsz = 1; 17 17 wsize = wsz; 18 delay2 = false; 18 19 totnscount = 0; 19 20 } … … 25 26 os << "\n ------------------------------------------------------ \n" 26 27 << " NoOpProcessor::PrintStatus() - WindowSize=" 27 << WSize() << endl; 28 << WSize(); 29 if (delay2) os << " Delay in2 ---> out2 " << endl; 30 else os << endl; 28 31 os << " Total number of processed samples= " << ProcessedSampleCount() 29 32 << endl; … … 91 94 } 92 95 if (fgin2 || fgout2) { 93 vin2 = new double[wsize]; 94 vfg2 = new uint_8[wsize]; 95 for(i=0; i<wsize; i++) { 96 int wsz2 = wsize; 97 if (delay2) wsz2 *= 2; 98 vin2 = new double[wsz2]; 99 vfg2 = new uint_8[wsz2]; 100 for(i=0; i<wsz2; i++) { 96 101 vin2[i] = defval; vfg2[i] = defflag; 97 102 } … … 100 105 // Boucle sur les sampleNum 101 106 // 1er partie, on traite par paquets de wsize 107 int kd2 = 0; 108 int lastk2in = 0; 102 109 for(k=snb;k<=sne-wsize+1;k+=wsize) { 103 110 if (fgin) 104 111 getData(0, k, wsize, vin, vfg); 105 if (fgin2) 106 getData(1, k, wsize, vin2, vfg2); 107 totnbblock++; 112 if (fgin2) { 113 kd2 = (delay2) ? (kd2+1)%2 : 0; 114 getData(1, k, wsize, vin2+kd2*wsize, vfg2+kd2*wsize); 115 lastk2in = k; 116 } 108 117 if (fgout) 109 118 putData(0, k, wsize, vin, vfg); 110 if (fgout2) 111 putData(1, k, wsize, vin2, vfg2); 119 if (fgout2 && (!delay2 || totnbblock > 1)) { 120 int kd2o = (delay2) ? (kd2+1)%2 : 0; 121 int nextk2o = (delay2) ? lastk2in-wsize : lastk2in; 122 putData(1, nextk2o, wsize, vin2+kd2o*wsize, vfg2+kd2o*wsize); 123 } 112 124 klast+=wsize; 113 125 totnscount+=wsize; 114 126 totnbblock++; 127 } 128 if (fgout2 && delay2) { 129 int kd2o = (kd2+1)%2; 130 putData(1, lastk2in, wsize, vin2+kd2o*wsize, vfg2+kd2o*wsize); 131 115 132 } 116 133 } -
trunk/ArchTOIPipe/Processors/nooppr.h
r2033 r2037 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: nooppr.h,v 1. 7 2002-05-30 20:44:31ansari Exp $7 // $Id: nooppr.h,v 1.8 2002-05-31 08:10:58 ansari Exp $ 8 8 9 9 … … 24 24 inline int WSize() const { return wsize; } 25 25 inline void SetWSize(int wsz) { if (wsz > 1) wsize = wsz; } 26 inline void SetDelay2(bool fg) { delay2 = fg; } 26 27 inline int_8 ProcessedSampleCount() const { return totnscount; } 27 28 … … 39 40 40 41 bool acceptnoinput; 42 bool delay2; 41 43 double defval; 42 44 long defflag; -
trunk/ArchTOIPipe/TestPipes/mesovh2.cc
r2033 r2037 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: mesovh2.cc,v 1. 3 2002-05-30 20:44:31ansari Exp $5 // $Id: mesovh2.cc,v 1.4 2002-05-31 08:10:58 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] \n"34 << " [-intoi name] [-wtoi sz] [-wnoop sz] [-delay2] \n" 35 35 << " [-bipro sz2] [-tripro sz2,sz3] [-quadpro sz2,sz3,sz4] \n" 36 36 << " [-pentapro sz2,sz3,sz4,sz5] [-hexapro sz2,sz3,sz4,sz5,sz6] \n" … … 43 43 << " -wtoi sz : sets TOISeqBuff/TOISegmented buffer size (def= 1024)\n" 44 44 << " -wnoop sz : sets NoOpProcessor window size \n" 45 << " -delay2 : Delay NoOpProcessor in2 --> out2 \n" 45 46 << " -bipro sz2: chain 2 processors sz2= NoOpProcessor 2 window size\n" 46 47 << " -tripro -quadpro -pentapro -hexapro ... chain 3-6 processors \n" … … 68 69 int wtoi = 1024; 69 70 int wnoop = 0; 71 bool fgdelay2 = false; 70 72 int keepfft = 0; 71 73 int nmax = 10; … … 134 136 intoi2 = arg[ia+1]; ia++; 135 137 } 138 else if (strcmp(arg[ia],"-delay2") == 0) fgdelay2 = true; 136 139 else if (strcmp(arg[ia],"-dbg") == 0) dbglev = 1; 137 140 else if (strcmp(arg[ia],"-dbg2") == 0) dbglev = 2; … … 170 173 noop[k].SetWSize(proc_wsz[k]); 171 174 cout << "> NoOpProcessor noop[" << k << "] created WSz=" << proc_wsz[k] << endl; 175 if (fgdelay2) { 176 cout << " Setting noop[" << k << "].SetDelay2( true ) " << endl; 177 noop[k].SetDelay2( true ); 178 } 172 179 } 173 180 … … 200 207 } 201 208 209 plombier.ListTOIs(cout, 1); 202 210 203 211 mgr->joinAll();
Note:
See TracChangeset
for help on using the changeset viewer.