Hello Jason Lowe-Power, Matthias Jung, Weiping Liao, Giacomo Travaglini,
Andreas Sandberg,
I'd like you to reexamine a change. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/16504
to look at the new patch set (#2).
Change subject: config: Make parameter conversion handle integers in other
bases.
......................................................................
config: Make parameter conversion handle integers in other bases.
Python's float() function/type can't handle hexadecimal notation, but
int() can. Since there are also cases where converting to a float and
then back to an int (or long) can cause rounding error, this change
splits toFloat and toInteger apart and makes them call a worker
function which accepts a conversion function which does the work of
converting a numeric string into an actual number.
in the case of toFloat, it still uses the standard float(), and in the
case of toInteger it uses a lambda which wraps int(x, 0).
Change-Id: Ic46cf4ae86b7eba6f55d731d1b25e3f84b8bb64c
---
M src/python/m5/util/convert.py
1 file changed, 16 insertions(+), 15 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16504
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ic46cf4ae86b7eba6f55d731d1b25e3f84b8bb64c
Gerrit-Change-Number: 16504
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-Reviewer: Weiping Liao <[email protected]>
Gerrit-MessageType: newpatchset
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev