mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
make BenchTimer compatible with 2.0 branch
This commit is contained in:
parent
e2097c55f8
commit
0116261407
@ -87,7 +87,12 @@ public:
|
|||||||
{
|
{
|
||||||
m_times[CPU_TIMER] = getCpuTime() - m_starts[CPU_TIMER];
|
m_times[CPU_TIMER] = getCpuTime() - m_starts[CPU_TIMER];
|
||||||
m_times[REAL_TIMER] = getRealTime() - m_starts[REAL_TIMER];
|
m_times[REAL_TIMER] = getRealTime() - m_starts[REAL_TIMER];
|
||||||
|
#if EIGEN_VERSION_AT_LEAST(2,90,0)
|
||||||
m_bests = m_bests.cwiseMin(m_times);
|
m_bests = m_bests.cwiseMin(m_times);
|
||||||
|
#else
|
||||||
|
m_bests(0) = std::min(m_bests(0),m_times(0));
|
||||||
|
m_bests(1) = std::min(m_bests(1),m_times(1));
|
||||||
|
#endif
|
||||||
m_totals += m_times;
|
m_totals += m_times;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user