pub trait ClocksTable: FromStr {
Show 26 methods
// Required methods
fn write_commands<W: Write>(
&self,
writer: &mut W,
previous_table: &ClocksTableGen,
) -> Result<(), Error>;
fn get_max_sclk_range(&self) -> Option<Range>;
fn get_min_sclk_range(&self) -> Option<Range>;
fn get_max_mclk_range(&self) -> Option<Range>;
fn get_min_mclk_range(&self) -> Option<Range>;
fn get_max_voltage_range(&self) -> Option<Range>;
fn get_min_voltage_range(&self) -> Option<Range>;
fn get_current_voltage_range(&self) -> Option<Range>;
fn get_current_sclk_range(&self) -> Range;
fn get_current_mclk_range(&self) -> Range;
fn set_max_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>;
fn set_min_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>;
fn set_max_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>;
fn set_min_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>;
fn set_max_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>;
fn set_min_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>;
fn get_max_sclk_voltage(&self) -> Option<i32>;
// Provided methods
fn get_commands(
&self,
previous_table: &ClocksTableGen,
) -> Result<Vec<String>, Error> { ... }
fn get_max_sclk(&self) -> Option<i32> { ... }
fn set_max_sclk(&mut self, clockspeed: i32) -> Result<(), Error> { ... }
fn set_min_sclk(&mut self, clockspeed: i32) -> Result<(), Error> { ... }
fn get_max_mclk(&self) -> Option<i32> { ... }
fn set_max_mclk(&mut self, clockspeed: i32) -> Result<(), Error> { ... }
fn set_min_mclk(&mut self, clockspeed: i32) -> Result<(), Error> { ... }
fn set_max_voltage(&mut self, voltage: i32) -> Result<(), Error> { ... }
fn set_min_voltage(&mut self, voltage: i32) -> Result<(), Error> { ... }
}
Expand description
Shared functionality across all table formats.
Required Methods§
Sourcefn write_commands<W: Write>(
&self,
writer: &mut W,
previous_table: &ClocksTableGen,
) -> Result<(), Error>
fn write_commands<W: Write>( &self, writer: &mut W, previous_table: &ClocksTableGen, ) -> Result<(), Error>
Writes commands needed to apply the state that is in the table struct on the GPU.
Sourcefn get_max_sclk_range(&self) -> Option<Range>
fn get_max_sclk_range(&self) -> Option<Range>
Gets the core clock range usable at the highest power level.
Sourcefn get_min_sclk_range(&self) -> Option<Range>
fn get_min_sclk_range(&self) -> Option<Range>
Gets the core clock range usable at the lowest power level.
Sourcefn get_max_mclk_range(&self) -> Option<Range>
fn get_max_mclk_range(&self) -> Option<Range>
Gets the memory clock range usable at the highest power level.
Sourcefn get_min_mclk_range(&self) -> Option<Range>
fn get_min_mclk_range(&self) -> Option<Range>
Gets the memory clock range usable at the lowest power level.
Sourcefn get_max_voltage_range(&self) -> Option<Range>
fn get_max_voltage_range(&self) -> Option<Range>
Gets the voltage range usable at the highest power level.
Sourcefn get_min_voltage_range(&self) -> Option<Range>
fn get_min_voltage_range(&self) -> Option<Range>
Gets the voltage range usable at the lowest power level.
Sourcefn get_current_voltage_range(&self) -> Option<Range>
fn get_current_voltage_range(&self) -> Option<Range>
Gets the current voltage range.
Sourcefn get_current_sclk_range(&self) -> Range
fn get_current_sclk_range(&self) -> Range
Gets the current range of values for core clocks.
Sourcefn get_current_mclk_range(&self) -> Range
fn get_current_mclk_range(&self) -> Range
Gets the current range of values for memory clocks.
Sourcefn set_max_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_max_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the maximum core clock (without checking if it’s in the allowed range).
Sourcefn set_min_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_min_sclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the minimum core clock (without checking if it’s in the allowed range).
Sourcefn set_max_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_max_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the maximum memory clock (without checking if it’s in the allowed range).
Sourcefn set_min_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_min_mclk_unchecked(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the minimum memory clock (without checking if it’s in the allowed range).
Sourcefn set_max_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>
fn set_max_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>
Sets the voltage to be used at the maximum clockspeed (without checking if it’s in the allowed range).
Sourcefn set_min_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>
fn set_min_voltage_unchecked(&mut self, voltage: i32) -> Result<(), Error>
Sets the voltage to be used at the minimum clockspeed (without checking if it’s in the allowed range).
Sourcefn get_max_sclk_voltage(&self) -> Option<i32>
fn get_max_sclk_voltage(&self) -> Option<i32>
Gets the current maximum voltage (used on maximum clockspeed).
Provided Methods§
Sourcefn get_commands(
&self,
previous_table: &ClocksTableGen,
) -> Result<Vec<String>, Error>
fn get_commands( &self, previous_table: &ClocksTableGen, ) -> Result<Vec<String>, Error>
Gets the list of commands that will apply the current state of the clocks table.
write_commands
should generally be preferred instead.
Sourcefn get_max_sclk(&self) -> Option<i32>
fn get_max_sclk(&self) -> Option<i32>
Gets the current maximum core clock.
Sourcefn get_max_mclk(&self) -> Option<i32>
fn get_max_mclk(&self) -> Option<i32>
Gets the current maximum memory clock.
Sourcefn set_max_mclk(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_max_mclk(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the maximum memory clock.
Sourcefn set_min_mclk(&mut self, clockspeed: i32) -> Result<(), Error>
fn set_min_mclk(&mut self, clockspeed: i32) -> Result<(), Error>
Sets the minimum memory clock.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.