commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
8d46e1e93f28b595ca8663331596db73fc751ee9 | Lokathor | 2020-08-19T23:17:08 | Cargo Feature Docs. | diff --git a/Cargo.toml b/Cargo.toml
index a7535cc..28d860d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,9 @@ license = "Zlib OR Apache-2.0 OR MIT"
[features]
default = []
+
+# Activate `std` within the crate. Currently this gives a much faster `sqrt`
+# impl when an explicit hardware sqrt isn't available.... | 2 | 19 | 0 |
4c5e1e12b297ff947f0dc03986cac2a39a8f8b42 | Lokathor | 2020-08-19T22:54:52 | i think we just need to declare that we wanna link with std. | diff --git a/src/lib.rs b/src/lib.rs
index 3d51991..622bd93 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,11 @@
#![no_std]
#![allow(non_camel_case_types)]
+// Note(Lokathor): Due to standard library magic, the std-only methods for f32
+// and f64 will automatically be available simply by declaring this.
+#[cf... | 1 | 5 | 0 |
7b6cf694fcd2c0b42796ccc2796fc604fe19a188 | Lokathor | 2020-08-19T22:39:00 | Closes https://github.com/Lokathor/wide/issues/40 | diff --git a/src/lib.rs b/src/lib.rs
index 3dc089d..3d51991 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -310,6 +310,13 @@ macro_rules! impl_from_single_value {
fn from(elem: $elem) -> Self {
cast([elem; $len])
}
+ }
+ impl $simd {
+ #[inline]
+ #[must_use]
+ pub fn splat(elem... | 1 | 7 | 0 |
5e5d1acb9014a73599b6925bd9c8283629985cb9 | ronniec95 | 2020-08-19T17:13:47 | Added exp() function to f32x4 and f64x2 inspired/copied from Agner Fog vcl library with corresponding tests. Ready for review. (#39) | diff --git a/src/f32x4_.rs b/src/f32x4_.rs
index 8988ddd..8a59f46 100644
--- a/src/f32x4_.rs
+++ b/src/f32x4_.rs
@@ -27,6 +27,16 @@ macro_rules! polynomial_2 {
}};
}
+macro_rules! polynomial_5 {
+ ($x:expr, $c0:expr, $c1:expr, $c2:expr, $c3:expr, $c4:expr, $c5:expr $(,)?) => {{
+ let x = $x;
+ let x2 = x *... | 4 | 157 | 0 |
f5bc74fbe25e78e9aa3f5895aff22a71e2fb03e2 | Lokathor | 2020-08-19T04:04:22 | (cargo-release) start next development iteration 0.5.2-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 1493dc2..a7535cc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.5.1"
+version = "0.5.2-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
8e532970e14e7fa06ece4e8ea32ddaedcb3c561f | Lokathor | 2020-08-19T04:04:07 | (cargo-release) version 0.5.1 | diff --git a/Cargo.toml b/Cargo.toml
index 25420f6..1493dc2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.5.1-alpha.0"
+version = "0.5.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
e666589310d2eb652996a3250caae1603940e104 | Lokathor | 2020-08-19T04:01:33 | fix parens for i586 | diff --git a/src/f32x4_.rs b/src/f32x4_.rs
index 99cc49a..8988ddd 100644
--- a/src/f32x4_.rs
+++ b/src/f32x4_.rs
@@ -559,10 +559,10 @@ impl f32x4 {
if #[cfg(target_feature="sse")] {
move_mask_m128(self.sse)
} else {
- ((self.arr[0].to_bits() as i32 < 0) as i32) << 0 |
- ((self.arr[1... | 2 | 6 | 6 |
ec24ce5a5de4e0966bee08f6a3c23305bef8f1e0 | Lokathor | 2020-08-19T03:57:56 | Closes https://github.com/Lokathor/wide/issues/36 | diff --git a/src/f32x4_.rs b/src/f32x4_.rs
index e50afcf..99cc49a 100644
--- a/src/f32x4_.rs
+++ b/src/f32x4_.rs
@@ -552,4 +552,18 @@ impl f32x4 {
}
}
}
+ #[inline]
+ #[must_use]
+ pub fn move_mask(self) -> i32 {
+ pick! {
+ if #[cfg(target_feature="sse")] {
+ move_mask_m128(self.sse)
+... | 4 | 52 | 0 |
c6b6dbc1eb03c55e47dd317f7d148d1732b120a5 | Lokathor | 2020-08-19T03:49:42 | Closes https://github.com/Lokathor/wide/issues/37 | diff --git a/src/f32x4_.rs b/src/f32x4_.rs
index b02d3a9..e50afcf 100644
--- a/src/f32x4_.rs
+++ b/src/f32x4_.rs
@@ -28,7 +28,25 @@ macro_rules! polynomial_2 {
}
impl f32x4 {
+ const_f32_as_f32x4!(E, core::f32::consts::E);
+ const_f32_as_f32x4!(FRAC_1_PI, core::f32::consts::FRAC_1_PI);
+ const_f32_as_f32x4!(FRAC... | 2 | 36 | 0 |
178208c1f9f087c722086079431ffc2e93eb8599 | Lokathor | 2020-08-19T03:40:16 | Closes https://github.com/Lokathor/wide/issues/35 | diff --git a/src/lib.rs b/src/lib.rs
index fe30dea..3dc089d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -284,6 +284,13 @@ macro_rules! impl_from_a_for_b_with_cast {
fn from(arr: $arr) -> Self {
cast(arr)
}
+ }
+ impl From<$simd> for $arr {
+ #[inline]
+ #[must_use]
+ fn from(... | 1 | 7 | 0 |
e35ca90138bd9d5397503018d9b42660f4dc5231 | Lokathor | 2020-08-17T00:47:36 | (cargo-release) start next development iteration 0.5.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 98e23a8..25420f6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.5.0"
+version = "0.5.1-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
bb79622aa0f2cf534042922f553727afde8e0578 | Lokathor | 2020-08-17T00:47:15 | (cargo-release) version 0.5.0 | diff --git a/Cargo.toml b/Cargo.toml
index a6bd82e..98e23a8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.5.0-alpha.0"
+version = "0.5.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
56b76bff3eb7aba37c17cb74ea999a24faa8cf7e | Lokathor | 2020-05-04T00:46:27 | (cargo-release) start next development iteration 0.4.7-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index f3b6362..975a9e3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.6"
+version = "0.4.7-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
755bcedc5d0c7639e32998c4c14575079e0e7848 | Lokathor | 2020-05-04T00:46:06 | (cargo-release) version 0.4.6 | diff --git a/Cargo.toml b/Cargo.toml
index 7788ab6..f3b6362 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.6-alpha.0"
+version = "0.4.6"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
3a7ab24937b021d11eaf001c9828d8029658f282 | Aki Koskinen | 2020-05-04T00:43:53 | Fix sin_cos (#28)
* Fix i32x4 left shift by integer (i32) function
The shift amount mustn't be copied in each of the 4-byte integers of the
m128i value. Instead the whole m128i value represents one single integer,
and each 4-byte integer is shifted the same amount.
Also added an indexing function to i32x4, whi... | diff --git a/examples/demo.rs b/examples/demo.rs
index 230aecc..0c8ec87 100644
--- a/examples/demo.rs
+++ b/examples/demo.rs
@@ -3,7 +3,6 @@ use wide::*;
fn main() {
// /*
let mut f = 0.0;
- #[cfg(feature = "extern_crate_std")]
while f <= 1.5 {
println!("rad {:.2}: s/c {:?}", f, f32x4::from(f).sin_cos()... | 6 | 58 | 29 |
a44750d1c7f17ca4f4e2fd19ee4fcb3b5015789c | Lokathor | 2020-04-26T08:33:32 | (cargo-release) start next development iteration 0.4.6-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 5498e01..7788ab6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.5"
+version = "0.4.6-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
cd871792d2af6e16222efbdc25fe3ced6a43c4e2 | Lokathor | 2020-04-26T08:33:20 | (cargo-release) version 0.4.5 | diff --git a/Cargo.toml b/Cargo.toml
index c8c14e0..5498e01 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.5-alpha.0"
+version = "0.4.5"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
891e9d48e5e6f0dfcf4329036d5f37e37607b668 | Aki Koskinen | 2020-04-26T08:05:47 | Return value from sin_cos | diff --git a/src/m_f32x4/wide_methods.rs b/src/m_f32x4/wide_methods.rs
index 00223c8..de88f6f 100644
--- a/src/m_f32x4/wide_methods.rs
+++ b/src/m_f32x4/wide_methods.rs
@@ -654,6 +654,7 @@ impl f32x4 {
*s_mut = s;
*c_mut = c;
});
+ (f32x4::from(arr_sin), f32x4::from(arr_cos))
/*
//... | 1 | 1 | 0 |
5e0a78d62998dc30b5da46e9214e486ebca4ffea | Lokathor | 2020-04-25T17:43:01 | (cargo-release) start next development iteration 0.4.5-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index a88b61f..c8c14e0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.4"
+version = "0.4.5-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
6079006e5d601076dc0ea5d8d992905f7691b9a5 | Lokathor | 2020-04-25T17:42:38 | (cargo-release) version 0.4.4 | diff --git a/Cargo.toml b/Cargo.toml
index 09e5ba9..a88b61f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.4-alpha.0"
+version = "0.4.4"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
04355fb963f1ff89e377737a911abab378107abb | Lokathor | 2020-04-25T17:42:14 | fix sin_cos, requires std again. | diff --git a/examples/demo.rs b/examples/demo.rs
index 0c8ec87..230aecc 100644
--- a/examples/demo.rs
+++ b/examples/demo.rs
@@ -3,6 +3,7 @@ use wide::*;
fn main() {
// /*
let mut f = 0.0;
+ #[cfg(feature = "extern_crate_std")]
while f <= 1.5 {
println!("rad {:.2}: s/c {:?}", f, f32x4::from(f).sin_cos()... | 3 | 27 | 3 |
84dafd1026871a2cbabfa6456ccf9d01812f8652 | Lokathor | 2020-01-08T21:45:34 | (cargo-release) start next development iteration 0.4.4-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 9cd6d17..09e5ba9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.3"
+version = "0.4.4-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
45f03e4458c4ca43c1c82cdcb84baec95ab9c68a | Lokathor | 2020-01-08T21:45:25 | (cargo-release) version 0.4.3 | diff --git a/Cargo.toml b/Cargo.toml
index 5b6ca12..9cd6d17 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.3-alpha.0"
+version = "0.4.3"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
2eacd5b2bd9be237be87a5d3810e6863e0ce6ac6 | Lokathor | 2020-01-08T19:19:36 | marked an unsafe call as being unsafe, CI you failed me | diff --git a/src/lib.rs b/src/lib.rs
index 82e4e3e..59c2dd1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -135,7 +135,7 @@ pub fn sqrt_f32(x: f32) -> f32 {
if #[cfg(target_feature = "sse")] {
m128::set0(x).sqrt0().extract0()
} else if #[cfg(feature = "toolchain_nightly")] {
- core::intrinsics::sqrtf... | 1 | 1 | 1 |
27b70adfab377ab5e92b52ac99486c9d37f8a955 | Lokathor | 2020-01-02T00:39:37 | (cargo-release) start next development iteration 0.4.3-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 7f4ecf3..5b6ca12 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.2"
+version = "0.4.3-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
0e751fe74fa7892987cfb8c763b91a33414080f3 | Lokathor | 2020-01-02T00:39:29 | (cargo-release) version 0.4.2 | diff --git a/Cargo.toml b/Cargo.toml
index dc9a2ea..7f4ecf3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.2-alpha.0"
+version = "0.4.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
0f28e04773187999d57f2a21e73b40233e60b4f0 | Lokathor | 2020-01-02T00:39:11 | fix trunc/fract stuff | diff --git a/examples/demo.rs b/examples/demo.rs
index 04ee1c3..0c8ec87 100644
--- a/examples/demo.rs
+++ b/examples/demo.rs
@@ -7,6 +7,9 @@ fn main() {
println!("rad {:.2}: s/c {:?}", f, f32x4::from(f).sin_cos());
f += 0.1;
}
+ println!("-0.53_f32x4: {}", wide::f32x4::from(-0.53f32).fract()[0]);
+ print... | 3 | 27 | 15 |
4d2ce26a67e2453467795ebdf7a0e32347beb9ce | Lokathor | 2020-01-02T00:14:26 | more test for fract, it's suspicious | diff --git a/tests/f32x4.rs b/tests/f32x4.rs
index 6598cbc..c1df0f2 100644
--- a/tests/f32x4.rs
+++ b/tests/f32x4.rs
@@ -87,10 +87,16 @@ fn f32x4_signum() {
}
#[test]
-fn f32x4_fraction() {
+fn f32x4_fract() {
let a = f32x4::new(3.5, 5.0, 0.1, -1.5).fract();
assert_eq!(a[0], 0.5_f32.fract());
assert_eq!(a[... | 1 | 7 | 1 |
7557ea67e549e4cc26fd7fa8fdaf0342fc77a78c | Lokathor | 2019-12-11T04:59:20 | (cargo-release) start next development iteration 0.4.2-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index f74a487..dc9a2ea 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.1"
+version = "0.4.2-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
149f83bb438e566e79ef8b1811283a7f3343bade | Lokathor | 2019-12-11T04:59:14 | (cargo-release) version 0.4.1 | diff --git a/Cargo.toml b/Cargo.toml
index 5eb5725..f74a487 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.1-alpha.0"
+version = "0.4.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
a0237dc68637633b53fc0ee101d3f1e9d48d056e | Lokathor | 2019-12-11T04:58:42 | Update lib.rs | diff --git a/src/lib.rs b/src/lib.rs
index 6e19c27..82e4e3e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -167,3 +167,16 @@ pub fn cos_f32(x: f32) -> f32 {
}
}
}
+
+/// A `tan` for just one `f32`.
+#[inline(always)]
+#[must_use]
+pub fn tan_f32(x: f32) -> f32 {
+ magic! {
+ if #[cfg(target_feature = "sse")] ... | 1 | 13 | 0 |
86ef4feb934db1cdb0caee97f6e18cbc3a0a730e | Lokathor | 2019-12-08T01:13:04 | Update lib.rs | diff --git a/src/lib.rs b/src/lib.rs
index 265b751..6e19c27 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -7,6 +7,7 @@
#![allow(clippy::expl_impl_clone_on_copy)]
#![allow(clippy::doc_markdown)]
#![allow(clippy::use_self)]
+#![warn(clippy::must_use_candidate)]
//! A crate to help you go wide.
//! | 1 | 1 | 0 |
7d6555e5796d4ae928e41604a1c9d6acc5140925 | Lokathor | 2019-12-07T05:22:09 | (cargo-release) start next development iteration 0.4.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index e55a9b5..5eb5725 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.0"
+version = "0.4.1-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
31b5ded3658026250ac93e1d52b6da9cbfaa999e | Lokathor | 2019-12-07T05:22:03 | (cargo-release) version 0.4.0 | diff --git a/Cargo.toml b/Cargo.toml
index e146d14..e55a9b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.4.0-alpha.0"
+version = "0.4.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
6eb4ced55822295280ea46b05a4cc2c39e657893 | Lokathor | 2019-12-07T04:54:32 | inline and docs and cleanup | diff --git a/src/arch/rdrand.rs b/src/arch/rdrand.rs
index 2d71ae1..6b99849 100644
--- a/src/arch/rdrand.rs
+++ b/src/arch/rdrand.rs
@@ -13,6 +13,7 @@ use super::*;
///
/// See
/// [`_rdrand16_step`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rdrand16_step)
+#[inline]
pub fn rdrand16_step()... | 7 | 115 | 33 |
fa6cd9a19858fe8434a1693e1f8f1dfd7f223bbd | Lokathor | 2019-12-07T04:11:37 | update the bonus lone-f32 functions. | diff --git a/src/lib.rs b/src/lib.rs
index 698c92e..83751df 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -119,7 +119,9 @@ pub use m_f32x4::*;
mod m_i32x4;
pub use m_i32x4::*;
-/// A `sqrt` for `f32` that will do its best to be `no_std`.
+/// A `sqrt` for just one `f32`.
+///
+/// Tries its best to be `no_std`
pub ... | 3 | 29 | 7 |
6648a1aeacde8a320052f28496f63e0355346eba | Lokathor | 2019-12-07T03:50:39 | add a stand alone sqrt function | diff --git a/src/lib.rs b/src/lib.rs
index 9c9f6df..698c92e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -118,3 +118,16 @@ pub use m_f32x4::*;
mod m_i32x4;
pub use m_i32x4::*;
+
+/// A `sqrt` for `f32` that will do its best to be `no_std`.
+pub fn sqrt_f32(x: f32) -> f32 {
+ magic! {
+ if #[cfg(target_feature = ... | 1 | 13 | 0 |
e8edb2a8c73788a4a19e82b90be18ac68cfac6cf | Lokathor | 2019-12-07T03:49:55 | Guess we need std on x86_64-apple-ios? | diff --git a/build.rs b/build.rs
index b64cdf3..5d3421d 100644
--- a/build.rs
+++ b/build.rs
@@ -14,8 +14,11 @@ fn main() {
println!(r#"cargo:rustc-cfg=feature="toolchain_nightly""#);
}
}
+
let target = std::env::var("TARGET").unwrap();
- if !(target.contains("x86") || target.contains("x86_64")) {
... | 1 | 4 | 1 |
12dc23aa4bb117c0e2fa58d32f9f146c620113ab | Lokathor | 2019-12-07T03:22:07 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index b79bf66..76788a2 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -388,13 +388,13 @@ impl f32x4 {
magic! { if #[cfg(target_feature = "sse4.1")] {
Self { sse: self.sse.truncate() }
} else if #[cfg(target_feature = "sse2")] {
- let mut temp = sel... | 1 | 3 | 3 |
0f76e53ccc892d2aa2a53feaf3ab5057f981096f | Lokathor | 2019-12-07T03:12:22 | fix CI errors | diff --git a/src/arch/sse4_1.rs b/src/arch/sse4_1.rs
index 331e78a..696c807 100644
--- a/src/arch/sse4_1.rs
+++ b/src/arch/sse4_1.rs
@@ -53,6 +53,12 @@ impl m128 {
_mm_round_ps(self.0, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
})
}
+
+ pub fn truncate(self) -> Self {
+ Self(unsafe {
+ _mm_r... | 3 | 28 | 5 |
60a17c4bfa0aabed26808aa2277a4768bcf0ae45 | Lokathor | 2019-12-07T02:40:00 | Update build.rs | diff --git a/build.rs b/build.rs
index 9a6851f..b64cdf3 100644
--- a/build.rs
+++ b/build.rs
@@ -14,7 +14,7 @@ fn main() {
println!(r#"cargo:rustc-cfg=feature="toolchain_nightly""#);
}
}
- let target = env!("TARGET");
+ let target = std::env::var("TARGET").unwrap();
if !(target.contains("x86") || ta... | 1 | 1 | 1 |
d04f32b44d73cdc27cee23b42b9559c5014601e1 | Lokathor | 2019-11-27T19:40:29 | (cargo-release) start next development iteration 0.3.3-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 86899c3..be1d87f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.2"
+version = "0.3.3-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
b4620d30223b7abb7f68cc2b5f805c6b3ee84aac | Lokathor | 2019-11-27T19:40:20 | (cargo-release) version 0.3.2 | diff --git a/Cargo.toml b/Cargo.toml
index 6bb79cd..86899c3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.2-alpha.0"
+version = "0.3.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
c4a97657372c97e3e81475b34eaa5099de90569e | Lokathor | 2019-11-27T17:42:57 | gotta follow rustfmt rules 100% of the time. | diff --git a/src/lib.rs b/src/lib.rs
index b59ff4c..e50fdb1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -88,7 +88,7 @@ macro_rules! magic {
) => {
#[cfg(all( $($m,)* not(any($($not),*)) ))]
magic!{ @__identity $($tokens)* }
-
+
magic!{
@__forests [ $($not,)* $($m,)* ] ;
$($rest)* | 1 | 1 | 1 |
d7bbd2eb40b9bb93c40ed8b2e356cbdefc83c407 | Lokathor | 2019-11-27T17:41:25 | update dependencies. | diff --git a/Cargo.toml b/Cargo.toml
index 0e056d2..6bb79cd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,8 +23,7 @@ default = []
always_use_stable = []
[dependencies]
-cfg-if = "^0.1.10"
-bytemuck = "0.1"
+bytemuck = "1"
# TODO: serde support
diff --git a/src/lib.rs b/src/lib.rs
index 7e96f25..b59ff4c 10064... | 6 | 124 | 69 |
f6d5933b8e2727c093fc8651125eb2a40b98032f | Lokathor | 2019-11-19T08:38:51 | formatting | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index af150d6..e4ee37f 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -1,7 +1,7 @@
use super::*;
-mod wide_trait_impls;
mod wide_methods;
+mod wide_trait_impls;
cfg_if! {
if #[cfg(target_feature="sse")] {
@@ -215,13 +215,22 @@ impl f32x4 {
/// All bits ac... | 4 | 13 | 8 |
98b4c161d84b957cf1861434c6f37ed909d5a1ba | Lokathor | 2019-11-19T05:24:19 | formatting | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 3157ad7..f90dada 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -1221,7 +1221,6 @@ impl f32x4 {
// WIDE
impl f32x4 {
-
#[inline]
pub fn copysign(self, b: Self) -> Self {
self ^ (b & Self::NEGATIVE_ZERO)
@@ -1350,7 +1349,6 @@ impl f32x4 {
// NOT W... | 2 | 1 | 4 |
50639c26f0eb86984dc0065ed85031349f3356d2 | Lokathor | 2019-11-19T05:21:46 | f32x4::fract | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index d5fdf7f..3157ad7 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -1341,6 +1341,11 @@ impl f32x4 {
);
self * DEG_TO_RAD_RATIO
}
+
+ #[inline]
+ pub fn fract(self) -> Self {
+ self - self.trunc()
+ }
}
// NOT WIDE
@@ -1357,12 +1362,6 @@ impl f3... | 3 | 44 | 6 |
f24432468c10578ecef066163fb000d789525177 | Lokathor | 2019-11-19T05:04:14 | sort wide from narrow, widen some ops | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 0cd1ab5..d5fdf7f 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -239,6 +239,11 @@ impl f32x4 {
pub ONE, 1.0
);
+ const_f32_as_f32x4!(
+ /// 1.0
+ pub NEGATIVE_ONE, -1.0
+ );
+
const_f32_as_f32x4!(
/// 2.0 * π, the number of radians in a c... | 2 | 146 | 123 |
1aa22ecef778b5ce694606f67646b058115ea157 | Lokathor | 2019-11-14T18:30:05 | (cargo-release) start next development iteration 0.3.2-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index a369b72..e679ba7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.1"
+version = "0.3.2-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
06a50162fc3bff92005069488a04ea0ba5a61e5d | Lokathor | 2019-11-14T18:29:59 | (cargo-release) version 0.3.1 | diff --git a/Cargo.toml b/Cargo.toml
index 5e60de7..a369b72 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.1-alpha.0"
+version = "0.3.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
9eb758d9a912fec753766d7eb5508c26b2125879 | Lokathor | 2019-11-14T18:25:34 | Update lib.rs | diff --git a/src/lib.rs b/src/lib.rs
index 1b2fe50..7e96f25 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -46,14 +46,6 @@ pub(crate) use bytemuck::{cast, cast_mut, cast_ref, Pod, Zeroable};
pub(crate) use cfg_if::cfg_if;
pub(crate) use core::{convert::*, fmt::*, ops::*};
-/// debug_assertions only: `file!():line!() e... | 1 | 0 | 8 |
5fbf5f94f209b4e7f585d9767abacb4d0bec6015 | Lokathor | 2019-11-14T15:59:27 | (cargo-release) start next development iteration 0.3.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 1f8601e..5e60de7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.0"
+version = "0.3.1-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
6c78b91ab33e185400aae05ba22d4f9380b1d91b | Lokathor | 2019-11-14T15:59:20 | (cargo-release) version 0.3.0 | diff --git a/Cargo.toml b/Cargo.toml
index edd6079..1f8601e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.3.0-alpha"
+version = "0.3.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor/w... | 1 | 1 | 1 |
d929aac54be371755be13c3764fe679a36ac5852 | Lokathor | 2019-11-14T05:52:19 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 95c5b0e..0cd1ab5 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -269,18 +269,18 @@ impl f32x4 {
// yes it's weird, yes it's correct.
Self { sse: self.sse.cmp_nan(self.sse) }
} else {
- let op = |a:f32, b:f32| {
- if a.is_nan() | b.is... | 1 | 12 | 12 |
e1c5e5be8c2a71de27e877d386e6685799b980a9 | Lokathor | 2019-11-14T04:51:42 | is_ordinary | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 78e8958..95c5b0e 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -285,6 +285,27 @@ impl f32x4 {
}}
}
+ pub fn is_ordinary(self) -> Self {
+ cfg_if! {if #[cfg(target_feature="sse")] {
+ // yes it's weird, yes it's correct.
+ Self { sse: self.... | 1 | 21 | 0 |
5b29eae2df001908d3cd261ea85a61224208de4c | Lokathor | 2019-11-14T03:38:52 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index b44c9f3..63a8e57 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -275,7 +275,7 @@ impl f32x4 {
/// all 1s or all 0s anyway.
#[inline]
pub fn merge(self, a: Self, b: Self) -> Self {
- cfg_if! {if #[cfg(target_feature="sse")] {
+ cfg_if! {if #[cfg(targ... | 1 | 1 | 1 |
6e65715255db2c2edffe33064b36520bd9cdeb74 | Lokathor | 2019-11-14T02:40:13 | more ci fixes | diff --git a/src/m_i32x4.rs b/src/m_i32x4.rs
index b1ee388..c735019 100644
--- a/src/m_i32x4.rs
+++ b/src/m_i32x4.rs
@@ -279,10 +279,10 @@ impl Add for i32x4 {
Self { sse: self.sse.add_i32(rhs.sse) }
} else {
Self { arr: [
- self.arr[0].add(rhs[0]),
- self.arr[1].add(rhs[1]),
- s... | 1 | 4 | 4 |
1f622a4425f3f9012e0048111756534b879d60dd | Lokathor | 2019-11-14T02:39:19 | CI fixes | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 33b0ba4..276c240 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -1137,7 +1137,7 @@ impl f32x4 {
.cmp_eq_i32(m128i::splat_i32(EXPONENT_MASKi));
Self { sse: t3.cast_m128() }
} else {
- let op |f: f32| {
+ let op = |f: f32| {
l... | 1 | 12 | 1 |
b8cb7855ba6cdc2d11387e22c79ed179345195f2 | Lokathor | 2019-11-14T02:28:02 | sin_cos seems to work, allowing with sin, cos, and tan | diff --git a/Cargo.toml b/Cargo.toml
index 23c51d7..edd6079 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.7-alpha.0"
+version = "0.3.0-alpha"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lo... | 6 | 384 | 109 |
75f8ad7bde44033bc39400359c6b69ccabee328b | Lokathor | 2019-11-13T23:49:23 | start of i32x4 | diff --git a/src/lib.rs b/src/lib.rs
index d485b89..7e96f25 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -50,12 +50,15 @@ pub mod arch;
cfg_if! {
if #[cfg(all(target_arch="x86", target_feature="sse"))] {
- pub(crate) use arch::x86::m128;
+ pub(crate) use arch::x86::{m128, m128i};
} else if #[cfg(all(targe... | 3 | 235 | 15 |
6634865fbfa2dc52f0536e65e631bcaf6c4b9e9c | Lokathor | 2019-11-13T23:31:22 | start of some fma | diff --git a/src/arch/fma.rs b/src/arch/fma.rs
new file mode 100644
index 0000000..4d6a66a
--- /dev/null
+++ b/src/arch/fma.rs
@@ -0,0 +1,17 @@
+#![cfg(target_feature = "fma")]
+
+use super::*;
+
+impl m128 {
+ /// fused `(self * b) + c`
+ #[inline(always)]
+ pub fn fmadd(self, b: Self, c: Self) -> Self {
+ Self(... | 3 | 29 | 0 |
c970b7c65b42533efd676dc07c565c7ebf28ead4 | Lokathor | 2019-11-13T23:31:04 | rounding | diff --git a/src/arch/sse4_1.rs b/src/arch/sse4_1.rs
index 73a3352..27f254d 100644
--- a/src/arch/sse4_1.rs
+++ b/src/arch/sse4_1.rs
@@ -1,8 +1,8 @@
-#![cfg(target_feature="sse")]
-#![cfg(target_feature="sse2")]
-#![cfg(target_feature="sse3")]
-#![cfg(target_feature="ssse3")]
-#![cfg(target_feature="sse4.1")]
+#![cfg(t... | 1 | 9 | 5 |
b979153cd90b53cba20ca3ae586f1fac6bcb2ee5 | Lokathor | 2019-11-13T22:39:36 | fix up all the consts stuff. | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 40c1ffc..eb248cf 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -14,12 +14,206 @@ cfg_if! {
}
}
#[test]
-fn declaration_tests() {
+fn declaration_tests_f32x4() {
use core::mem::{align_of, size_of};
assert_eq!(size_of::<f32x4>(), 16);
assert_eq!(align... | 1 | 195 | 188 |
30c935a9d34b30975d3e5816b21daa9c9297b252 | Lokathor | 2019-11-13T01:55:34 | (cargo-release) start next development iteration 0.2.7-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 4df9575..23c51d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.6"
+version = "0.2.7-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
92c67b518a3bfb5567f7e9f6eccc8e5ee2747dba | Lokathor | 2019-11-13T01:55:27 | (cargo-release) version 0.2.6 | diff --git a/Cargo.toml b/Cargo.toml
index cb36a07..4df9575 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.6-alpha.0"
+version = "0.2.6"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
acbacc9c7a9d4a55b53996fdfd1b6e3bfaf1d3e1 | Gray Olson | 2019-11-13T00:36:11 | use sse min and max, add clamp function | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 0b5c03f..40c1ffc 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -885,6 +885,38 @@ impl f32x4 {
f32x4::from(1.0) / self
}}
}
+
+ #[inline]
+ pub fn max(self, b: Self) -> Self {
+ cfg_if! {if #[cfg(target_feature="sse")] {
+ Self { sse: self... | 1 | 35 | 22 |
6ea970b15650a337c8eab2a2f9aa698737930df8 | Lokathor | 2019-11-12T08:24:32 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index ccc7c99..0b5c03f 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -862,7 +862,7 @@ impl f32x4 {
cfg_if! {if #[cfg(target_feature = "fma")] {
// TODO: put this properly into the `arch` modules.
#[cfg(target_arch="x86")]
- use core::arch::x86::... | 1 | 1 | 1 |
c321491127a84ffd0d2deda539677d57b75bc05b | Lokathor | 2019-11-12T08:22:33 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 4019489..ccc7c99 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -860,14 +860,17 @@ impl f32x4 {
#[inline]
pub fn mul_add(self, b: Self, c: Self) -> Self {
cfg_if! {if #[cfg(target_feature = "fma")] {
+ // TODO: put this properly into the `arch` mod... | 1 | 7 | 4 |
200f49d63e5d7a791138fd74dba3cf96fa85f13e | Lokathor | 2019-11-12T08:06:52 | (cargo-release) start next development iteration 0.2.6-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 3980385..cb36a07 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.5"
+version = "0.2.6-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
44cfa0cfbed1921c0455687e7b17da97cebad848 | Lokathor | 2019-11-12T08:06:45 | (cargo-release) version 0.2.5 | diff --git a/Cargo.toml b/Cargo.toml
index 7e80d53..3980385 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.5-alpha.0"
+version = "0.2.5"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
90dd60004799431921d698bb4e68516afb51fec4 | Lokathor | 2019-11-12T08:06:17 | Add correct fused mul-add support
Closes https://github.com/Lokathor/wide/issues/10 | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index abf1465..4019489 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -849,29 +849,28 @@ impl f32x4 {
}}
}
+ /// Performs a "fused multiply-add", `(self * b) + c`
+ ///
+ /// This is only different from a normal mul and then add if the `fma`
+ /// target_f... | 1 | 19 | 20 |
463d5fa0631354efa576961cafc4572b4a95e863 | Lokathor | 2019-10-30T23:29:03 | (cargo-release) start next development iteration 0.2.5-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 7047d14..7e80d53 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.4"
+version = "0.2.5-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
f7cf29342806a66fa8604acc75b9b461aff6fd48 | Lokathor | 2019-10-30T23:28:54 | (cargo-release) version 0.2.4 | diff --git a/Cargo.toml b/Cargo.toml
index ac1fa18..7047d14 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.4-alpha.0"
+version = "0.2.4"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
1857a41bf063da85ef39254fa14d4c197fbd66ac | Lokathor | 2019-10-30T23:28:26 | better printing | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index a6c547c..abf1465 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -1233,8 +1233,11 @@ impl Debug for f32x4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
write!(f, "f32x4(")?;
Debug::fmt(&self[0], f)?;
+ write!(f, ", ")?;
D... | 1 | 68 | 0 |
28a36fa7b5c5d6b78a296210ff5aaf89bd163c59 | Lokathor | 2019-10-30T19:21:42 | (cargo-release) start next development iteration 0.2.4-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 9432913..ac1fa18 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.3"
+version = "0.2.4-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
ff95d8c0cf09d3ddf14ca1f62b31f20e6440687f | Lokathor | 2019-10-30T19:21:34 | (cargo-release) version 0.2.3 | diff --git a/Cargo.toml b/Cargo.toml
index 7ddecea..9432913 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.3-alpha.0"
+version = "0.2.3"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
2f68d911fa85d9bb437543cbb73bd76e66dbccfe | Lokathor | 2019-10-30T16:39:04 | move mask | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 312d7cc..a6c547c 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -339,6 +339,26 @@ impl BitXor<&'_ f32x4> for f32x4 {
}
impl f32x4 {
+ /// ```rust
+ /// use wide::f32x4;
+ /// let a = f32x4::new(1.0, 2.0, 3.0, 4.0);
+ /// let b = f32x4::from(2.5);
+ /// as... | 1 | 20 | 0 |
c012f0680b945feba90e4b9f298099fcfa37a164 | Lokathor | 2019-10-26T03:09:07 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 7a0ea0b..312d7cc 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -647,6 +647,20 @@ impl f32x4 {
}}
}
+ #[inline]
+ pub fn exp(self) -> Self {
+ cfg_if! {if #[cfg(feature = "toolchain_nightly")] {
+ use core::intrinsics::expf32;
+ let a: [f3... | 1 | 117 | 100 |
188809bc21c00f5994064c0570a13f92d8b8b8f6 | Lokathor | 2019-10-25T14:48:26 | (cargo-release) start next development iteration 0.2.3-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 3368dce..7ddecea 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.2"
+version = "0.2.3-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
ec5070f465f2f390b276297989fa91f72bd6875c | Lokathor | 2019-10-25T14:48:20 | (cargo-release) version 0.2.2 | diff --git a/Cargo.toml b/Cargo.toml
index eb03817..3368dce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.2-alpha.0"
+version = "0.2.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
e9c79f3da2598ae60d74b34350468742a4235646 | Lokathor | 2019-10-25T14:45:12 | (cargo-release) start next development iteration 0.2.2-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 334df9e..2b90ea9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.1"
+version = "0.2.2-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
4d4cef62f2fec32ddddbca68cf5672db3e511450 | Lokathor | 2019-10-25T14:45:08 | (cargo-release) version 0.2.1 | diff --git a/Cargo.toml b/Cargo.toml
index 3da3b49..334df9e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.1-alpha.0"
+version = "0.2.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
c89dee98bc07f25fa29dde9026ffc70919b6eb32 | Lokathor | 2019-10-25T04:46:45 | Update intel-simd-help.rs | diff --git a/tests/intel-simd-help.rs b/tests/intel-simd-help.rs
index 764b5b9..d0251bc 100644
--- a/tests/intel-simd-help.rs
+++ b/tests/intel-simd-help.rs
@@ -18,9 +18,8 @@ pub use core::mem::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use wide::shuffle128;
-pub use wide::*;
-pub use wide::arc... | 1 | 1 | 2 |
a2b15b99aa3b0b2a2b5e8e981f858f7603a1fb83 | Lokathor | 2019-10-25T02:42:00 | Update arch.rs | diff --git a/src/arch.rs b/src/arch.rs
index 331f40d..f504b5c 100644
--- a/src/arch.rs
+++ b/src/arch.rs
@@ -12,7 +12,7 @@ use super::*;
/// This is for alignment shenanigans, you're not expected to use it in a
/// struct, more just in function arguments and such.
#[derive(Debug, Clone, Copy)]
-#[repr(align(2))]
+#[... | 1 | 5 | 5 |
cb150e8d3c10490a2c596c7c2cd267b30b028f01 | Lokathor | 2019-10-22T03:17:59 | (cargo-release) start next development iteration 0.2.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 3cdeb10..3da3b49 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.2.0"
+version = "0.2.1-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
a9f4f10a1c2a54108efc7b77b0e5825c663b023f | Lokathor | 2019-10-22T03:17:54 | (cargo-release) version 0.2.0 | diff --git a/Cargo.toml b/Cargo.toml
index 5638c59..3cdeb10 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.3-alpha.0"
+version = "0.2.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
61bdc0310aa2fc65f9ce364a18b7e88440abdf77 | Lokathor | 2019-10-22T01:44:17 | add types | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index f0ca538..463a584 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -444,7 +444,7 @@ impl f32x4 {
cfg_if! {if #[cfg(target_feature="sse")] {
Self { sse: self.sse.cmp_nan(rhs.sse) }
} else {
- let test = |a, b| {
+ let test = |a: f32, b: f32|... | 1 | 2 | 2 |
85973222a5c7ab068b8ce19604f7d3c04288e584 | Lokathor | 2019-10-22T01:38:04 | bitwise f32x4 | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 71a43fe..f0ca538 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -263,6 +263,81 @@ impl Sub<&'_ f32x4> for f32x4 {
}
}
+impl BitAnd for f32x4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: Self) -> Self {
+ cfg_if! {if #[cfg(target_feature="... | 1 | 117 | 0 |
f31498a64ba3d80fd0844af078166f27ba63e955 | Lokathor | 2019-10-22T01:37:53 | notes about The Plan | diff --git a/Cargo.toml b/Cargo.toml
index fc15509..00c9c25 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ always_use_stable = []
[dependencies]
cfg-if = "^0.1.10"
bytemuck = "0.1"
-lokacore = "0.3" # TODO: remove lokacore so that this can become _a part of_ lokacore
+lokacore = "0.3" # TODO: move lokaco... | 1 | 1 | 1 |
3e9816ed80d16cd90f3c047c2fc4a9f1d6a4b5b8 | Lokathor | 2019-10-22T01:22:23 | Update m_f32x4.rs | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 7168378..71a43fe 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -54,7 +54,7 @@ impl f32x4 {
} else {
let op = |maskf, af, bf| {
let ai: i32 = cast(af);
- let bf: i32 = cast(bf);
+ let bi: i32 = cast(bf);
let maski: i32 =... | 1 | 1 | 1 |
89e2905622ef75aea2d53c19c3df82bda3efd723 | Lokathor | 2019-10-22T01:13:14 | typo, thanks CI | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 1a74b16..7168378 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -55,7 +55,7 @@ impl f32x4 {
let op = |maskf, af, bf| {
let ai: i32 = cast(af);
let bf: i32 = cast(bf);
- let maski: i32 = cast(maski);
+ let maski: i32 = cast(ma... | 1 | 1 | 1 |
5a3d32ccdc87fd4e3085d3e4dcacb0d3f1f59206 | Lokathor | 2019-10-22T01:07:46 | branching operations work now | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 14796c6..1a74b16 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -29,6 +29,43 @@ impl f32x4 {
Self { arr: [a,b,c,d] }
}}
}
+
+ /// Use the mask to bitwise merge two values.
+ ///
+ /// It is expected that the mask will be a "boolish" value where e... | 1 | 287 | 6 |
b18b3f06cdbe77c4eebf62fe55fdc6a7bc599450 | Lokathor | 2019-10-21T00:49:54 | (cargo-release) start next development iteration 0.1.3-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index f4e97e6..fc15509 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.2"
+version = "0.1.3-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
18fc2d85295ff516fdb7997d431a843119c717db | Lokathor | 2019-10-21T00:49:48 | (cargo-release) version 0.1.2 | diff --git a/Cargo.toml b/Cargo.toml
index c225426..f4e97e6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.2-alpha.0"
+version = "0.1.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
1d6554ac461bdaf3a1e44be8a538841cf6cc9f8e | Lokathor | 2019-10-21T00:49:37 | mul_add indexing bug | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 081b68b..14796c6 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -536,9 +536,9 @@ impl f32x4 {
let c: [f32; 4] = cast(c);
cast([
a[0].mul_add(b[0], c[0]),
- a[1].mul_add(b[1], c[0]),
- a[2].mul_add(b[2], c[0]),
- a[3].mul_add(b[3], c... | 1 | 3 | 3 |
273ceb9fa30356845ce59bd3a5b82c94b5780d4b | Lokathor | 2019-10-20T02:07:04 | (cargo-release) start next development iteration 0.1.2-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 67b335e..c225426 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.1"
+version = "0.1.2-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
1a43ed37f580e36cd1e2eba4be47202e52c08e4e | Lokathor | 2019-10-20T02:06:56 | (cargo-release) version 0.1.1 | diff --git a/Cargo.toml b/Cargo.toml
index 957f5b5..67b335e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.1-alpha.0"
+version = "0.1.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
e74b3f9d559da03f8457ae32ccf374a97af8095e | Lokathor | 2019-10-20T02:02:22 | impl From<f32> for f32x4 | diff --git a/src/m_f32x4.rs b/src/m_f32x4.rs
index 24b51c4..081b68b 100644
--- a/src/m_f32x4.rs
+++ b/src/m_f32x4.rs
@@ -31,6 +31,17 @@ impl f32x4 {
}
}
+impl From<f32> for f32x4 {
+ #[inline]
+ fn from(val: f32) -> Self {
+ cfg_if! {if #[cfg(target_feature="sse")] {
+ Self { sse: m128::splat(val) }
+ ... | 1 | 11 | 0 |
ad1f07d9590f9e094f97724bfc021e947adad82a | Lokathor | 2019-09-25T06:51:59 | (cargo-release) start next development iteration 0.1.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index 51c3728..957f5b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wide"
description = "A crate to help you go wide."
-version = "0.1.0"
+version = "0.1.1-alpha.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.