pub struct LI {
pub coupled: Coupled,
}
Fields§
§coupled: Coupled
Implementations§
Source§impl LI
impl LI
Sourcepub fn create(
width: usize,
depth: usize,
int_delay: u64,
ext_delay: u64,
) -> Coupled
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more