fix broken cargo build --all

This commit is contained in:
2022-08-22 14:17:51 -07:00
parent 7bce17f56b
commit b160823a81
2 changed files with 4 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ use coremem::real::{R32, Real as _};
use coremem::render::CsvRenderer; use coremem::render::CsvRenderer;
use coremem::sim::spirv::{SpirvSim, WgpuBackend}; use coremem::sim::spirv::{SpirvSim, WgpuBackend};
use coremem::sim::units::{Seconds, Time as _}; use coremem::sim::units::{Seconds, Time as _};
use coremem::stim::{CurlVectorField, Exp, Gated, ModulatedVectorField, Sinusoid, StimExt as _}; use coremem::stim::{CurlVectorField, Exp, ModulatedVectorField, Sinusoid, StimExt as _};
use log::{error, info, warn}; use log::{error, info, warn};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@@ -448,7 +448,7 @@ fn run_sim(id: u32, p: Params, g: Geometries) -> Results {
}; };
let add_drive_square_pulse = |driver: &mut Driver<f32, _, _>, region: &Torus, start: f32, duration: f32, amp: f32| { let add_drive_square_pulse = |driver: &mut Driver<f32, _, _>, region: &Torus, start: f32, duration: f32, amp: f32| {
let wave = Gated::new(amp, start, start+duration); let wave = amp.gated(start, start+duration);
driver.add_stimulus(ModulatedVectorField::new( driver.add_stimulus(ModulatedVectorField::new(
CurlVectorField::new(region.clone()), CurlVectorField::new(region.clone()),
wave, wave,

View File

@@ -1,6 +1,7 @@
use coremem::{self, Driver, AbstractSim}; use coremem::{self, Driver, AbstractSim};
use coremem::sim::legacy::SimState; use coremem::sim::legacy::SimState;
use coremem::sim::spirv::{SpirvSim, WgpuBackend}; use coremem::sim::spirv::{SpirvSim, WgpuBackend};
use coremem::sim::units::Frame;
use coremem::cross::mat::FullyGenericMaterial; use coremem::cross::mat::FullyGenericMaterial;
use coremem::geom::Index; use coremem::geom::Index;
use std::time::{Instant, Duration}; use std::time::{Instant, Duration};
@@ -19,7 +20,7 @@ fn measure<F: FnMut()>(name: &str, n_times: u32, mut f: F) -> f32 {
} }
fn measure_steps<S: AbstractSim + Clone + Default + Send + 'static>(name: &str, steps_per_call: u32, mut d: Driver<S::Real, S>) { fn measure_steps<S: AbstractSim + Clone + Default + Send + 'static>(name: &str, steps_per_call: u32, mut d: Driver<S::Real, S>) {
measure(name, 100/steps_per_call, || d.step_multiple(steps_per_call)); measure(name, 100/steps_per_call, || d.step_until(Frame(steps_per_call.into())));
} }
fn main() { fn main() {