diff options
author | Nathan Binkert <nate@binkert.org> | 2010-07-21 18:54:53 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-07-21 18:54:53 -0700 |
commit | 21bf6ff1019cb1334596da8488268eeaea3753cc (patch) | |
tree | cbcfd55b702e7e235aad41031c6840e2c3c571b1 /src/base/stats/mysql.cc | |
parent | 2a1309f2134986edcbff846aff5951ec1e8df6e1 (diff) | |
download | gem5-21bf6ff1019cb1334596da8488268eeaea3753cc.tar.xz |
stats: unify the two stats distribution type better
Diffstat (limited to 'src/base/stats/mysql.cc')
-rw-r--r-- | src/base/stats/mysql.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc index 6ef173f50..9d2dadb01 100644 --- a/src/base/stats/mysql.cc +++ b/src/base/stats/mysql.cc @@ -481,9 +481,10 @@ MySql::configure(const DistInfo &info) if (!configure(info, "DIST")) return; - const DistParams *params = - safe_cast<const DistParams *>(info.storageParams); - if (params->type == Dist) { + const DistStor::Params *params = + dynamic_cast<const DistStor::Params *>(info.storageParams); + if (params) { + assert(params->type == Dist); stat.size = params->buckets; stat.min = params->min; stat.max = params->max; @@ -498,9 +499,10 @@ MySql::configure(const VectorDistInfo &info) if (!configure(info, "VECTORDIST")) return; - const DistParams *params = - safe_cast<const DistParams *>(info.storageParams); - if (params->type == Dist) { + const DistStor::Params *params = + dynamic_cast<const DistStor::Params *>(info.storageParams); + if (params) { + assert(params->type == Dist); stat.size = params->buckets; stat.min = params->min; stat.max = params->max; |