remove spirv_backend_lib
this was a hack from earlier where we needed a different lib types based on whethere we were targeting the native host or the spirv backend. at some point we no longer needed different lib types. so the _lib piece is unnecessary.
This commit is contained in:
9
Cargo.lock
generated
9
Cargo.lock
generated
@@ -339,7 +339,7 @@ dependencies = [
|
|||||||
"spirv-builder",
|
"spirv-builder",
|
||||||
"spirv-std",
|
"spirv-std",
|
||||||
"spirv-std-macros",
|
"spirv-std-macros",
|
||||||
"spirv_backend_lib",
|
"spirv_backend",
|
||||||
"spirv_backend_runner",
|
"spirv_backend_runner",
|
||||||
"structopt",
|
"structopt",
|
||||||
"threadpool",
|
"threadpool",
|
||||||
@@ -2103,13 +2103,6 @@ dependencies = [
|
|||||||
"unicode-width",
|
"unicode-width",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "spirv_backend_lib"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"spirv-std",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "spirv_backend_runner"
|
name = "spirv_backend_runner"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@@ -4,7 +4,6 @@ members = [
|
|||||||
"crates/coremem",
|
"crates/coremem",
|
||||||
"crates/spirv_backend",
|
"crates/spirv_backend",
|
||||||
"crates/spirv_backend_builder",
|
"crates/spirv_backend_builder",
|
||||||
"crates/spirv_backend_lib",
|
|
||||||
"crates/spirv_backend_runner",
|
"crates/spirv_backend_runner",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ wgpu = "0.12"
|
|||||||
spirv-builder = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["use-compiled-tools"] }
|
spirv-builder = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["use-compiled-tools"] }
|
||||||
spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu" }
|
spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu" }
|
||||||
spirv-std-macros = { git = "https://github.com/EmbarkStudios/rust-gpu" }
|
spirv-std-macros = { git = "https://github.com/EmbarkStudios/rust-gpu" }
|
||||||
spirv_backend_lib = { path = "../spirv_backend_lib" }
|
spirv_backend = { path = "../spirv_backend" }
|
||||||
spirv_backend_runner = { path = "../spirv_backend_runner" }
|
spirv_backend_runner = { path = "../spirv_backend_runner" }
|
||||||
|
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ impl<R: Real> SpirvMBFerromagnet<R> {
|
|||||||
impl<R: Real> Material<R> for SpirvMBFerromagnet<R> {
|
impl<R: Real> Material<R> for SpirvMBFerromagnet<R> {
|
||||||
fn step_b(&mut self, context: &CellState<R>, delta_b: Vec3<R>) {
|
fn step_b(&mut self, context: &CellState<R>, delta_b: Vec3<R>) {
|
||||||
let target_b = context.with_m(self.m()).b() + delta_b;
|
let target_b = context.with_m(self.m()).b() + delta_b;
|
||||||
let curve = spirv_backend_lib::mat::MBPgram::new(
|
let curve = spirv_backend::mat::MBPgram::new(
|
||||||
self.0.curve.b_start.cast(),
|
self.0.curve.b_start.cast(),
|
||||||
self.0.curve.b_end.cast(),
|
self.0.curve.b_end.cast(),
|
||||||
self.0.curve.max_m.cast(),
|
self.0.curve.max_m.cast(),
|
||||||
|
@@ -7,10 +7,10 @@ use crate::geom::{Index, Vec3, Vec3u};
|
|||||||
|
|
||||||
/// hide the actual spirv backend structures inside a submodule to make their use/boundary clear.
|
/// hide the actual spirv backend structures inside a submodule to make their use/boundary clear.
|
||||||
mod ffi {
|
mod ffi {
|
||||||
pub use spirv_backend_lib::entry_points;
|
pub use spirv_backend::entry_points;
|
||||||
pub use spirv_backend_lib::sim::SerializedSimMeta;
|
pub use spirv_backend::sim::SerializedSimMeta;
|
||||||
pub use spirv_backend_lib::support::{Optional, Vec3Std, UVec3Std};
|
pub use spirv_backend::support::{Optional, Vec3Std, UVec3Std};
|
||||||
pub use spirv_backend_lib::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr, Material, MBPgram, MHPgram};
|
pub use spirv_backend::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr, Material, MBPgram, MHPgram};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Material {
|
pub trait Material {
|
||||||
|
@@ -169,11 +169,11 @@ impl<M: IntoFfi> SpirvSim<M>
|
|||||||
if flat_size * std::mem::size_of::<M::Ffi>() >= 0x40000000 {
|
if flat_size * std::mem::size_of::<M::Ffi>() >= 0x40000000 {
|
||||||
warn!("simulation size ({:?}) is greater than what is tested for: anything could happen!", size);
|
warn!("simulation size ({:?}) is greater than what is tested for: anything could happen!", size);
|
||||||
}
|
}
|
||||||
if flat_size > spirv_backend_lib::support::MAX_UNSIZED_ARRAY {
|
if flat_size > spirv_backend::support::MAX_UNSIZED_ARRAY {
|
||||||
warn!(
|
warn!(
|
||||||
"simulation size ({:?} elements) is too large (limit: {})!",
|
"simulation size ({:?} elements) is too large (limit: {})!",
|
||||||
flat_size,
|
flat_size,
|
||||||
spirv_backend_lib::support::MAX_UNSIZED_ARRAY
|
spirv_backend::support::MAX_UNSIZED_ARRAY
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let courant = 0.577;
|
let courant = 0.577;
|
||||||
@@ -725,7 +725,7 @@ mod test {
|
|||||||
let b_end = rng.gen_range(0.0..1e-3);
|
let b_end = rng.gen_range(0.0..1e-3);
|
||||||
let b_start = rng.gen_range(-b_end..b_end);
|
let b_start = rng.gen_range(-b_end..b_end);
|
||||||
let ref_mbp = crate::mat::MBPgram::new(b_start, b_end, max_m);
|
let ref_mbp = crate::mat::MBPgram::new(b_start, b_end, max_m);
|
||||||
let dut_mbp = spirv_backend_lib::mat::MBPgram::new(b_start, b_end, max_m);
|
let dut_mbp = spirv_backend::mat::MBPgram::new(b_start, b_end, max_m);
|
||||||
println!("Using max_m: {}, b: ({}, {})", max_m, b_start, b_end);
|
println!("Using max_m: {}, b: ({}, {})", max_m, b_start, b_end);
|
||||||
for _ in 0..1000 {
|
for _ in 0..1000 {
|
||||||
let start_m = rng.gen_range(-2e5..2e5);
|
let start_m = rng.gen_range(-2e5..2e5);
|
||||||
@@ -744,7 +744,7 @@ mod test {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use crate::sim::Meters;
|
use crate::sim::Meters;
|
||||||
use crate::stim::{NoopStimulus, RngStimulus};
|
use crate::stim::{NoopStimulus, RngStimulus};
|
||||||
use spirv_backend_lib::{step_e_generic_material as step_e, step_h_generic_material as step_h, UVec3};
|
use spirv_backend::{step_e_generic_material as step_e, step_h_generic_material as step_h, UVec3};
|
||||||
|
|
||||||
fn do_step<S: AbstractStimulus>(state: &mut SpirvSim, stim: &S) {
|
fn do_step<S: AbstractStimulus>(state: &mut SpirvSim, stim: &S) {
|
||||||
let meta = state.meta.clone();
|
let meta = state.meta.clone();
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "spirv_backend_lib"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
spirv-std = { git = "https://github.com/EmbarkStudios/rust-gpu", features = ["glam"] }
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
crate-type = ["lib"]
|
|
@@ -1 +0,0 @@
|
|||||||
../spirv_backend/src/
|
|
Reference in New Issue
Block a user