From c8b1e8f1cfdb5b66bacbbbd23dcf9ebb5a0f3b95 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 3 Jan 2017 12:03:45 +0000 Subject: python: Don't use Swig to cast stats Call the stat visitor from the stat itself rather than casting stats in Python. This reduces the number of ways visitors are called. Change-Id: Ic4d0b7b32e3ab9897b9a34cd22d353f4da62d738 Signed-off-by: Andreas Sandberg Reviewed-by: Sascha Bischoff Reviewed-by: Curtis Dunham Reviewed-by: Jason Lowe-Power Reviewed-by: Joe Gross --- src/python/swig/stats.i | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/python/swig') diff --git a/src/python/swig/stats.i b/src/python/swig/stats.i index 41115445c..b9da5a5ad 100644 --- a/src/python/swig/stats.i +++ b/src/python/swig/stats.i @@ -46,12 +46,6 @@ #include "sim/stat_register.hh" namespace Stats { -template -inline T -cast_info(Info *info) -{ - return dynamic_cast(info); -} inline FlagsType Stats_Info_flags_get(Info *info) @@ -124,16 +118,6 @@ namespace std { namespace Stats { -template T cast_info(Info *info); - -%template(dynamic_ScalarInfo) cast_info; -%template(dynamic_VectorInfo) cast_info; -%template(dynamic_DistInfo) cast_info; -%template(dynamic_VectorDistInfo) cast_info; -%template(dynamic_Vector2dInfo) cast_info; -%template(dynamic_FormulaInfo) cast_info; -%template(dynamic_SparseHistInfo) cast_info; - void initSimStats(); Output *initText(const std::string &filename, bool desc); -- cgit v1.2.3