From bab938c563930391aa59d9f541f4f6d7effd6e4b Mon Sep 17 00:00:00 2001 From: abdul124 Date: Mon, 22 Jul 2024 11:13:45 +0800 Subject: [PATCH] add nalgebra dependency Co-authored-by: abdul124 Co-committed-by: abdul124 --- flake.nix | 1 + src/Cargo.lock | 142 +++++++++++++++++++++++++++++++++ src/libksupport/Cargo.toml.tpl | 6 ++ 3 files changed, 149 insertions(+) diff --git a/flake.nix b/flake.nix index 7bc0d560..5660e319 100644 --- a/flake.nix +++ b/flake.nix @@ -126,6 +126,7 @@ lockFile = src/Cargo.lock; outputHashes = { "tar-no-std-0.1.8" = "sha256-xm17108v4smXOqxdLvHl9CxTCJslmeogjm4Y87IXFuM="; + "nalgebra-0.32.6" = "sha256-L/YudkVOtfGYoNQKBD7LMk/sMYgRDzPDdpGL5rO7G2I="; }; }; diff --git a/src/Cargo.lock b/src/Cargo.lock index de037264..c14d5236 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -249,6 +249,7 @@ dependencies = [ "nb 0.1.3", "unwind", "vcell", + "nalgebra", "void", ] @@ -571,6 +572,147 @@ dependencies = [ "libc", ] +[[package]] +name = "nalgebra" +version = "0.32.6" +source = "git+https://git.m-labs.hk/M-labs/nalgebra?rev=dd00f9b#dd00f9b46046e0b931d1b470166db02fd29591be" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-complex" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "simba" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50582927ed6f77e4ac020c057f37a268fc6aebc29225050365aacbb9deeeddc4" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "num-bigint" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "wide" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd89cf484471f953ee84f07c0dff0ea20e9ddf976f03cabdf5dda48b221f22e7" +features = ["no_std"] +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "bytemuck" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" + +[[package]] +name = "safe_arch" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +dependencies = [ + "bytemuck", +] + [[package]] name = "vcell" version = "0.1.3" diff --git a/src/libksupport/Cargo.toml.tpl b/src/libksupport/Cargo.toml.tpl index 7e26bd55..55f16182 100644 --- a/src/libksupport/Cargo.toml.tpl +++ b/src/libksupport/Cargo.toml.tpl @@ -32,3 +32,9 @@ unwind = { path = "../libunwind" } libc = { path = "../libc" } io = { path = "../libio" } libboard_artiq = { path = "../libboard_artiq" } + +[dependencies.nalgebra] +git = "https://git.m-labs.hk/M-labs/nalgebra.git" +rev = "dd00f9b" +default-features = false +features = ["libm", "alloc"]