geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | List of all members
geopm::MSRFieldControl Class Reference

#include <MSRFieldControl.hpp>

Inheritance diagram for geopm::MSRFieldControl:
Inheritance graph
[legend]
Collaboration diagram for geopm::MSRFieldControl:
Collaboration graph
[legend]

Public Member Functions

 MSRFieldControl (std::shared_ptr< MSRIO > msrio, int cpu, uint64_t offset, int begin_bit, int end_bit, int function, double scalar)
 
 MSRFieldControl (const MSRFieldControl &other)=delete
 
MSRFieldControloperator= (const MSRFieldControl &other)=delete
 
virtual ~MSRFieldControl ()=default
 
void setup_batch (void) override
 Prepare the control for being written through side effects by the owner's write_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call. More...
 
void adjust (double value) override
 Store values to be written by the owner's write_batch step. More...
 
void write (double value) override
 Write the value of the control without affecting any pushed batch controls. More...
 
void save (void) override
 Store the current setting of the control for use by a future call to restore(). More...
 
void restore (void) override
 Restore the setting stored by save(). More...
 
void add_save_restore_context (int)
 
- Public Member Functions inherited from geopm::Control
virtual ~Control ()=default
 

Detailed Description

Encapsulates conversion of control values in SI units to MSR bitfields.

Constructor & Destructor Documentation

◆ MSRFieldControl() [1/2]

geopm::MSRFieldControl::MSRFieldControl ( std::shared_ptr< MSRIO msrio,
int  cpu,
uint64_t  offset,
int  begin_bit,
int  end_bit,
int  function,
double  scalar 
)

◆ MSRFieldControl() [2/2]

geopm::MSRFieldControl::MSRFieldControl ( const MSRFieldControl other)
delete

◆ ~MSRFieldControl()

virtual geopm::MSRFieldControl::~MSRFieldControl ( )
virtualdefault

Member Function Documentation

◆ add_save_restore_context()

void geopm::MSRFieldControl::add_save_restore_context ( int  ctx)

◆ adjust()

void geopm::MSRFieldControl::adjust ( double  value)
overridevirtual

Store values to be written by the owner's write_batch step.

Implements geopm::Control.

◆ operator=()

MSRFieldControl& geopm::MSRFieldControl::operator= ( const MSRFieldControl other)
delete

◆ restore()

void geopm::MSRFieldControl::restore ( void  )
overridevirtual

Restore the setting stored by save().

Implements geopm::Control.

◆ save()

void geopm::MSRFieldControl::save ( void  )
overridevirtual

Store the current setting of the control for use by a future call to restore().

Implements geopm::Control.

◆ setup_batch()

void geopm::MSRFieldControl::setup_batch ( void  )
overridevirtual

Prepare the control for being written through side effects by the owner's write_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call.

Implements geopm::Control.

◆ write()

void geopm::MSRFieldControl::write ( double  value)
overridevirtual

Write the value of the control without affecting any pushed batch controls.

Implements geopm::Control.


The documentation for this class was generated from the following files: