eo: eoTimerStat becomes serializable by default
This commit is contained in:
parent
ba699c6e2e
commit
070d23de78
1 changed files with 3 additions and 12 deletions
|
|
@ -198,10 +198,7 @@ class eoTimer
|
||||||
*
|
*
|
||||||
* @ingroup Utilities
|
* @ingroup Utilities
|
||||||
*/
|
*/
|
||||||
class eoTimerStat
|
class eoTimerStat : public eoserial::Persistent
|
||||||
# ifdef WITH_MPI
|
|
||||||
: public eoserial::Persistent
|
|
||||||
# endif
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -222,15 +219,12 @@ class eoTimerStat
|
||||||
*
|
*
|
||||||
* It can readily be serialized with boost when compiling with mpi.
|
* It can readily be serialized with boost when compiling with mpi.
|
||||||
*/
|
*/
|
||||||
struct Stat
|
struct Stat : public eoserial::Persistent
|
||||||
# ifdef WITH_MPI
|
|
||||||
: public eoserial::Persistent
|
|
||||||
# endif
|
|
||||||
{
|
{
|
||||||
std::vector<long int> utime;
|
std::vector<long int> utime;
|
||||||
std::vector<long int> stime;
|
std::vector<long int> stime;
|
||||||
std::vector<double> wtime;
|
std::vector<double> wtime;
|
||||||
#ifdef WITH_MPI
|
|
||||||
void unpack( const eoserial::Object* obj )
|
void unpack( const eoserial::Object* obj )
|
||||||
{
|
{
|
||||||
utime.clear();
|
utime.clear();
|
||||||
|
|
@ -254,10 +248,8 @@ class eoTimerStat
|
||||||
obj->add("wtime", eoserial::makeArray< std::vector<double>, eoserial::MakeAlgorithm >( wtime ) );
|
obj->add("wtime", eoserial::makeArray< std::vector<double>, eoserial::MakeAlgorithm >( wtime ) );
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WITH_MPI
|
|
||||||
void unpack( const eoserial::Object* obj )
|
void unpack( const eoserial::Object* obj )
|
||||||
{
|
{
|
||||||
_stats.clear();
|
_stats.clear();
|
||||||
|
|
@ -280,7 +272,6 @@ class eoTimerStat
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Forces the measures to be retrieved.
|
* @brief Forces the measures to be retrieved.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue