6 #ifndef MSRFIELDCONTROL_HPP_INCLUDE
7 #define MSRFIELDCONTROL_HPP_INCLUDE
37 void adjust(
double value)
override;
38 void write(
double value)
override;
39 void save(
void)
override;
43 uint64_t encode(
double value)
const;
45 std::shared_ptr<MSRIO> m_msrio;
46 int m_save_restore_ctx;
48 const uint64_t m_offset;
51 const uint64_t m_mask;
53 const double m_inverse;
54 bool m_is_batch_ready;
58 uint64_t m_saved_msr_value;
Definition: Control.hpp:16
Definition: MSRFieldControl.hpp:24
MSRFieldControl & operator=(const MSRFieldControl &other)=delete
void restore(void) override
Restore the setting stored by save().
Definition: MSRFieldControl.cpp:143
virtual ~MSRFieldControl()=default
MSRFieldControl(const MSRFieldControl &other)=delete
void save(void) override
Store the current setting of the control for use by a future call to restore().
Definition: MSRFieldControl.cpp:136
void write(double value) override
Write the value of the control without affecting any pushed batch controls.
Definition: MSRFieldControl.cpp:130
void setup_batch(void) override
Prepare the control for being written through side effects by the owner's write_batch step....
Definition: MSRFieldControl.cpp:62
void adjust(double value) override
Store values to be written by the owner's write_batch step.
Definition: MSRFieldControl.cpp:120
void add_save_restore_context(int)
Definition: MSRFieldControl.cpp:149
MSRFieldControl(std::shared_ptr< MSRIO > msrio, int cpu, uint64_t offset, int begin_bit, int end_bit, int function, double scalar)
Definition: MSRFieldControl.cpp:18