Skip to content

Commit

Permalink
Defining new debug utils for v4dualfloat64 precision
Browse files Browse the repository at this point in the history
  • Loading branch information
nibrunie committed Nov 18, 2018
1 parent ee07120 commit 46042d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metalibm_core/utility/debug_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def fixed_point_pre_process(value, optree):
debug_ulong4 = ML_Debug(display_format = "{%lu, %lu, %lu, %lu}", pre_process = lambda v: "%s._[0], %s._[1], %s._[2], %s._[3]" % (v, v, v, v))
debug_ulong8 = ML_Debug(display_format = "{%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu}", pre_process = lambda v: "%s._[0], %s._[1], %s._[2], %s._[3], %s._[4], %s._[5], %s._[6], %s._[7]" % (v, v, v, v, v, v, v, v))


debug_v4dualfloat64 = ML_Debug(display_format="[{%a, %a}, {%a, %a}, {%a, %a}, {%a, %a}]", pre_process=lambda v: (", ".join("{v}.hi._[%d], {v}.lo._[%d]" % (i, i) for i in range(4))).format(v=v))

debug_multi = ML_MultiDebug({
ML_Binary32: debug_ftox,
ML_Binary64: debug_lftolx,
Expand Down Expand Up @@ -135,4 +138,6 @@ def fixed_point_pre_process(value, optree):

ML_TripleDouble: debug_td,
ML_TripleSingle: debug_ts,

v4dualfloat64: debug_v4dualfloat64,
})

0 comments on commit 46042d0

Please sign in to comment.