Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
PyPi v2.2.2 : Minor fix to avoid very rare FPE when serializing
Browse files Browse the repository at this point in the history
- Updated CHANGES.{md,rst}
  • Loading branch information
jrmadsen committed Jun 6, 2018
1 parent 9dfc040 commit 35e52cb
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1
2.2.2
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
TiMemory
========

Release: TiMemory 2.2.2
-----------------------

Author: Jonathan R. Madsen Date: Wed Jun 6 03:19:39 2018 -0700

- Minor fix to avoid very rare FPE when serializing

Release: TiMemory 2.2.1
-----------------------

Author: Jonathan R. Madsen Date: Tue Jun 6 01:32:45 2018 -0700

- fix to TiMemoryConfig.cmake when installed via sudo

Release: TiMemory 2.2.0
-----------------------

Author: Jonathan R. Madsen Date: Tue Jun 5 00:28:10 2018 -0700

- self-cost available in manager + plotting safeguards
- Improved singleton deletion
- alternative colors for when len(_types) == 1 in plotting
- plotting label fix

Release: TiMemory 2.1.0
-----------------------

Expand Down
24 changes: 24 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
TiMemory
========

Release: TiMemory 2.2.2
-----------------------

Author: Jonathan R. Madsen Date: Wed Jun 6 03:19:39 2018 -0700

- Minor fix to avoid very rare FPE when serializing

Release: TiMemory 2.2.1
-----------------------

Author: Jonathan R. Madsen Date: Tue Jun 6 01:32:45 2018 -0700

- fix to TiMemoryConfig.cmake when installed via sudo

Release: TiMemory 2.2.0
-----------------------

Author: Jonathan R. Madsen Date: Tue Jun 5 00:28:10 2018 -0700

- self-cost available in manager + plotting safeguards
- Improved singleton deletion
- alternative colors for when len(\_types) == 1 in plotting
- plotting label fix

Release: TiMemory 2.1.0
-----------------------

Expand Down
3 changes: 1 addition & 2 deletions source/auto_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ auto_timer::~auto_timer()
{
if(m_enabled)
{
// will add itself to global when destroying m_temp_timer
// stop the timer
m_temp_timer.stop();

assert(m_temp_timer.summation_timer() != nullptr);
*m_temp_timer.summation_timer() += m_temp_timer;

Expand Down
8 changes: 6 additions & 2 deletions source/timemory/base_timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,12 @@ class tim_api base_timer
template <typename Archive> void
serialize(Archive& ar, const unsigned int /*version*/)
{
auto _cpu_util = (m_accum.get_sum<0>() + m_accum.get_sum<1>())
/ m_accum.get_sum<2>();
auto _cpu_util = (m_accum.get_sum<0>() + m_accum.get_sum<1>());
if(m_accum.get_sum<2>() > 0)
_cpu_util /= m_accum.get_sum<2>();
else
_cpu_util = 0.0;

if(!tim::isfinite(_cpu_util))
_cpu_util = 0.0;

Expand Down

0 comments on commit 35e52cb

Please sign in to comment.