forked from StrafesNET/strafe-project
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"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bnum",
|
"bnum",
|
||||||
|
"fixed_wide_traits",
|
||||||
"typenum",
|
"typenum",
|
||||||
"wide_traits",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fixed_wide_traits"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.17.0"
|
version = "1.17.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wide_traits"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
@ -4,10 +4,10 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default=["wide_traits"]
|
default=["fixed_wide_traits"]
|
||||||
wide_traits=["dep:wide_traits"]
|
fixed_wide_traits=["dep:fixed_wide_traits"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bnum = "0.11.0"
|
bnum = "0.11.0"
|
||||||
typenum = "1.17.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 bnum::cast::As;
|
||||||
use typenum::{Sum,Unsigned};
|
use typenum::{Sum,Unsigned};
|
||||||
use crate::fixed::Fixed;
|
use crate::fixed::Fixed;
|
||||||
use wide_traits::wide::WideMul;
|
use fixed_wide_traits::wide::WideMul;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
macro_rules! impl_wide_mul {
|
macro_rules! impl_wide_mul {
|
@ -1,7 +1,7 @@
|
|||||||
pub mod fixed;
|
pub mod fixed;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
#[cfg(feature="wide_traits")]
|
#[cfg(feature="fixed_wide_traits")]
|
||||||
mod wide_traits;
|
mod fixed_wide_traits;
|
||||||
#[cfg(feature="wide_traits")]
|
#[cfg(feature="fixed_wide_traits")]
|
||||||
pub use ::wide_traits::wide;
|
pub use ::fixed_wide_traits::wide;
|
||||||
|
@ -38,6 +38,14 @@ dependencies = [
|
|||||||
"typenum",
|
"typenum",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fixed_wide_traits"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"fixed",
|
||||||
|
"typenum",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "half"
|
name = "half"
|
||||||
version = "2.4.1"
|
version = "2.4.1"
|
||||||
@ -53,11 +61,3 @@ name = "typenum"
|
|||||||
version = "1.17.0"
|
version = "1.17.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wide_traits"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"fixed",
|
|
||||||
"typenum",
|
|
||||||
]
|
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "wide_traits"
|
name = "fixed_wide_traits"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
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"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bnum",
|
"bnum",
|
||||||
|
"fixed_wide_traits",
|
||||||
"typenum",
|
"typenum",
|
||||||
"wide_traits",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fixed_wide_traits"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fixed_wide_vectors"
|
name = "fixed_wide_vectors"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fixed_wide",
|
"fixed_wide",
|
||||||
"wide_traits",
|
"fixed_wide_traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -30,7 +34,3 @@ name = "typenum"
|
|||||||
version = "1.17.0"
|
version = "1.17.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wide_traits"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
@ -4,11 +4,11 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default=["wide_traits"]
|
default=["fixed_wide_traits"]
|
||||||
wide_traits=["dep:wide_traits"]
|
fixed_wide_traits=["dep:fixed_wide_traits"]
|
||||||
|
|
||||||
[dependencies]
|
[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]
|
[dev-dependencies]
|
||||||
fixed_wide = { version = "0.1.0", path = "../fixed_wide" }
|
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;
|
pub mod wide;
|
||||||
|
|
||||||
// Stolen from https://github.com/c1m50c/fixed-vectors (MIT license)
|
// Stolen from https://github.com/c1m50c/fixed-vectors (MIT license)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#[macro_export(local_inner_macros)]
|
#[macro_export(local_inner_macros)]
|
||||||
macro_rules! impl_wide_operations {
|
macro_rules! impl_wide_operations {
|
||||||
( $struct: ident { $($field: ident), + }, $size: expr ) => {
|
( $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>;
|
type Output=$struct<U>;
|
||||||
#[inline]
|
#[inline]
|
||||||
fn wide_mul(self, rhs: Self) -> Self::Output {
|
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]
|
#[inline]
|
||||||
pub fn wide_dot(self, other: Self) -> U {
|
pub fn wide_dot(self, other: Self) -> U {
|
||||||
$crate::sum_repeating!(
|
$crate::sum_repeating!(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use wide_traits::wide::WideMul;
|
use fixed_wide_traits::wide::WideMul;
|
||||||
|
|
||||||
use crate::Vector3;
|
use crate::Vector3;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user