Merge branch 'master' into openmp
This commit is contained in:
commit
534b8a73ad
90 changed files with 7670 additions and 12 deletions
|
|
@ -264,13 +264,13 @@ public:
|
|||
|
||||
// eoDualStatSwitch( eoStat<EOT,T> & stat_feasible, eoStat<EOT,T> & stat_unfeasible, std::string sep=" " ) :
|
||||
eoDualStatSwitch( EOSTAT & stat_feasible, EOSTAT & stat_unfeasible, std::string sep=" " ) :
|
||||
_stat_feasible(stat_feasible),
|
||||
_stat_unfeasible(stat_unfeasible),
|
||||
_sep(sep),
|
||||
eoStat<EOT,std::string>(
|
||||
"?"+sep+"?",
|
||||
stat_feasible.longName()+sep+stat_unfeasible.longName()
|
||||
)
|
||||
),
|
||||
_stat_feasible(stat_feasible),
|
||||
_stat_unfeasible(stat_unfeasible),
|
||||
_sep(sep)
|
||||
{ }
|
||||
|
||||
virtual void operator()( const eoPop<EOT> & pop )
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ template< class EOT >
|
|||
class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT >
|
||||
{
|
||||
public:
|
||||
eoEvalUserTimeThrowException( eoEvalFunc<EOT> & func, long max ) : _max(max), eoEvalFuncCounter<EOT>( func, "CPU-user") {}
|
||||
eoEvalUserTimeThrowException( eoEvalFunc<EOT> & func, const long max ) : eoEvalFuncCounter<EOT>( func, "CPU-user"), _max(max) {}
|
||||
|
||||
virtual void operator() ( EOT & eo )
|
||||
{
|
||||
|
|
@ -47,8 +47,9 @@ public:
|
|||
|
||||
getrusage(RUSAGE_SELF,&_usage);
|
||||
|
||||
if( _usage.ru_utime.tv_sec >= _max ) {
|
||||
throw eoMaxTimeException( _usage.ru_utime.tv_sec );
|
||||
long current = _usage.ru_utime.tv_sec;
|
||||
if( current >= _max ) {
|
||||
throw eoMaxTimeException( current );
|
||||
} else {
|
||||
func(eo);
|
||||
}
|
||||
|
|
@ -56,6 +57,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
long _max;
|
||||
const long _max;
|
||||
struct rusage _usage;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
virtual const char* what() const throw()
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << "STOP in eoMaxTimeException: the maximum number of wallclock seconds has been reached (" << _elapsed << ").";
|
||||
ss << "STOP in eoMaxTimeException: the maximum number of allowed seconds has been reached (" << _elapsed << ").";
|
||||
return ss.str().c_str();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
// EO includes
|
||||
#include <eoPop.h> // eoPop
|
||||
#include <eoFunctor.h> // eoMerge
|
||||
#include <utils/eoLogger.h>
|
||||
|
||||
/**
|
||||
* eoMerge: Base class for elitist replacement algorithms.
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ public:
|
|||
/** Do the job: simple loop over the offspring */
|
||||
void operator()(eoPop<EOT> & _parents, eoPop<EOT> & _offspring)
|
||||
{
|
||||
apply<EOT>(eval, _offspring);
|
||||
(void)_parents;
|
||||
apply<EOT>(eval, _offspring);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <eoPop.h> // eoPop
|
||||
#include <eoFunctor.h> // eoReduce
|
||||
#include <utils/selectors.h>
|
||||
#include <utils/eoLogger.h>
|
||||
|
||||
/**
|
||||
* eoReduce: .reduce the new generation to the specified size
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public :
|
|||
eoOStreamMonitor( std::ostream & _out, bool _verbose=true, std::string _delim = "\t", unsigned int _width=20, char _fill=' ' ) :
|
||||
out(_out), delim(_delim), width(_width), fill(_fill), firsttime(true)
|
||||
{
|
||||
(void)_verbose;
|
||||
eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoOStreamMonitor constructor is deprecated and will be removed in the next release" << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue