rename wide_traits to fixed_wide_traits
This commit is contained in:
parent
a96cae9e80
commit
d48b03889d
10
fixed_wide/Cargo.lock
generated
10
fixed_wide/Cargo.lock
generated
@ -13,16 +13,16 @@ name = "fixed_wide"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bnum",
|
||||
"fixed_wide_traits",
|
||||
"typenum",
|
||||
"wide_traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixed_wide_traits"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "wide_traits"
|
||||
version = "0.1.0"
|
||||
|
@ -4,10 +4,10 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default=["wide_traits"]
|
||||
wide_traits=["dep:wide_traits"]
|
||||
default=["fixed_wide_traits"]
|
||||
fixed_wide_traits=["dep:fixed_wide_traits"]
|
||||
|
||||
[dependencies]
|
||||
bnum = "0.11.0"
|
||||
typenum = "1.17.0"
|
||||
wide_traits = { version = "0.1.0", path = "../wide_traits", optional = true }
|
||||
fixed_wide_traits = { version = "0.1.0", path = "../fixed_wide_traits", optional = true }
|
||||
|
@ -2,7 +2,7 @@ use bnum::BInt;
|
||||
use bnum::cast::As;
|
||||
use typenum::{Sum,Unsigned};
|
||||
use crate::fixed::Fixed;
|
||||
use wide_traits::wide::WideMul;
|
||||
use fixed_wide_traits::wide::WideMul;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
macro_rules! impl_wide_mul {
|
@ -1,7 +1,7 @@
|
||||
pub mod fixed;
|
||||
pub mod types;
|
||||
|
||||
#[cfg(feature="wide_traits")]
|
||||
mod wide_traits;
|
||||
#[cfg(feature="wide_traits")]
|
||||
pub use ::wide_traits::wide;
|
||||
#[cfg(feature="fixed_wide_traits")]
|
||||
mod fixed_wide_traits;
|
||||
#[cfg(feature="fixed_wide_traits")]
|
||||
pub use ::fixed_wide_traits::wide;
|
||||
|
@ -38,6 +38,14 @@ dependencies = [
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixed_wide_traits"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fixed",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "2.4.1"
|
||||
@ -53,11 +61,3 @@ name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "wide_traits"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fixed",
|
||||
"typenum",
|
||||
]
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "wide_traits"
|
||||
name = "fixed_wide_traits"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
12
fixed_wide_vectors/Cargo.lock
generated
12
fixed_wide_vectors/Cargo.lock
generated
@ -13,16 +13,20 @@ name = "fixed_wide"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bnum",
|
||||
"fixed_wide_traits",
|
||||
"typenum",
|
||||
"wide_traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixed_wide_traits"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "fixed_wide_vectors"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fixed_wide",
|
||||
"wide_traits",
|
||||
"fixed_wide_traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -30,7 +34,3 @@ name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "wide_traits"
|
||||
version = "0.1.0"
|
||||
|
@ -4,11 +4,11 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default=["wide_traits"]
|
||||
wide_traits=["dep:wide_traits"]
|
||||
default=["fixed_wide_traits"]
|
||||
fixed_wide_traits=["dep:fixed_wide_traits"]
|
||||
|
||||
[dependencies]
|
||||
wide_traits = { version = "0.1.0", path = "../wide_traits", optional = true }
|
||||
fixed_wide_traits = { version = "0.1.0", path = "../fixed_wide_traits", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
fixed_wide = { version = "0.1.0", path = "../fixed_wide" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
#[cfg(feature="wide_traits")]
|
||||
#[cfg(feature="fixed_wide_traits")]
|
||||
pub mod wide;
|
||||
|
||||
// Stolen from https://github.com/c1m50c/fixed-vectors (MIT license)
|
||||
|
@ -2,7 +2,7 @@
|
||||
#[macro_export(local_inner_macros)]
|
||||
macro_rules! impl_wide_operations {
|
||||
( $struct: ident { $($field: ident), + }, $size: expr ) => {
|
||||
impl<U,T:Copy+wide_traits::wide::WideMul<Output=U>> wide_traits::wide::WideMul for $struct<T> {
|
||||
impl<U,T:Copy+fixed_wide_traits::wide::WideMul<Output=U>> fixed_wide_traits::wide::WideMul for $struct<T> {
|
||||
type Output=$struct<U>;
|
||||
#[inline]
|
||||
fn wide_mul(self, rhs: Self) -> Self::Output {
|
||||
@ -11,7 +11,7 @@ macro_rules! impl_wide_operations {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl<U:std::ops::Add<Output=U>,T:Copy+wide_traits::wide::WideMul<Output=U>> $struct<T> {
|
||||
impl<U:std::ops::Add<Output=U>,T:Copy+fixed_wide_traits::wide::WideMul<Output=U>> $struct<T> {
|
||||
#[inline]
|
||||
pub fn wide_dot(self, other: Self) -> U {
|
||||
$crate::sum_repeating!(
|
||||
|
@ -1,4 +1,4 @@
|
||||
use wide_traits::wide::WideMul;
|
||||
use fixed_wide_traits::wide::WideMul;
|
||||
|
||||
use crate::Vector3;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user