Struct LI

Source
pub struct LI {
    pub coupled: Coupled,
}

Fields§

§coupled: Coupled

Implementations§

Source§

impl LI

Source

pub fn create( width: usize, depth: usize, int_delay: u64, ext_delay: u64, ) -> Coupled

Examples found in repository?
examples/devstone.rs (line 34)
11fn main() {
12    let args: Vec<String> = env::args().collect();
13    let model_type = args
14        .get(1)
15        .expect("first argument must select the model type")
16        .clone()
17        .to_lowercase();
18    let width = args
19        .get(2)
20        .expect("second argument must select the width")
21        .parse()
22        .expect("width could not be parsed");
23    let depth = args
24        .get(3)
25        .expect("third argument must select the depth")
26        .parse()
27        .expect("depth could not be parsed");
28
29    let int_delay = 0;
30    let ext_delay = 0;
31
32    let start = Instant::now();
33    let coupled = match model_type.as_str() {
34        "li" => LI::create(width, depth, int_delay, ext_delay),
35        "hi" => HI::create(width, depth, int_delay, ext_delay),
36        "ho" => HO::create(width, depth, int_delay, ext_delay),
37        "homod" => HOmod::create(width, depth, int_delay, ext_delay),
38        _ => panic!("unknown DEVStone model type"),
39    };
40    let duration = start.elapsed();
41    println!("Model creation time: {duration:?}");
42    let start = Instant::now();
43    let mut simulator = RootCoordinator::new(coupled);
44    let duration = start.elapsed();
45    println!("Simulator creation time: {duration:?}");
46    let start = Instant::now();
47    simulator.simulate(f64::INFINITY);
48    let duration = start.elapsed();
49    println!("Simulation time: {duration:?}");
50}

Auto Trait Implementations§

§

impl Freeze for LI

§

impl !RefUnwindSafe for LI

§

impl Send for LI

§

impl Sync for LI

§

impl Unpin for LI

§

impl !UnwindSafe for LI

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> 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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.
Source§

impl<T> DynRef for T
where T: 'static + Sync + Send + ?Sized,