From 45d2de29c6355f39db1543ccbea9cd1dbff4d9bb Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 28 Jul 2022 15:40:23 -0700 Subject: [PATCH] rename 'coremem_types' -> 'coremem_cross' to better reflect its purpose --- Cargo.lock | 18 ++++++++--------- Cargo.toml | 2 +- crates/applications/wavefront/src/main.rs | 2 +- crates/coremem/Cargo.toml | 2 +- crates/coremem/src/bin/bench.rs | 2 +- crates/coremem/src/driver.rs | 2 +- crates/coremem/src/geom/line.rs | 4 ++-- crates/coremem/src/geom/polygon.rs | 4 ++-- crates/coremem/src/geom/region/primitives.rs | 4 ++-- crates/coremem/src/geom/units.rs | 4 ++-- crates/coremem/src/lib.rs | 6 +++--- crates/coremem/src/meas.rs | 2 +- crates/coremem/src/render.rs | 2 +- .../src/sim/legacy/mat/bh_ferromagnet.rs | 2 +- crates/coremem/src/sim/legacy/mat/db.rs | 2 +- crates/coremem/src/sim/legacy/mat/linear.rs | 2 +- crates/coremem/src/sim/legacy/mat/mod.rs | 20 +++++++++---------- crates/coremem/src/sim/legacy/mod.rs | 4 ++-- crates/coremem/src/sim/mod.rs | 6 +++--- crates/coremem/src/sim/spirv/cpu.rs | 8 ++++---- crates/coremem/src/sim/spirv/gpu.rs | 4 ++-- crates/coremem/src/sim/spirv/mod.rs | 8 ++++---- crates/coremem/src/stim.rs | 2 +- crates/{types => cross}/Cargo.toml | 5 +++-- .../src/compound/enumerated.rs | 0 .../src/compound/list/flat.rs | 0 .../src/compound/list/linked.rs | 0 .../{types => cross}/src/compound/list/mod.rs | 0 .../src/compound/list/tuple_consumer.rs | 0 crates/{types => cross}/src/compound/mod.rs | 0 .../{types => cross}/src/compound/optional.rs | 0 crates/{types => cross}/src/compound/peano.rs | 0 crates/{types => cross}/src/dim.rs | 0 crates/{types => cross}/src/lib.rs | 0 crates/{types => cross}/src/mat/compound.rs | 0 crates/{types => cross}/src/mat/conductor.rs | 0 crates/{types => cross}/src/mat/mb_pgram.rs | 0 crates/{types => cross}/src/mat/mh_pgram.rs | 0 crates/{types => cross}/src/mat/mod.rs | 0 crates/{types => cross}/src/real.rs | 0 crates/{types => cross}/src/step.rs | 0 crates/{types => cross}/src/vec.rs | 0 crates/{types => cross}/src/vecu.rs | 0 crates/spirv_backend/Cargo.toml | 2 +- crates/spirv_backend/src/adapt.rs | 8 ++++---- crates/spirv_backend/src/lib.rs | 8 ++++---- 46 files changed, 68 insertions(+), 67 deletions(-) rename crates/{types => cross}/Cargo.toml (60%) rename crates/{types => cross}/src/compound/enumerated.rs (100%) rename crates/{types => cross}/src/compound/list/flat.rs (100%) rename crates/{types => cross}/src/compound/list/linked.rs (100%) rename crates/{types => cross}/src/compound/list/mod.rs (100%) rename crates/{types => cross}/src/compound/list/tuple_consumer.rs (100%) rename crates/{types => cross}/src/compound/mod.rs (100%) rename crates/{types => cross}/src/compound/optional.rs (100%) rename crates/{types => cross}/src/compound/peano.rs (100%) rename crates/{types => cross}/src/dim.rs (100%) rename crates/{types => cross}/src/lib.rs (100%) rename crates/{types => cross}/src/mat/compound.rs (100%) rename crates/{types => cross}/src/mat/conductor.rs (100%) rename crates/{types => cross}/src/mat/mb_pgram.rs (100%) rename crates/{types => cross}/src/mat/mh_pgram.rs (100%) rename crates/{types => cross}/src/mat/mod.rs (100%) rename crates/{types => cross}/src/real.rs (100%) rename crates/{types => cross}/src/step.rs (100%) rename crates/{types => cross}/src/vec.rs (100%) rename crates/{types => cross}/src/vecu.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 0f474f4..1e3a882 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -312,7 +312,7 @@ version = "0.1.0" dependencies = [ "bincode", "common_macros", - "coremem_types", + "coremem_cross", "criterion", "crossterm", "csv", @@ -345,6 +345,13 @@ dependencies = [ "y4m", ] +[[package]] +name = "coremem_cross" +version = "0.2.0" +dependencies = [ + "serde", +] + [[package]] name = "coremem_post" version = "0.1.0" @@ -359,13 +366,6 @@ dependencies = [ "structopt", ] -[[package]] -name = "coremem_types" -version = "0.1.0" -dependencies = [ - "serde", -] - [[package]] name = "crc32fast" version = "1.3.2" @@ -2096,7 +2096,7 @@ source = "git+https://github.com/EmbarkStudios/rust-gpu#0866cf591a7fdbbd15bdb346 name = "spirv_backend" version = "0.1.0" dependencies = [ - "coremem_types", + "coremem_cross", "spirv-std", ] diff --git a/Cargo.toml b/Cargo.toml index 65cefe1..d56fcf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = [ "crates/spirv_backend", "crates/spirv_backend_builder", "crates/spirv_backend_runner", - "crates/types", + "crates/cross", "crates/post", "crates/applications/buffer_proto5", diff --git a/crates/applications/wavefront/src/main.rs b/crates/applications/wavefront/src/main.rs index b21ee59..60f9a1c 100644 --- a/crates/applications/wavefront/src/main.rs +++ b/crates/applications/wavefront/src/main.rs @@ -12,7 +12,7 @@ use coremem::geom::{Coord as _, Cube, Index}; use coremem::units::Seconds; use coremem::sim::spirv::{self, SpirvSim}; use coremem::stim::{Stimulus, TimeVarying as _, UniformStimulus}; -use coremem::types::vec::Vec3; +use coremem::cross::vec::Vec3; type Mat = mat::FullyGenericMaterial; diff --git a/crates/coremem/Cargo.toml b/crates/coremem/Cargo.toml index 556469a..62a00f2 100644 --- a/crates/coremem/Cargo.toml +++ b/crates/coremem/Cargo.toml @@ -47,7 +47,7 @@ spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu" } spirv-std-macros = { git = "https://github.com/EmbarkStudios/rust-gpu" } spirv_backend = { path = "../spirv_backend" } spirv_backend_runner = { path = "../spirv_backend_runner" } -coremem_types = { path = "../types", features = ["fmt", "serde"] } +coremem_cross = { path = "../cross", features = ["fmt", "serde"] } [dev-dependencies] diff --git a/crates/coremem/src/bin/bench.rs b/crates/coremem/src/bin/bench.rs index 4cce159..c4e7276 100644 --- a/crates/coremem/src/bin/bench.rs +++ b/crates/coremem/src/bin/bench.rs @@ -1,7 +1,7 @@ use coremem::{self, Driver, GenericSim}; use coremem::sim::legacy::SimState; use coremem::sim::spirv::{SpirvSim, WgpuBackend}; -use coremem::types::mat::FullyGenericMaterial; +use coremem::cross::mat::FullyGenericMaterial; use coremem::geom::Index; use std::time::{Instant, Duration}; diff --git a/crates/coremem/src/driver.rs b/crates/coremem/src/driver.rs index 3af94c3..eea366f 100644 --- a/crates/coremem/src/driver.rs +++ b/crates/coremem/src/driver.rs @@ -6,7 +6,7 @@ use crate::render::{self, MultiRenderer, Renderer}; use crate::sim::{GenericSim, MaterialSim, SampleableSim}; use crate::sim::units::{Frame, Time}; use crate::stim::AbstractStimulus; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; use log::{info, trace}; use serde::{Deserialize, Serialize}; diff --git a/crates/coremem/src/geom/line.rs b/crates/coremem/src/geom/line.rs index fa128ba..3ede0d8 100644 --- a/crates/coremem/src/geom/line.rs +++ b/crates/coremem/src/geom/line.rs @@ -1,5 +1,5 @@ -use coremem_types::real::Real; -use coremem_types::vec::Vec2; +use coremem_cross::real::Real; +use coremem_cross::vec::Vec2; use std::ops::Add; diff --git a/crates/coremem/src/geom/polygon.rs b/crates/coremem/src/geom/polygon.rs index 966a1c7..d1bb74e 100644 --- a/crates/coremem/src/geom/polygon.rs +++ b/crates/coremem/src/geom/polygon.rs @@ -1,6 +1,6 @@ use crate::geom::Line2d; -use coremem_types::real::Real; -use coremem_types::vec::Vec2; +use coremem_cross::real::Real; +use coremem_cross::vec::Vec2; #[derive(Clone, Debug, PartialEq)] pub struct Polygon2d { diff --git a/crates/coremem/src/geom/region/primitives.rs b/crates/coremem/src/geom/region/primitives.rs index 45405c1..3452c53 100644 --- a/crates/coremem/src/geom/region/primitives.rs +++ b/crates/coremem/src/geom/region/primitives.rs @@ -1,6 +1,6 @@ use crate::geom::Meters; -use coremem_types::real::Real as _; -use coremem_types::vec::{Vec2, Vec3}; +use coremem_cross::real::Real as _; +use coremem_cross::vec::{Vec2, Vec3}; use serde::{Serialize, Deserialize}; use std::fmt::{self, Display}; diff --git a/crates/coremem/src/geom/units.rs b/crates/coremem/src/geom/units.rs index 16816ff..ebc82d8 100644 --- a/crates/coremem/src/geom/units.rs +++ b/crates/coremem/src/geom/units.rs @@ -1,5 +1,5 @@ -use coremem_types::real::ToFloat; -use coremem_types::vec::{Vec3, Vec3u}; +use coremem_cross::real::ToFloat; +use coremem_cross::vec::{Vec3, Vec3u}; use serde::{Serialize, Deserialize}; use std::fmt::{self, Display}; use std::cmp::Ordering; diff --git a/crates/coremem/src/lib.rs b/crates/coremem/src/lib.rs index 0cf9ff5..27833ab 100644 --- a/crates/coremem/src/lib.rs +++ b/crates/coremem/src/lib.rs @@ -16,9 +16,9 @@ pub mod stim; pub use driver::*; pub use sim::*; -pub use coremem_types as types; -pub use coremem_types::real; -pub use coremem_types::mat; +pub use coremem_cross as cross; +pub use coremem_cross::real; +pub use coremem_cross::mat; // Some things to keep in mind: // B = mu_r*H + M diff --git a/crates/coremem/src/meas.rs b/crates/coremem/src/meas.rs index 9ff8d48..593f4da 100644 --- a/crates/coremem/src/meas.rs +++ b/crates/coremem/src/meas.rs @@ -1,6 +1,6 @@ use crate::geom::{Meters, Region, Torus, WorldRegion}; use crate::real::{Real as _, ToFloat as _}; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; use crate::sim::SampleableSim; use dyn_clone::{self, DynClone}; use indexmap::IndexMap; diff --git a/crates/coremem/src/render.rs b/crates/coremem/src/render.rs index ac93e4a..8f3b779 100644 --- a/crates/coremem/src/render.rs +++ b/crates/coremem/src/render.rs @@ -1,6 +1,6 @@ use crate::geom::Meters; use crate::real::ToFloat as _; -use crate::types::vec::{Vec2, Vec3}; +use crate::cross::vec::{Vec2, Vec3}; use crate::sim::{SampleableSim, Sample, StaticSim}; use crate::meas::{self, AbstractMeasurement}; use crossterm::{cursor, QueueableCommand as _}; diff --git a/crates/coremem/src/sim/legacy/mat/bh_ferromagnet.rs b/crates/coremem/src/sim/legacy/mat/bh_ferromagnet.rs index 97d16ba..8a003be 100644 --- a/crates/coremem/src/sim/legacy/mat/bh_ferromagnet.rs +++ b/crates/coremem/src/sim/legacy/mat/bh_ferromagnet.rs @@ -2,7 +2,7 @@ use super::Material; use crate::geom::{Line2d, Polygon2d}; use crate::real::Real; use crate::sim::legacy::{CellState, StepParametersMut}; -use crate::types::vec::{Vec2, Vec3}; +use crate::cross::vec::{Vec2, Vec3}; use lazy_static::lazy_static; use log::trace; diff --git a/crates/coremem/src/sim/legacy/mat/db.rs b/crates/coremem/src/sim/legacy/mat/db.rs index 3906703..27aaec8 100644 --- a/crates/coremem/src/sim/legacy/mat/db.rs +++ b/crates/coremem/src/sim/legacy/mat/db.rs @@ -2,7 +2,7 @@ use super::{AnisomorphicConductor, IsomorphicConductor, LinearMagnet, Ferroxcube3R1, MinimalSquare}; use crate::real::Real; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; pub fn conductor(conductivity: R2) -> IsomorphicConductor { IsomorphicConductor::new(conductivity.cast()) diff --git a/crates/coremem/src/sim/legacy/mat/linear.rs b/crates/coremem/src/sim/legacy/mat/linear.rs index 2af2752..9507996 100644 --- a/crates/coremem/src/sim/legacy/mat/linear.rs +++ b/crates/coremem/src/sim/legacy/mat/linear.rs @@ -1,7 +1,7 @@ use super::Material; use crate::real::Real; use crate::sim::legacy::CellState; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; use serde::{Serialize, Deserialize}; diff --git a/crates/coremem/src/sim/legacy/mat/mod.rs b/crates/coremem/src/sim/legacy/mat/mod.rs index 90046d0..b67240e 100644 --- a/crates/coremem/src/sim/legacy/mat/mod.rs +++ b/crates/coremem/src/sim/legacy/mat/mod.rs @@ -1,6 +1,6 @@ use crate::real::Real; use crate::sim::legacy::{CellState, PmlParameters, PmlState, StepParameters, StepParametersMut}; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; use enum_dispatch::enum_dispatch; use serde::{Serialize, Deserialize}; @@ -10,7 +10,7 @@ mod bh_ferromagnet; mod linear; pub use bh_ferromagnet::*; -pub use coremem_types::mat::{ +pub use coremem_cross::mat::{ AnisomorphicConductor, Ferroxcube3R1MH, FullyGenericMaterial, @@ -316,14 +316,14 @@ impl Material for GenericMaterialOneField { } } -// coremem_types adapters +// coremem_cross adapters // TODO: move this to a dedicated file -/// the coremem_types Materials are stateless; +/// the coremem_cross Materials are stateless; /// rather than hold onto their own magnetic fields (for example), the simulation holds that. /// that's counter to the original cpu-only simulation, in which materials hold their own state. /// -/// this type adapts any stateless coremem_types::mat::Material type to be a coremem::mat::Material. +/// this type adapts any stateless coremem_cross::mat::Material type to be a coremem::mat::Material. #[derive(Default, Copy, Clone, PartialEq, Serialize, Deserialize)] pub struct AdaptStateless { mat: M, @@ -342,7 +342,7 @@ impl From for AdaptStateless { } } -impl> Material for AdaptStateless { +impl> Material for AdaptStateless { fn m(&self) -> Vec3 { self.m } @@ -359,20 +359,20 @@ impl> Material for AdaptStateless // conductors: these are truly stateless impl Material for AnisomorphicConductor { fn step_parameters_mut<'a>(&'a mut self) -> StepParametersMut<'a, R> { - let c = coremem_types::mat::Material::conductivity(self); + let c = coremem_cross::mat::Material::conductivity(self); StepParametersMut::default().with_conductivity(c) } } impl Material for IsomorphicConductor { fn step_parameters_mut<'a>(&'a mut self) -> StepParametersMut<'a, R> { - let c = coremem_types::mat::Material::conductivity(self); + let c = coremem_cross::mat::Material::conductivity(self); StepParametersMut::default().with_conductivity(c) } } -pub type MBPgram = AdaptStateless>; +pub type MBPgram = AdaptStateless>; impl MBPgram { pub fn new(b_start: R, b_end: R, m_max: R) -> Self { - coremem_types::mat::MBPgram::new(b_start, b_end, m_max).into() + coremem_cross::mat::MBPgram::new(b_start, b_end, m_max).into() } } diff --git a/crates/coremem/src/sim/legacy/mod.rs b/crates/coremem/src/sim/legacy/mod.rs index 02fac90..88c1d50 100644 --- a/crates/coremem/src/sim/legacy/mod.rs +++ b/crates/coremem/src/sim/legacy/mod.rs @@ -1,8 +1,8 @@ pub mod mat; use crate::geom::{Coord, Index, Meters}; -use crate::types::real::{R32, Real}; -use crate::types::vec::{Vec3, Vec3u}; +use crate::cross::real::{R32, Real}; +use crate::cross::vec::{Vec3, Vec3u}; use crate::sim::{CellStateWithM, GenericSim, MaterialSim, Sample, SampleableSim, StaticSim}; use crate::stim::AbstractStimulus; diff --git a/crates/coremem/src/sim/mod.rs b/crates/coremem/src/sim/mod.rs index b48b11d..f6fd5ca 100644 --- a/crates/coremem/src/sim/mod.rs +++ b/crates/coremem/src/sim/mod.rs @@ -1,7 +1,7 @@ use crate::geom::{Coord, Cube, Index, InvertedRegion, Meters, Region}; -use crate::types::mat::Vacuum; -use crate::types::real::Real; -use crate::types::vec::{Vec3, Vec3u}; +use crate::cross::mat::Vacuum; +use crate::cross::real::Real; +use crate::cross::vec::{Vec3, Vec3u}; use crate::stim::{AbstractStimulus, NoopStimulus}; use rayon::prelude::*; use serde::{Serialize, Deserialize}; diff --git a/crates/coremem/src/sim/spirv/cpu.rs b/crates/coremem/src/sim/spirv/cpu.rs index 5a87d18..f8f4d0d 100644 --- a/crates/coremem/src/sim/spirv/cpu.rs +++ b/crates/coremem/src/sim/spirv/cpu.rs @@ -1,7 +1,7 @@ -use coremem_types::mat::Material; -use coremem_types::real::Real; -use coremem_types::step::{SimMeta, StepEContext, StepHContext}; -use coremem_types::vec::{Vec3, Vec3u}; +use coremem_cross::mat::Material; +use coremem_cross::real::Real; +use coremem_cross::step::{SimMeta, StepEContext, StepHContext}; +use coremem_cross::vec::{Vec3, Vec3u}; use super::SimBackend; diff --git a/crates/coremem/src/sim/spirv/gpu.rs b/crates/coremem/src/sim/spirv/gpu.rs index 4664f97..c91a65b 100644 --- a/crates/coremem/src/sim/spirv/gpu.rs +++ b/crates/coremem/src/sim/spirv/gpu.rs @@ -5,8 +5,8 @@ use std::num::NonZeroU64; use wgpu; use wgpu::util::DeviceExt as _; -use coremem_types::vec::{Vec3, Vec3u}; -use coremem_types::step::SimMeta; +use coremem_cross::vec::{Vec3, Vec3u}; +use coremem_cross::step::SimMeta; use spirv_backend::HasEntryPoints; diff --git a/crates/coremem/src/sim/spirv/mod.rs b/crates/coremem/src/sim/spirv/mod.rs index 1958824..afb7c05 100644 --- a/crates/coremem/src/sim/spirv/mod.rs +++ b/crates/coremem/src/sim/spirv/mod.rs @@ -6,9 +6,9 @@ use crate::geom::{Coord, Index, Meters}; use crate::real::Real; use crate::sim::{CellStateWithM, GenericSim, MaterialSim, Sample, SampleableSim, StaticSim}; use crate::stim::AbstractStimulus; -use crate::types::vec::Vec3; -use coremem_types::mat::{FullyGenericMaterial, Material}; -use coremem_types::step::SimMeta; +use crate::cross::vec::Vec3; +use coremem_cross::mat::{FullyGenericMaterial, Material}; +use coremem_cross::step::SimMeta; mod cpu; mod gpu; @@ -514,7 +514,7 @@ mod test { ref_state.put_material(Index::new(x, y, z), legacy::mat::MBPgram::new( b_start.cast(), b_end.cast(), m_max.cast() )); - dut_state.put_material(Index::new(x, y, z), coremem_types::mat::MBPgram::new( + dut_state.put_material(Index::new(x, y, z), coremem_cross::mat::MBPgram::new( b_start, b_end, m_max )); } diff --git a/crates/coremem/src/stim.rs b/crates/coremem/src/stim.rs index 7eb93d0..03d2403 100644 --- a/crates/coremem/src/stim.rs +++ b/crates/coremem/src/stim.rs @@ -1,5 +1,5 @@ use crate::real::*; -use crate::types::vec::Vec3; +use crate::cross::vec::Vec3; use crate::geom::{Meters, Region}; use rand; diff --git a/crates/types/Cargo.toml b/crates/cross/Cargo.toml similarity index 60% rename from crates/types/Cargo.toml rename to crates/cross/Cargo.toml index 9d4deb7..ca129b8 100644 --- a/crates/types/Cargo.toml +++ b/crates/cross/Cargo.toml @@ -1,10 +1,11 @@ [package] -name = "coremem_types" -version = "0.1.0" +name = "coremem_cross" +version = "0.2.0" authors = ["Colin "] edition = "2021" [features] +# some functionality does not compile for the spirv target, so we feature gate these. serde = [ "dep:serde" ] fmt = [] diff --git a/crates/types/src/compound/enumerated.rs b/crates/cross/src/compound/enumerated.rs similarity index 100% rename from crates/types/src/compound/enumerated.rs rename to crates/cross/src/compound/enumerated.rs diff --git a/crates/types/src/compound/list/flat.rs b/crates/cross/src/compound/list/flat.rs similarity index 100% rename from crates/types/src/compound/list/flat.rs rename to crates/cross/src/compound/list/flat.rs diff --git a/crates/types/src/compound/list/linked.rs b/crates/cross/src/compound/list/linked.rs similarity index 100% rename from crates/types/src/compound/list/linked.rs rename to crates/cross/src/compound/list/linked.rs diff --git a/crates/types/src/compound/list/mod.rs b/crates/cross/src/compound/list/mod.rs similarity index 100% rename from crates/types/src/compound/list/mod.rs rename to crates/cross/src/compound/list/mod.rs diff --git a/crates/types/src/compound/list/tuple_consumer.rs b/crates/cross/src/compound/list/tuple_consumer.rs similarity index 100% rename from crates/types/src/compound/list/tuple_consumer.rs rename to crates/cross/src/compound/list/tuple_consumer.rs diff --git a/crates/types/src/compound/mod.rs b/crates/cross/src/compound/mod.rs similarity index 100% rename from crates/types/src/compound/mod.rs rename to crates/cross/src/compound/mod.rs diff --git a/crates/types/src/compound/optional.rs b/crates/cross/src/compound/optional.rs similarity index 100% rename from crates/types/src/compound/optional.rs rename to crates/cross/src/compound/optional.rs diff --git a/crates/types/src/compound/peano.rs b/crates/cross/src/compound/peano.rs similarity index 100% rename from crates/types/src/compound/peano.rs rename to crates/cross/src/compound/peano.rs diff --git a/crates/types/src/dim.rs b/crates/cross/src/dim.rs similarity index 100% rename from crates/types/src/dim.rs rename to crates/cross/src/dim.rs diff --git a/crates/types/src/lib.rs b/crates/cross/src/lib.rs similarity index 100% rename from crates/types/src/lib.rs rename to crates/cross/src/lib.rs diff --git a/crates/types/src/mat/compound.rs b/crates/cross/src/mat/compound.rs similarity index 100% rename from crates/types/src/mat/compound.rs rename to crates/cross/src/mat/compound.rs diff --git a/crates/types/src/mat/conductor.rs b/crates/cross/src/mat/conductor.rs similarity index 100% rename from crates/types/src/mat/conductor.rs rename to crates/cross/src/mat/conductor.rs diff --git a/crates/types/src/mat/mb_pgram.rs b/crates/cross/src/mat/mb_pgram.rs similarity index 100% rename from crates/types/src/mat/mb_pgram.rs rename to crates/cross/src/mat/mb_pgram.rs diff --git a/crates/types/src/mat/mh_pgram.rs b/crates/cross/src/mat/mh_pgram.rs similarity index 100% rename from crates/types/src/mat/mh_pgram.rs rename to crates/cross/src/mat/mh_pgram.rs diff --git a/crates/types/src/mat/mod.rs b/crates/cross/src/mat/mod.rs similarity index 100% rename from crates/types/src/mat/mod.rs rename to crates/cross/src/mat/mod.rs diff --git a/crates/types/src/real.rs b/crates/cross/src/real.rs similarity index 100% rename from crates/types/src/real.rs rename to crates/cross/src/real.rs diff --git a/crates/types/src/step.rs b/crates/cross/src/step.rs similarity index 100% rename from crates/types/src/step.rs rename to crates/cross/src/step.rs diff --git a/crates/types/src/vec.rs b/crates/cross/src/vec.rs similarity index 100% rename from crates/types/src/vec.rs rename to crates/cross/src/vec.rs diff --git a/crates/types/src/vecu.rs b/crates/cross/src/vecu.rs similarity index 100% rename from crates/types/src/vecu.rs rename to crates/cross/src/vecu.rs diff --git a/crates/spirv_backend/Cargo.toml b/crates/spirv_backend/Cargo.toml index 830bddc..0f05691 100644 --- a/crates/spirv_backend/Cargo.toml +++ b/crates/spirv_backend/Cargo.toml @@ -8,4 +8,4 @@ crate-type = ["dylib", "lib"] [dependencies] spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["glam"] } # MIT or Apache 2.0 -coremem_types = { path = "../types" } +coremem_cross = { path = "../cross" } diff --git a/crates/spirv_backend/src/adapt.rs b/crates/spirv_backend/src/adapt.rs index 14a6281..b35de45 100644 --- a/crates/spirv_backend/src/adapt.rs +++ b/crates/spirv_backend/src/adapt.rs @@ -1,9 +1,9 @@ use spirv_std::RuntimeArray; -use coremem_types::mat::Material; -use coremem_types::real::Real; -use coremem_types::step::{SimMeta, StepEContext, StepHContext}; -use coremem_types::vec::{Vec3, Vec3u}; +use coremem_cross::mat::Material; +use coremem_cross::real::Real; +use coremem_cross::step::{SimMeta, StepEContext, StepHContext}; +use coremem_cross::vec::{Vec3, Vec3u}; use crate::support::SizedArray; diff --git a/crates/spirv_backend/src/lib.rs b/crates/spirv_backend/src/lib.rs index 774538f..dd26fa7 100644 --- a/crates/spirv_backend/src/lib.rs +++ b/crates/spirv_backend/src/lib.rs @@ -15,10 +15,10 @@ use spirv_std::macros::spirv; mod adapt; mod support; -use coremem_types::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr}; -use coremem_types::real::R32; -use coremem_types::step::SimMeta; -use coremem_types::vec::{Vec3, Vec3u}; +use coremem_cross::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr}; +use coremem_cross::real::R32; +use coremem_cross::step::SimMeta; +use coremem_cross::vec::{Vec3, Vec3u}; type Iso3R1 = IsoConductorOr;