stdlib: Move SimStat 'unit' and 'datatype' field to Scalar (#970)

These are not general statistic properties and better put as a property
of a Scalar value.
This commit is contained in:
Bobby R. Bruce
2024-04-04 10:02:22 -07:00
committed by GitHub
parent 213b418391
commit 8d7e3fb16b
2 changed files with 4 additions and 25 deletions

View File

@@ -155,7 +155,6 @@ def __get_scaler(statistic: _m5.stats.ScalarInfo) -> Scalar:
def __get_distribution(statistic: _m5.stats.DistInfo) -> Distribution:
unit = statistic.unit
description = statistic.desc
value = statistic.values
bin_size = statistic.bucket_size
@@ -167,8 +166,6 @@ def __get_distribution(statistic: _m5.stats.DistInfo) -> Distribution:
underflow = statistic.underflow
overflow = statistic.overflow
logs = statistic.logs
# DistInfo uses the C++ `double`.
datatype = StorageType["f64"]
return Distribution(
value=value,
@@ -181,9 +178,7 @@ def __get_distribution(statistic: _m5.stats.DistInfo) -> Distribution:
underflow=underflow,
overflow=overflow,
logs=logs,
unit=unit,
description=description,
datatype=datatype,
)