* eoParallel: added the both parameters enable_results and do_measure
This commit is contained in:
parent
7add23931b
commit
9e95eefb52
3 changed files with 35 additions and 5 deletions
|
|
@ -44,7 +44,12 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
|
||||
#ifdef _OPENMP
|
||||
|
||||
double t1 = omp_get_wtime();
|
||||
double t1 = 0;
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
t1 = omp_get_wtime();
|
||||
}
|
||||
|
||||
if (!eo::parallel.isDynamic())
|
||||
{
|
||||
|
|
@ -59,10 +64,9 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
}
|
||||
|
||||
double t2 = omp_get_wtime();
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
double t2 = omp_get_wtime();
|
||||
eoLogger log;
|
||||
log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' ';
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue