[][src]Struct dqcsim::host::reproduction::Reproduction

pub struct Reproduction {
    pub seed: u64,
    pub plugins: Vec<PluginReproduction>,
    pub host_calls: Vec<HostCall>,
    pub hostname: String,
    pub username: String,
    pub workdir: PathBuf,
}

The contents of a reproduction file.

Fields

seed: u64

The random seed for the simulation.

plugins: Vec<PluginReproduction>

The plugin configurations, from front to back.

host_calls: Vec<HostCall>

The sequence of host calls to make.

Note that wait() is not represented in the HostCall enumeration. wait() calls should instead be inserted automatically as late as possible, that is:

  • when HostCall::Start is encountered while the accelerator was already started;
  • before DQCsim terminates, if the accelerator is still running.
hostname: String

The host on which the run was performed, if available.

This parameter is not used by DQCsim when it runs in reproduction mode. It is only there for helping the user trace the reproduction file back to its source.

username: String

The user that performed the run.

This parameter is not used by DQCsim when it runs in reproduction mode. It is only there for helping the user trace the reproduction file back to its source.

workdir: PathBuf

The working directory that the run was performed in.

This parameter is not used by DQCsim when it runs in reproduction mode. It is only there for helping the user trace the reproduction file back to its source.

Methods

impl Reproduction[src]

pub fn new_logger(config: &SimulatorConfiguration) -> Result<Reproduction>[src]

Constructs a reproduction structure for tracking a simulation.

pub fn record(&mut self, host_call: HostCall)[src]

Records a host call to the reproduction log.

pub fn to_run(
    &self,
    config: &mut SimulatorConfiguration,
    modifications: impl IntoIterator<Item = PluginModification>,
    exact: bool
) -> Result<Vec<HostCall>>
[src]

Turns this reproduction structure into a configuration and a list of host calls for reproduction.

If exact is set, the random seed is taken from the reproduction structure. Otherwise, it is regenerated.

pub fn from_file(file: impl AsRef<Path>) -> Result<Reproduction>[src]

Constructs a reproduction structure from a file.

pub fn to_file(&self, file: impl AsRef<Path>) -> Result<()>[src]

Writes a reproduction structure to a file.

Trait Implementations

impl PartialEq<Reproduction> for Reproduction[src]

impl Clone for Reproduction[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Reproduction[src]

impl Serialize for Reproduction[src]

impl<'de> Deserialize<'de> for Reproduction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,