From a928a438b8a005e5b6059bc5db0687bf64abcfa6 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Wed, 9 Nov 2016 14:27:40 -0600 Subject: style: [patch 3/22] reduce include dependencies in some headers Used cppclean to help identify useless includes and removed them. This involved erroneously included headers, but also cases where forward declarations could have been used rather than a full include. --- src/sim/power/mathexpr_powermodel.hh | 6 ++++-- src/sim/power/power_model.cc | 2 +- src/sim/power/power_model.hh | 5 +++-- src/sim/power/thermal_domain.cc | 5 ++++- src/sim/power/thermal_domain.hh | 4 ++-- src/sim/power/thermal_entity.hh | 3 +-- src/sim/power/thermal_model.hh | 1 - 7 files changed, 15 insertions(+), 11 deletions(-) (limited to 'src/sim/power') diff --git a/src/sim/power/mathexpr_powermodel.hh b/src/sim/power/mathexpr_powermodel.hh index 563b1fa7f..5c121c7b6 100644 --- a/src/sim/power/mathexpr_powermodel.hh +++ b/src/sim/power/mathexpr_powermodel.hh @@ -42,11 +42,13 @@ #include -#include "base/statistics.hh" #include "params/MathExprPowerModel.hh" #include "sim/mathexpr.hh" #include "sim/power/power_model.hh" -#include "sim/sim_object.hh" + +namespace Stats { + class Info; +} /** * A Equation power model. The power is represented as a combination diff --git a/src/sim/power/power_model.cc b/src/sim/power/power_model.cc index bd06ced70..5f810fe60 100644 --- a/src/sim/power/power_model.cc +++ b/src/sim/power/power_model.cc @@ -42,7 +42,7 @@ #include "base/statistics.hh" #include "params/PowerModel.hh" #include "params/PowerModelState.hh" -#include "sim/sim_object.hh" +#include "sim/clocked_object.hh" #include "sim/sub_system.hh" PowerModelState::PowerModelState(const Params *p) diff --git a/src/sim/power/power_model.hh b/src/sim/power/power_model.hh index a2ddcea18..976c0543f 100644 --- a/src/sim/power/power_model.hh +++ b/src/sim/power/power_model.hh @@ -43,9 +43,10 @@ #include "base/statistics.hh" #include "params/PowerModel.hh" #include "params/PowerModelState.hh" -#include "sim/power/thermal_model.hh" #include "sim/probe/probe.hh" -#include "sim/sim_object.hh" + +class SimObject; +class ClockedObject; /** * A PowerModelState is an abstract class used as interface to get power diff --git a/src/sim/power/thermal_domain.cc b/src/sim/power/thermal_domain.cc index 11f48371e..0724ee80f 100644 --- a/src/sim/power/thermal_domain.cc +++ b/src/sim/power/thermal_domain.cc @@ -44,8 +44,11 @@ #include "base/statistics.hh" #include "debug/ThermalDomain.hh" #include "params/ThermalDomain.hh" +#include "sim/clocked_object.hh" +#include "sim/linear_solver.hh" #include "sim/power/thermal_model.hh" -#include "sim/sim_object.hh" +#include "sim/probe/probe.hh" +#include "sim/sub_system.hh" ThermalDomain::ThermalDomain(const Params *p) : SimObject(p), _initTemperature(p->initial_temperature), diff --git a/src/sim/power/thermal_domain.hh b/src/sim/power/thermal_domain.hh index 9236a2437..f385994f8 100644 --- a/src/sim/power/thermal_domain.hh +++ b/src/sim/power/thermal_domain.hh @@ -45,11 +45,11 @@ #include "base/statistics.hh" #include "params/ThermalDomain.hh" #include "sim/power/thermal_entity.hh" -#include "sim/probe/probe.hh" #include "sim/sim_object.hh" -#include "sim/sub_system.hh" +class SubSystem; class ThermalNode; +template class ProbePointArg; /** * A ThermalDomain is used to group objects under that operate under diff --git a/src/sim/power/thermal_entity.hh b/src/sim/power/thermal_entity.hh index 77846b67a..fb703961f 100644 --- a/src/sim/power/thermal_entity.hh +++ b/src/sim/power/thermal_entity.hh @@ -40,8 +40,7 @@ #ifndef __SIM_THERMAL_ENTITY_HH__ #define __SIM_THERMAL_ENTITY_HH__ -#include "sim/linear_solver.hh" - +class LinearEquation; class ThermalNode; /** diff --git a/src/sim/power/thermal_model.hh b/src/sim/power/thermal_model.hh index 64f831982..32f34f109 100644 --- a/src/sim/power/thermal_model.hh +++ b/src/sim/power/thermal_model.hh @@ -42,7 +42,6 @@ #include -#include "base/statistics.hh" #include "params/ThermalCapacitor.hh" #include "params/ThermalModel.hh" #include "params/ThermalReference.hh" -- cgit v1.2.3