From b7776785a18d3f4e6229cd625f92c11b55894b75 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 13 Sep 2019 05:39:49 -0400 Subject: add /src/gpuwattch formatting --- src/gpuwattch/basic_components.cc | 142 ++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 76 deletions(-) (limited to 'src/gpuwattch/basic_components.cc') diff --git a/src/gpuwattch/basic_components.cc b/src/gpuwattch/basic_components.cc index d66c280..d58023a 100644 --- a/src/gpuwattch/basic_components.cc +++ b/src/gpuwattch/basic_components.cc @@ -30,97 +30,87 @@ ***************************************************************************/ #include "basic_components.h" -#include #include #include +#include -double longer_channel_device_reduction( - enum Device_ty device_ty, - enum Core_type core_ty) -{ - - double longer_channel_device_percentage_core; - double longer_channel_device_percentage_uncore; - double longer_channel_device_percentage_llc; - - double long_channel_device_reduction; - - longer_channel_device_percentage_llc = 1.0; - longer_channel_device_percentage_uncore = 0.82; - if (core_ty==OOO) - { - longer_channel_device_percentage_core = 0.56;//0.54 Xeon Tulsa //0.58 Nehelam - //longer_channel_device_percentage_uncore = 0.76;//0.85 Nehelam - - } - else - { - longer_channel_device_percentage_core = 0.8;//0.8;//Niagara - //longer_channel_device_percentage_uncore = 0.9;//Niagara - } - - if (device_ty==Core_device) - { - long_channel_device_reduction = (1- longer_channel_device_percentage_core) - + longer_channel_device_percentage_core * g_tp.peri_global.long_channel_leakage_reduction; - } - else if (device_ty==Uncore_device) - { - long_channel_device_reduction = (1- longer_channel_device_percentage_uncore) - + longer_channel_device_percentage_uncore * g_tp.peri_global.long_channel_leakage_reduction; - } - else if (device_ty==LLC_device) - { - long_channel_device_reduction = (1- longer_channel_device_percentage_llc) - + longer_channel_device_percentage_llc * g_tp.peri_global.long_channel_leakage_reduction; - } - else - { - cout<<"unknown device category"<