app: buffer_proto5: parallelize the geometry searches
This commit is contained in:
@@ -24,10 +24,11 @@ use coremem::sim::spirv::{SpirvSim, WgpuBackend};
|
||||
use coremem::sim::units::{Seconds, Time as _};
|
||||
use coremem::stim::{CurlVectorField, Exp, ModulatedVectorField, Sinusoid, TimeVaryingExt as _};
|
||||
use log::{error, info, warn};
|
||||
use rayon::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
mod cache;
|
||||
use cache::DiskCache;
|
||||
use cache::SyncDiskCache;
|
||||
|
||||
type Mat = IsoConductorOr<f32, Ferroxcube3R1MH>;
|
||||
|
||||
@@ -673,7 +674,7 @@ fn main() {
|
||||
variants.len() / post_times.len(),
|
||||
);
|
||||
|
||||
let mut geom_cache = DiskCache::new_with_supplier(
|
||||
let mut geom_cache = SyncDiskCache::new_with_supplier(
|
||||
&format!("{}/.geom_cache", ensure_out_dir(i)),
|
||||
|geom: &GeomParams| derive_geometries(geom.clone())
|
||||
);
|
||||
@@ -719,7 +720,7 @@ fn main() {
|
||||
};
|
||||
|
||||
let wraps1_choices: Vec<_> = (-120..120)
|
||||
.into_iter()
|
||||
.into_par_iter()
|
||||
.filter_map(|wraps1| {
|
||||
let params = GeomParams {
|
||||
wraps1: (wraps1 * 4) as f32,
|
||||
|
Reference in New Issue
Block a user