Changeset 2386 in Sophya for trunk/ArchTOIPipe/Kernel/ringprocessor.cc
- Timestamp:
- May 20, 2003, 12:10:09 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/ringprocessor.cc
r2385 r2386 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: ringprocessor.cc,v 1. 1 2003-05-19 23:31:29 aubourg Exp $5 // $Id: ringprocessor.cc,v 1.2 2003-05-20 10:10:09 aubourg Exp $ 6 6 7 7 #include "ringprocessor.h" 8 8 #include "ringpipe.h" 9 #include "toimanager.h" 9 10 10 11 #include <iostream> … … 37 38 38 39 wontNeedRing = -1; 40 neededRingHistory = 3; 41 lastAWNR = -1; 42 43 TOIManager::getManager()->registerProcessor(this); 39 44 } 40 45 … … 57 62 } 58 63 59 64 void RingProcessor::setNeededRingHistory(int nr) { 65 neededRingHistory = nr; 66 } 60 67 61 68 int RingProcessor::declareRingInput(string ring) { … … 147 154 } 148 155 156 RingPipe* RingProcessor::getOutRing(string out) 157 { 158 // recherche du nom de la sortie et verification si le toi existe deja 159 map<string, int>::iterator i = outRingIx.find(out); 160 if (i == outRingIx.end()) { 161 return NULL; 162 } else { 163 return outRings[(*i).second]; 164 } 165 } 166 167 149 168 150 169 Ring const* RingProcessor::getRing(int index, int i) { … … 169 188 } 170 189 190 void RingProcessor::autoWontNeedRing(int iCur) { 191 if (neededRingHistory <=0) return; 192 if (iCur <= lastAWNR + neededRingHistory/10) return; 193 lastAWNR = iCur; 194 wontNeedRingBefore(iCur-neededRingHistory); 195 } 196 171 197 172 198 void RingProcessor::getRingRange(int& min, int&max) {
Note:
See TracChangeset
for help on using the changeset viewer.