Skip to content

Commit

Permalink
Merge pull request #284 from opesci/fix_dsle_printing
Browse files Browse the repository at this point in the history
Fix summary printing in DSE/DLE
  • Loading branch information
FabioLuporini authored Jun 20, 2017
2 parents 94b35a8 + 5fcd63c commit cad098f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion devito/dle/backends/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def _summary(self):
"""

row = "%s [elapsed: %.2f]"
out = " >>\n ".join(row % (filter(lambda c: not c.isdigit(), k[1:]), v)
out = " >>\n ".join(row % ("".join(filter(lambda c: not c.isdigit(), k[1:])),
v)
for k, v in self.timings.items())
elapsed = sum(self.timings.values())
dle("%s\n [Total elapsed: %.2f s]" % (out, elapsed))
3 changes: 2 additions & 1 deletion devito/dse/symbolics.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ def _summary(self):

if self.profile:
row = "%s [flops: %s, elapsed: %.2f]"
summary = " >>\n ".join(row % (filter(lambda c: not c.isdigit(), k[1:]),
summary = " >>\n ".join(row % ("".join(filter(lambda c: not c.isdigit(),
k[1:])),
str(self.ops.get(k, "?")), v)
for k, v in self.timings.items())
elapsed = sum(self.timings.values())
Expand Down

0 comments on commit cad098f

Please sign in to comment.