Cleaning code (useless comments, suppressing warnings, etc...)

This commit is contained in:
Benjamin Bouvier 2012-07-05 18:16:49 +02:00
commit 8753787725
2 changed files with 2 additions and 21 deletions

View file

@ -197,10 +197,8 @@ namespace eo
{ {
public: public:
Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore<JobData> & store ) : Job( AssignmentAlgorithm& _algo, int _masterRank, JobStore<JobData> & store ) :
// Job( AssignmentAlgorithm& _algo, int _masterRank, long maxTime = 0 ) :
assignmentAlgo( _algo ), assignmentAlgo( _algo ),
comm( Node::comm() ), comm( Node::comm() ),
// _maxTime( maxTime ),
masterRank( _masterRank ), masterRank( _masterRank ),
// Functors // Functors
sendTask( store.sendTask() ), sendTask( store.sendTask() ),
@ -230,20 +228,8 @@ namespace eo
eo::log << eo::debug; eo::log << eo::debug;
eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl; eo::log << "[M" << comm.rank() << "] Have " << totalWorkers << " workers." << std::endl;
# endif # endif
bool timeStopped = false;
while( ! isFinished() ) while( ! isFinished() )
{ {
// Time restrictions
/*
getrusage( RUSAGE_SELF , &_usage );
_current = _usage.ru_utime.tv_sec + _usage.ru_stime.tv_sec;
if( _maxTime > 0 && _current > _maxTime )
{
timeStopped = true;
break;
}
*/
timerStat.start("master_wait_for_assignee"); timerStat.start("master_wait_for_assignee");
int assignee = assignmentAlgo.get( ); int assignee = assignmentAlgo.get( );
while( assignee <= 0 ) while( assignee <= 0 )
@ -301,12 +287,6 @@ namespace eo
# ifndef NDEBUG # ifndef NDEBUG
eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl; eo::log << "[M" << comm.rank() << "] Leaving master task." << std::endl;
# endif # endif
/*
if( timeStopped )
{
throw eoMaxTimeException( _current );
}
*/
} }
void worker( ) void worker( )
@ -359,7 +339,6 @@ namespace eo
struct rusage _usage; struct rusage _usage;
long _current; long _current;
// const long _maxTime;
}; };
} }
} }

View file

@ -11,6 +11,7 @@ namespace eo
{ {
void operator()( int _ ) void operator()( int _ )
{ {
++_;
} }
}; };
@ -18,6 +19,7 @@ namespace eo
{ {
void operator()( int _ ) void operator()( int _ )
{ {
++_;
} }
}; };