pub struct Memory {
    pub iinput: Vec<i64>,
    pub istate: Vec<i64>,
    pub ioutput: Vec<i64>,
    pub dinput: Vec<f64>,
    pub dstate: Vec<f64>,
    pub doutput: Vec<f64>,
}
Expand description

The memory banks of an instance of a virtual machine.

All registers are initialized to zero at start up, except any constant registers to which values have been assigned. The mechanism for setting and changing the input registers is application specific.

Operand addresses are evaluated modulo the size of the register array they refer to, to keep them within the allocated memory for that array.

Fields

iinput: Vec<i64>

II: linear array of integer input registers

istate: Vec<i64>

IS: linear array of integer state registers

ioutput: Vec<i64>

IO: linear array of integer output registers

dinput: Vec<f64>

DI: linear array of double precision floating point input registers

dstate: Vec<f64>

DS: linear array of double precision floating point state registers

doutput: Vec<f64>

DO: linear array of double precision floating point output registers

Implementations

Create a new memory architecture.

Count the total number of addressable memory elements.

Count the number of bytes used by all addressable memory elements.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.