params.py (10458:64809024b924) params.py (10668:cefb03a42760)
1# Copyright (c) 2012-2014 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 624 unchanged lines hidden (view full) ---

633 code('uint64_t _temp;')
634 code('bool _ret = to_number(%s, _temp);' % src)
635 code('if (_ret)')
636 code(' %s = Cycles(_temp);' % dest)
637 code('%s _ret;' % ret)
638
639class Float(ParamValue, float):
640 cxx_type = 'double'
1# Copyright (c) 2012-2014 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 624 unchanged lines hidden (view full) ---

633 code('uint64_t _temp;')
634 code('bool _ret = to_number(%s, _temp);' % src)
635 code('if (_ret)')
636 code(' %s = Cycles(_temp);' % dest)
637 code('%s _ret;' % ret)
638
639class Float(ParamValue, float):
640 cxx_type = 'double'
641 cmdLineSettable = True
641 cmd_line_settable = True
642
643 def __init__(self, value):
644 if isinstance(value, (int, long, float, NumericParamValue, Float, str)):
645 self.value = float(value)
646 else:
647 raise TypeError, "Can't convert object of type %s to Float" \
648 % type(value).__name__
649

--- 1462 unchanged lines hidden ---
642
643 def __init__(self, value):
644 if isinstance(value, (int, long, float, NumericParamValue, Float, str)):
645 self.value = float(value)
646 else:
647 raise TypeError, "Can't convert object of type %s to Float" \
648 % type(value).__name__
649

--- 1462 unchanged lines hidden ---