You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2015/08/12 10:44:53 UTC

[1/2] incubator-singa git commit: SINGA-44 A bug when reseting metric values

Repository: incubator-singa
Updated Branches:
  refs/heads/master d5b6a30d0 -> a8c8211f4


SINGA-44 A bug when reseting metric values

When reseting the values of Metric object, we didn't use reference which made the resetting invalid.
Fixed the bug by using reference.


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/4446889d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/4446889d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/4446889d

Branch: refs/heads/master
Commit: 4446889df52924b29f28d88b797d661b0acb1b3e
Parents: a92a1c7
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Wed Aug 12 15:43:07 2015 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Wed Aug 12 15:43:07 2015 +0800

----------------------------------------------------------------------
 src/utils/common.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/4446889d/src/utils/common.cc
----------------------------------------------------------------------
diff --git a/src/utils/common.cc b/src/utils/common.cc
index f733497..3bba398 100644
--- a/src/utils/common.cc
+++ b/src/utils/common.cc
@@ -175,7 +175,7 @@ void Metric::Add(const string& name, float value) {
 }
 
 void Metric::Reset() {
-  for(auto e : entry_) {
+  for(auto& e : entry_) {
     e.second.first = 0;
     e.second.second = 0;
   }


[2/2] incubator-singa git commit: SINGA-44 A bug when reseting metric values

Posted by wa...@apache.org.
SINGA-44 A bug when reseting metric values

merge to master


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/a8c8211f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/a8c8211f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/a8c8211f

Branch: refs/heads/master
Commit: a8c8211f46dc0d7827212e4a1cce2f50fdc80445
Parents: d5b6a30 4446889
Author: wang sheng <wa...@gmail.com>
Authored: Wed Aug 12 16:42:53 2015 +0800
Committer: wang sheng <wa...@gmail.com>
Committed: Wed Aug 12 16:42:53 2015 +0800

----------------------------------------------------------------------
 src/utils/common.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------