Changeset 1702 in Sophya


Ignore:
Timestamp:
Oct 15, 2001, 11:32:28 PM (24 years ago)
Author:
aubourg
Message:

re-correction du bug getMaxIn

Location:
trunk/ArchTOIPipe
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/toimanager.cc

    r1699 r1702  
    11#include "toimanager.h"
    2 #include <unistd.h>
    32#include <limits.h>
    43#include <pthread.h>
    54#include <iostream.h>
    65
     6#ifndef MAXINT
     7#define MAXINT 2147483647
     8#endif
     9
    710TOIManager::TOIManager() {
    811  reqBegin = 0;
    9   reqEnd = LONG_MAX;
     12  reqEnd = MAXINT;
    1013}
    1114
     
    1720}
    1821
    19 void TOIManager::setRequestedSample(long begin, long end) {
     22void TOIManager::setRequestedSample(int begin, int end) {
    2023  reqBegin = begin;
    2124  reqEnd   = end;
    2225}
    2326
    24 long TOIManager::getRequestedBegin() {
     27int TOIManager::getRequestedBegin() {
    2528  return reqBegin;
    2629}
    2730
    28 long TOIManager::getRequestedEnd() {
     31int TOIManager::getRequestedEnd() {
    2932  return reqEnd;
    3033}
     
    9396    processed_samples = ProcessedSampleCount();
    9497    if ( (processed_samples-last_sample_count > dns_print) ||
    95         (processed_samples > total_sample_count-10) ) {
     98        (processed_samples > total_sample_count-10) ) {
    9699      last_sample_count = processed_samples;
    97100      if (nb_dns_print == 0) cout << "\n";
    98101      nb_dns_print++;
    99102      cout << ">>> " << _msg << ": ProcessedSampleCount()= " << last_sample_count
    100            << " Frac done = " << processed_samples*100/total_sample_count << " %" << endl;
     103           << " Frac done = " << processed_samples*100/total_sample_count << " %" << endl;
    101104      if (last_sample_count > total_sample_count-10)  alldone = true;
    102105      nb_sleep = 0;
     
    104107    else if ((nb_sleep+1)%5 == 0)
    105108      cout << "> " << _msg << ": ProcSamples()= " <<  processed_samples
    106            << " Done = " << " %" << processed_samples*100/total_sample_count
    107            << " NbSleep(1) = " << nb_sleep << endl;
     109           << " Done = " << " %" << processed_samples*100/total_sample_count
     110           << " NbSleep(1) = " << nb_sleep << endl;
    108111   
    109112    sleep(1);  nb_sleep++;
  • trunk/ArchTOIPipe/Kernel/toimanager.h

    r1699 r1702  
    1212public:
    1313  static TOIManager* getManager();
    14   void setRequestedSample(long begin, long end);
    15   long getRequestedBegin();
    16   long getRequestedEnd();
     14  void setRequestedSample(int begin, int end);
     15  int getRequestedBegin();
     16  int getRequestedEnd();
    1717  void addThread(pthread_t*);
    1818  void joinAll();
     
    2727};
    2828
    29 
    3029// -----------------------------------------------------------------
    3130//    Classe pour affichage de l'avancement des TOIProcessors
     
    3534class RzProcSampleCounter {
    3635public:
    37                 RzProcSampleCounter();
     36  RzProcSampleCounter();
    3837  virtual       ~RzProcSampleCounter();
    39   virtual long  ProcessedSampleCount() = 0;
     38  virtual long  ProcessedSampleCount() = 0;
    4039  virtual long  PrintStats();
    4140  inline int &  PrintRate(int pr) { return _rate; }
     
    4948class ProcSampleCounter : public RzProcSampleCounter {
    5049public:
    51                 ProcSampleCounter(const T & t) { _t = &t; }
    52   virtual long  ProcessedSampleCount()
    53                       { return _t->ProcessedSampleCount(); }
     50  ProcSampleCounter(const T & t) { _t = &t; }
     51  virtual long  ProcessedSampleCount()
     52  { return _t->ProcessedSampleCount(); }
    5453protected:
    5554  const T * _t;
     
    5756
    5857#endif
     58
  • trunk/ArchTOIPipe/Makefile.in

    r1685 r1702  
    7171          if [ -d $$d ]; then \
    7272            cd $$d; $(MAKE) clean; \
     73            cd ..; \
    7374          fi  \
    7475        done
  • trunk/ArchTOIPipe/ProcWSophya/Makefile.in

    r1692 r1702  
    8080libatsop.a: $(FILES)
    8181        $(AR) -cr libatsop.a $(FILES)
    82         ranlib libatkern.a
     82        ranlib libatsop.a
    8383        ln -f libatsop.a ../libatsop.a
    8484
Note: See TracChangeset for help on using the changeset viewer.