Changeset 1702 in Sophya
- Timestamp:
- Oct 15, 2001, 11:32:28 PM (24 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/toimanager.cc
r1699 r1702 1 1 #include "toimanager.h" 2 #include <unistd.h>3 2 #include <limits.h> 4 3 #include <pthread.h> 5 4 #include <iostream.h> 6 5 6 #ifndef MAXINT 7 #define MAXINT 2147483647 8 #endif 9 7 10 TOIManager::TOIManager() { 8 11 reqBegin = 0; 9 reqEnd = LONG_MAX;12 reqEnd = MAXINT; 10 13 } 11 14 … … 17 20 } 18 21 19 void TOIManager::setRequestedSample( long begin, longend) {22 void TOIManager::setRequestedSample(int begin, int end) { 20 23 reqBegin = begin; 21 24 reqEnd = end; 22 25 } 23 26 24 longTOIManager::getRequestedBegin() {27 int TOIManager::getRequestedBegin() { 25 28 return reqBegin; 26 29 } 27 30 28 longTOIManager::getRequestedEnd() {31 int TOIManager::getRequestedEnd() { 29 32 return reqEnd; 30 33 } … … 93 96 processed_samples = ProcessedSampleCount(); 94 97 if ( (processed_samples-last_sample_count > dns_print) || 95 98 (processed_samples > total_sample_count-10) ) { 96 99 last_sample_count = processed_samples; 97 100 if (nb_dns_print == 0) cout << "\n"; 98 101 nb_dns_print++; 99 102 cout << ">>> " << _msg << ": ProcessedSampleCount()= " << last_sample_count 100 103 << " Frac done = " << processed_samples*100/total_sample_count << " %" << endl; 101 104 if (last_sample_count > total_sample_count-10) alldone = true; 102 105 nb_sleep = 0; … … 104 107 else if ((nb_sleep+1)%5 == 0) 105 108 cout << "> " << _msg << ": ProcSamples()= " << processed_samples 106 107 109 << " Done = " << " %" << processed_samples*100/total_sample_count 110 << " NbSleep(1) = " << nb_sleep << endl; 108 111 109 112 sleep(1); nb_sleep++; -
trunk/ArchTOIPipe/Kernel/toimanager.h
r1699 r1702 12 12 public: 13 13 static TOIManager* getManager(); 14 void setRequestedSample( long begin, longend);15 longgetRequestedBegin();16 longgetRequestedEnd();14 void setRequestedSample(int begin, int end); 15 int getRequestedBegin(); 16 int getRequestedEnd(); 17 17 void addThread(pthread_t*); 18 18 void joinAll(); … … 27 27 }; 28 28 29 30 29 // ----------------------------------------------------------------- 31 30 // Classe pour affichage de l'avancement des TOIProcessors … … 35 34 class RzProcSampleCounter { 36 35 public: 37 36 RzProcSampleCounter(); 38 37 virtual ~RzProcSampleCounter(); 39 virtual long 38 virtual long ProcessedSampleCount() = 0; 40 39 virtual long PrintStats(); 41 40 inline int & PrintRate(int pr) { return _rate; } … … 49 48 class ProcSampleCounter : public RzProcSampleCounter { 50 49 public: 51 52 virtual long 53 50 ProcSampleCounter(const T & t) { _t = &t; } 51 virtual long ProcessedSampleCount() 52 { return _t->ProcessedSampleCount(); } 54 53 protected: 55 54 const T * _t; … … 57 56 58 57 #endif 58 -
trunk/ArchTOIPipe/Makefile.in
r1685 r1702 71 71 if [ -d $$d ]; then \ 72 72 cd $$d; $(MAKE) clean; \ 73 cd ..; \ 73 74 fi \ 74 75 done -
trunk/ArchTOIPipe/ProcWSophya/Makefile.in
r1692 r1702 80 80 libatsop.a: $(FILES) 81 81 $(AR) -cr libatsop.a $(FILES) 82 ranlib libat kern.a82 ranlib libatsop.a 83 83 ln -f libatsop.a ../libatsop.a 84 84
Note:
See TracChangeset
for help on using the changeset viewer.