Skip to main content

MemoryLayout

Struct MemoryLayout 

Source
pub struct MemoryLayout<A> {
Show 23 fields pub four_state: bool, pub mode: MemoryLayoutMode, pub offsets: FxHashMap<A, usize>, pub widths: FxHashMap<A, usize>, pub is_4states: FxHashMap<A, bool>, pub unpacked_arrays: FxHashMap<A, UnpackedArrayLayout>, pub total_size: usize, pub working_offsets: FxHashMap<A, usize>, pub working_base_offset: usize, pub sparse_offsets: FxHashMap<A, usize>, pub sparse_base_offset: usize, pub sparse_layouts: FxHashMap<A, SparseWorkingLayout>, pub sparse_active_bits_offset: usize, pub sparse_active_capacity: usize, pub merged_total_size: usize, pub triggered_bits_offset: usize, pub triggered_bits_total_size: usize, pub scratch_base_offset: usize, pub scratch_size: usize, pub runtime_event_capacity: usize, pub runtime_event_slot_size: usize, pub runtime_event_buffer_size: usize, pub runtime_event_site_layouts: Vec<RuntimeEventSiteLayout>,
}

Fields§

§four_state: bool§mode: MemoryLayoutMode§offsets: FxHashMap<A, usize>

Stable region offsets. Includes all declared state objects.

§widths: FxHashMap<A, usize>§is_4states: FxHashMap<A, bool>

Whether each state object has a four-state source type.

§unpacked_arrays: FxHashMap<A, UnpackedArrayLayout>§total_size: usize

Stable region size in bytes.

§working_offsets: FxHashMap<A, usize>

Working region offsets. Includes only actually-used state objects.

§working_base_offset: usize§sparse_offsets: FxHashMap<A, usize>

Copy-on-write next-state data for dynamically addressed FF targets.

§sparse_base_offset: usize§sparse_layouts: FxHashMap<A, SparseWorkingLayout>§sparse_active_bits_offset: usize§sparse_active_capacity: usize§merged_total_size: usize§triggered_bits_offset: usize§triggered_bits_total_size: usize§scratch_base_offset: usize§scratch_size: usize§runtime_event_capacity: usize§runtime_event_slot_size: usize§runtime_event_buffer_size: usize§runtime_event_site_layouts: Vec<RuntimeEventSiteLayout>

Implementations§

Source§

impl<A> MemoryLayout<A>
where A: Copy + Eq + Hash + Ord,

Source

pub fn build<S>(source: &S, four_state: bool, mode: MemoryLayoutMode) -> Self
where S: LayoutSource<A>,

Source

pub fn with_backend_scratch(self, scratch_size: usize) -> Self

Append backend-private scratch storage without changing any semantic state offset. Backend planning happens after the backend-neutral state layout has been finalized, so scratch is always the final region.

Source

pub fn plane_size(&self, address: &A) -> usize

Source

pub fn region_base_offset<R>(&self, address: &R) -> usize
where R: RegionedAddress<A>,

Source

pub fn map_static_bit_offset( &self, address: &A, bit_offset: usize, ) -> (usize, usize)

Source

pub fn regioned_static_byte_and_intra<R>( &self, address: &R, bit_offset: usize, ) -> Option<(i32, usize)>
where R: RegionedAddress<A>,

Trait Implementations§

Source§

impl<A: Clone> Clone for MemoryLayout<A>

Source§

fn clone(&self) -> MemoryLayout<A>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Debug> Debug for MemoryLayout<A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, A> Deserialize<'de> for MemoryLayout<A>
where A: Deserialize<'de> + Eq + Hash,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A> Serialize for MemoryLayout<A>
where A: Serialize + Eq + Hash,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<A> Freeze for MemoryLayout<A>

§

impl<A> RefUnwindSafe for MemoryLayout<A>

§

impl<A> Send for MemoryLayout<A>

§

impl<A> Sync for MemoryLayout<A>

§

impl<A> Unpin for MemoryLayout<A>

§

impl<A> UnsafeUnpin for MemoryLayout<A>

§

impl<A> UnwindSafe for MemoryLayout<A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.