All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
MeterPU::System_Energy_Measurement_Controller< gpu_device_ids > Struct Template Reference

System Energy Measurement Controller. More...

#include <MeterPU.h>

Inheritance diagram for MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >:
Inheritance graph
[legend]
Collaboration diagram for MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >:
Collaboration graph
[legend]

Public Member Functions

 System_Energy_Measurement_Controller ()
 
 ~System_Energy_Measurement_Controller ()
 
void init ()
 
void start ()
 mark the start of a measurement phase/period. More...
 
void stop ()
 mark the end of a measurement phase/period. More...
 
void calc ()
 calculate the metric value between start() and stop(). More...
 
System_Energy::ResultType const & get_value () const
 Get calculated metric value, require calc() to be called already. More...
 
void show_meter_reading () const
 Print the calculated metric value to standard output, requires an invocation of calc() already done. More...
 

Private Types

enum  { N =sizeof...(gpu_device_ids) }
 

Private Attributes

Meter< PCM_Energycpu_meter
 
void * gpu_meters [N]
 
NVML_Energy::ResultType meter_reading
 

Detailed Description

template<GPU_Device_Id_Type... gpu_device_ids>
struct MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >

System Energy Measurement Controller.

It initialize a Energy Meter of CPU and DRAM, together with a specified combination of GPU Energy Meters, thus it can measure energy consumption of those hardware components together.

Member Enumeration Documentation

template<GPU_Device_Id_Type... gpu_device_ids>
anonymous enum
private
Enumerator
N 

Constructor & Destructor Documentation

template<GPU_Device_Id_Type... gpu_device_ids>
MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::System_Energy_Measurement_Controller ( )
inline
template<GPU_Device_Id_Type... gpu_device_ids>
MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::~System_Energy_Measurement_Controller ( )
inline

Member Function Documentation

template<GPU_Device_Id_Type... gpu_device_ids>
void MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::calc ( )
inlinevirtual

calculate the metric value between start() and stop().

Implements MeterPU::Measurement_Controller.

template<GPU_Device_Id_Type... gpu_device_ids>
System_Energy ::ResultType const& MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::get_value ( ) const
inline

Get calculated metric value, require calc() to be called already.

Here is the caller graph for this function:

template<GPU_Device_Id_Type... gpu_device_ids>
void MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::init ( )
inline
template<GPU_Device_Id_Type... gpu_device_ids>
void MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::show_meter_reading ( ) const
inlinevirtual

Print the calculated metric value to standard output, requires an invocation of calc() already done.

Implements MeterPU::Measurement_Controller.

Here is the call graph for this function:

template<GPU_Device_Id_Type... gpu_device_ids>
void MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::start ( )
inlinevirtual

mark the start of a measurement phase/period.

Implements MeterPU::Measurement_Controller.

template<GPU_Device_Id_Type... gpu_device_ids>
void MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::stop ( )
inlinevirtual

mark the end of a measurement phase/period.

Implements MeterPU::Measurement_Controller.

Member Data Documentation

template<GPU_Device_Id_Type... gpu_device_ids>
Meter<PCM_Energy> MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::cpu_meter
private
template<GPU_Device_Id_Type... gpu_device_ids>
void* MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::gpu_meters[N]
private
template<GPU_Device_Id_Type... gpu_device_ids>
NVML_Energy ::ResultType MeterPU::System_Energy_Measurement_Controller< gpu_device_ids >::meter_reading
private

The documentation for this struct was generated from the following file: