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
28abb7f2c1358851b08f5b91e0f983dd7be02286
Lokathor
2019-11-05T02:13:16
(cargo-release) version 0.1.1
diff --git a/Cargo.toml b/Cargo.toml index 29e90cc..47e709c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bytemuck" description = "A crate for mucking around with piles of bytes." -version = "0.1.1-alpha.0" +version = "0.1.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
79143a6295724ef5eee838a6d64b056fd12b6505
Lokathor
2019-11-04T06:55:51
cargo fmt is a strict one
diff --git a/src/allocation.rs b/src/allocation.rs index 856fd40..864a12b 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -44,9 +44,9 @@ pub fn try_cast_box<A: Pod, B: Pod>(input: Box<A>) -> Result<Box<B>, (PodCastErr /// turns it into a Box. In other words, it's 100% assured that the zeroed data /// won't ...
2
3
2
af3f4404df461f3c5cda2682474b4f866e089eef
Lokathor
2019-11-04T06:45:38
document the failure case Closes https://github.com/Lokathor/bytemuck/issues/3
diff --git a/src/allocation.rs b/src/allocation.rs index 29f8946..856fd40 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -44,9 +44,10 @@ pub fn try_cast_box<A: Pod, B: Pod>(input: Box<A>) -> Result<Box<B>, (PodCastErr /// turns it into a Box. In other words, it's 100% assured that the zeroed data /// won't...
1
4
3
0e3948b8b85c5b922eaee94b228a2ff0043a1eb8
Lokathor
2019-11-01T16:39:32
Update cast_slice_tests.rs
diff --git a/tests/cast_slice_tests.rs b/tests/cast_slice_tests.rs index db4e356..2c3d123 100644 --- a/tests/cast_slice_tests.rs +++ b/tests/cast_slice_tests.rs @@ -1,6 +1,6 @@ use core::mem::size_of; -use lokacore::*; +use bytemuck::*; #[test] fn test_try_cast_slice() {
1
1
1
b199fad4110b824e3cd8f275786fa4fad071a1fb
Lokathor
2019-10-26T10:22:15
Create cast_slice_tests.rs
diff --git a/tests/cast_slice_tests.rs b/tests/cast_slice_tests.rs new file mode 100644 index 0000000..db4e356 --- /dev/null +++ b/tests/cast_slice_tests.rs @@ -0,0 +1,89 @@ +use core::mem::size_of; + +use lokacore::*; + +#[test] +fn test_try_cast_slice() { + // some align4 data + let u32_slice: &[u32] = &[4, 5, 6]; ...
1
89
0
24ad0df2090f6f146744f17a55f8d7d7eda25cc7
Lokathor
2019-10-06T01:26:47
Update zeroable.rs
diff --git a/src/zeroable.rs b/src/zeroable.rs index 2252f8e..2a12c5b 100644 --- a/src/zeroable.rs +++ b/src/zeroable.rs @@ -56,6 +56,7 @@ unsafe impl<T> Zeroable for *const T {} unsafe impl<T> Zeroable for Option<NonNull<T>> {} unsafe impl<T: Zeroable> Zeroable for PhantomData<T> {} unsafe impl<T: Zeroable> Zeroabl...
1
1
0
f3bffd9da2bb2c66f0e7777ddc905b63be1d7a43
Lokathor
2019-09-22T19:07:59
(cargo-release) start next development iteration 0.1.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 9ca7523..696b75a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bytemuck" description = "A crate for mucking around with piles of bytes." -version = "0.1.0" +version = "0.1.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
4
4
55a4eef7b699f270ad0387b03660368906a8d959
Lokathor
2019-09-21T23:39:37
improve the ZST case
diff --git a/src/allocation.rs b/src/allocation.rs index 630a480..29f8946 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -40,13 +40,17 @@ pub fn try_cast_box<A: Pod, B: Pod>(input: Box<A>) -> Result<Box<B>, (PodCastErr /// Allocates a `Box<T>` with all of the contents being zeroed out. /// -/// This is n...
1
8
4
72d3ae2419c3694fc9ce28f3b31d6b9af8427878
Lokathor
2019-09-21T23:33:36
clarify when allocation related operations are available.
diff --git a/Cargo.toml b/Cargo.toml index 00d765d..9ca7523 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,6 @@ extern_crate_alloc = [] [badges] appveyor = { repository = "Lokathor/bytemuck" } travis-ci = { repository = "Lokathor/bytemuck" } + +[package.metadata.docs.rs] +all-features = true diff --git a/src/...
3
7
1
dad138dba321061a5f6dc8e6fd7306095ffedd92
Lokathor
2019-09-20T19:05:09
guard against zero sized types with an error We could update this to just not allocate in the future but I don't believe that the docs give us assurances in that area.
diff --git a/src/allocation.rs b/src/allocation.rs index 62c9ef9..1b1f38f 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -42,6 +42,9 @@ pub fn try_cast_box<A: Pod, B: Pod>(input: Box<A>) -> Result<Box<B>, (PodCastErr /// large boxes without fear of a stack overflow. #[inline] pub fn try_zeroed_box<T: Zero...
1
3
0
6fea4bfa5899580582d5c3b5737f4ddcafd661fb
Lokathor
2019-09-20T17:40:44
make the deref explicit
diff --git a/src/allocation.rs b/src/allocation.rs index 6e4acb1..62c9ef9 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -99,7 +99,7 @@ pub fn try_cast_vec<A: Pod, B: Pod>(input: Vec<A>) -> Result<Vec<B>, (PodCastErr // Note(Lokathor): Finally, we carefully get the pointer we need, cast the // type...
1
1
1
40cb0d19c34f71a78327a7e0908f2f1da09f1048
Lokathor
2019-09-20T17:12:40
comments
diff --git a/src/pod.rs b/src/pod.rs index 903c901..41859e4 100644 --- a/src/pod.rs +++ b/src/pod.rs @@ -18,8 +18,8 @@ use super::*; /// [Infallible](core::convert::Infallible)). /// * The type must allow any bit pattern (eg: no `bool` or `char`). /// * The type must not contain any padding bytes (eg: no `(u8, u16...
1
2
2
d4fde533861667477eb8d46ea795303ca83496dc
Lokathor
2019-09-20T17:10:01
Update src/zeroable.rs Co-Authored-By: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
diff --git a/src/zeroable.rs b/src/zeroable.rs index a5b24b1..2252f8e 100644 --- a/src/zeroable.rs +++ b/src/zeroable.rs @@ -14,6 +14,7 @@ pub unsafe trait Zeroable: Sized { /// This is a trait method so that you can write `MyType::zeroed()` in your /// code. It is a contract of this trait that if you implement i...
1
1
0
ca902ff52db398586407f7381dec454f385f88f3
Lokathor
2019-09-20T17:09:33
mention repr(packed)
diff --git a/src/pod.rs b/src/pod.rs index b6ed590..903c901 100644 --- a/src/pod.rs +++ b/src/pod.rs @@ -18,8 +18,8 @@ use super::*; /// [Infallible](core::convert::Infallible)). /// * The type must allow any bit pattern (eg: no `bool` or `char`). /// * The type must not contain any padding bytes (eg: no `(u8, u16...
1
2
2
28603a319808da4f77203eca1038723645aafcdd
Lokathor
2019-09-20T17:08:40
gotta mask that unsafe
diff --git a/src/allocation.rs b/src/allocation.rs index 71adb26..6e4acb1 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -48,7 +48,7 @@ pub fn try_zeroed_box<T: Zeroable>() -> Result<Box<T>, ()> { // we don't know what the error is because `alloc_zeroed` is a dumb API Err(()) } else { - Ok(Bo...
1
1
1
cc0a6aa75104341bd4440b0f08ea69d25cb8f1b2
Lokathor
2019-09-20T17:06:50
use a result
diff --git a/src/allocation.rs b/src/allocation.rs index 644241a..71adb26 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -48,7 +48,7 @@ pub fn try_zeroed_box<T: Zeroable>() -> Result<Box<T>, ()> { // we don't know what the error is because `alloc_zeroed` is a dumb API Err(()) } else { - Box::...
1
1
1
973ec91f796a8fb3db51873ab16eda0e1b10cd85
Lokathor
2019-09-20T17:05:33
typo, remove old imports
diff --git a/src/allocation.rs b/src/allocation.rs index 35fa66c..644241a 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -4,8 +4,6 @@ use super::*; use alloc::{ alloc::{alloc_zeroed, Layout}, boxed::Box, - rc::Rc, - sync::Arc, vec::Vec, }; @@ -50,7 +48,7 @@ pub fn try_zeroed_box<T: Zeroable>()...
1
1
3
8cdf598be4e2a612be7f31f7944113b6c4a96c27
Lokathor
2019-09-20T15:10:03
formatting
diff --git a/src/allocation.rs b/src/allocation.rs index 344caa4..35fa66c 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -1,9 +1,13 @@ //! Stuff to boost things in the `alloc` crate. use super::*; -use alloc::{boxed::Box, rc::Rc, sync::Arc, vec::Vec}; -use alloc::alloc::Layout; -use alloc::alloc::alloc_z...
1
9
5
876da036e423b1ff0ca9162108734eb549f2ac1d
Lokathor
2019-09-20T15:01:23
zeroed out boxes
diff --git a/src/allocation.rs b/src/allocation.rs index fd9cf30..344caa4 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -2,6 +2,8 @@ use super::*; use alloc::{boxed::Box, rc::Rc, sync::Arc, vec::Vec}; +use alloc::alloc::Layout; +use alloc::alloc::alloc_zeroed; /// As [`try_cast_box`](try_cast_box), b...
1
25
0
427893ab9b1acd6bd2774da41ebd1945b7f3d6bc
Lokathor
2019-09-20T14:20:18
same fix for as_mut
diff --git a/src/lib.rs b/src/lib.rs index 9b1736b..080848b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -174,11 +174,7 @@ pub fn try_cast_mut<A: Pod, B: Pod>(a: &mut A) -> Result<&mut B, PodCastError> { if align_of::<B>() > align_of::<A>() && (a as *mut A as usize) % align_of::<B>() != 0 { Err(PodCastError::Tar...
1
1
5
c7e124e641c41beaf2d81bbed9af90e4ac60bdd6
Lokathor
2019-09-20T06:52:55
Remove Arc and Rc support, they've got repr(rust) internals.
diff --git a/src/allocation.rs b/src/allocation.rs index 8d39265..fd9cf30 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -3,34 +3,6 @@ use super::*; use alloc::{boxed::Box, rc::Rc, sync::Arc, vec::Vec}; -/// As [`try_cast_arc`](try_cast_arc), but unwraps for you. -#[inline] -pub fn cast_arc<A: Pod, B: Po...
1
0
56
2b8ef93deee1006fdface82c1fbd399cd729997d
Lokathor
2019-09-20T06:32:35
simplify reborrow
diff --git a/src/lib.rs b/src/lib.rs index c1c286c..9b1736b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -158,11 +158,7 @@ pub fn try_cast_ref<A: Pod, B: Pod>(a: &A) -> Result<&B, PodCastError> { if align_of::<B>() > align_of::<A>() && (a as *const A as usize) % align_of::<B>() != 0 { Err(PodCastError::TargetAli...
1
1
5
22e1b7a6f6009f977f89388906bddbb37ae7424a
Lokathor
2019-09-20T05:11:06
ralith says to slim down the error
diff --git a/src/lib.rs b/src/lib.rs index 5066370..c1c286c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,17 +50,13 @@ pub enum PodCastError { /// You tried to cast a slice to an element type with a higher alignment /// requirement but the slice wasn't aligned. TargetAlignmentGreaterAndInputNotAligned, - //...
1
5
9
372ad15af90c3b214709a523e078b2067338d385
Lokathor
2019-09-20T04:53:35
commentary fix
diff --git a/src/allocation.rs b/src/allocation.rs index c7e3727..8d39265 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -122,7 +122,8 @@ pub fn try_cast_vec<A: Pod, B: Pod>(input: Vec<A>) -> Result<Vec<B>, (PodCastErr let capacity: usize = input.capacity(); // Note(Lokathor): Next we "pre-forget" ...
1
2
1
7584fb2d1912f511ba12b101feead539f330b333
Lokathor
2019-09-20T04:19:38
Update lib.rs
diff --git a/src/lib.rs b/src/lib.rs index f535c35..5066370 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -62,6 +62,9 @@ pub enum PodCastError { /// When casting an individual `T`, `&T`, or `&mut T` value the source size /// and destination size must be an exact match. SizeMismatch, + /// For this type of cast ...
1
3
0
a1b7c21a651d2b9185010b97bff4d090a5a3ba77
Lokathor
2019-09-20T04:15:17
Update allocation.rs
diff --git a/src/allocation.rs b/src/allocation.rs index 6e9ab19..c7e3727 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -127,7 +127,7 @@ pub fn try_cast_vec<A: Pod, B: Pod>(input: Vec<A>) -> Result<Vec<B>, (PodCastErr // Note(Lokathor): Finally, we carefully get the pointer we need, cast the // ty...
1
1
1
0bae2db1b8209de45260375cf50e7eb4e757fd92
Lokathor
2019-09-20T04:11:25
no_std + alloc
diff --git a/src/allocation.rs b/src/allocation.rs new file mode 100644 index 0000000..6e9ab19 --- /dev/null +++ b/src/allocation.rs @@ -0,0 +1,134 @@ +//! Stuff to boost things in the `alloc` crate. + +use super::*; +use alloc::{boxed::Box, rc::Rc, sync::Arc, vec::Vec}; + +/// As [`try_cast_arc`](try_cast_arc), but un...
2
143
0
70da6d7a772b54d151bef11494a64cbf96cae1d6
Lokathor
2019-09-20T01:23:24
zeroable
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..7d0ae09 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,21 @@ +#[cfg(target_arch = "x86")] +pub(crate) use core::arch::x86; +#[cfg(target_arch = "x86_64")] +pub(crate) use core::arch::x86_64; +// +pub(crate) use core::{marker::*, num::*, ptr::*}; + +mac...
2
172
0
02296d1f461ef2baab95ee24ef011ec773cdc30b
Kristof Roomp
2025-12-01T19:05:43
update bytemuck version to match wide to avoid unnecessary extra build (#125)
diff --git a/Cargo.toml b/Cargo.toml index e4acf8a..9245763 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ exclude = [ [dependencies] # If enabled, gives bytemuck trait impls for our types -bytemuck = {version = "1.2", optional = true} +bytemuck = {version = "1.24.0", optional = true} [features] def...
1
1
1
69c1aa03040c11660553554c5177bf50be1e44db
lokathor
2025-12-01T00:34:55
chore: Release safe_arch version 1.0.0
diff --git a/Cargo.toml b/Cargo.toml index 371179a..e4acf8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.9.3" +version = "1.0.0" rust-version = "1....
1
1
1
4d658dcbbffdc2e59d5afad18824f830e65f31d2
lokathor
2025-12-01T00:26:01
it's necessary on stable, not sure why Nightly doesn't think it's necessary.
diff --git a/src/lib.rs b/src/lib.rs index 83b5e1c..7f2f4da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -306,7 +306,8 @@ submodule!(pub x86_x64 { /// * **Intrinsic:** `_bswap` /// * **Assembly:** `bswap r32` pub fn byte_swap_i32(i: i32) -> i32 { - _bswap(i) + #[allow(unused_unsafe)] + unsafe { _bswap(...
1
4
2
0c39478d1063dc460f980f597d6370b280780d31
lokathor
2025-12-01T00:20:18
remove unnecessary unsafe
diff --git a/src/lib.rs b/src/lib.rs index 0224ed9..83b5e1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -306,7 +306,7 @@ submodule!(pub x86_x64 { /// * **Intrinsic:** `_bswap` /// * **Assembly:** `bswap r32` pub fn byte_swap_i32(i: i32) -> i32 { - unsafe { _bswap(i) } + _bswap(i) } /// Swap the b...
1
2
2
3147af29b9201dd6f52acec95a53194845256b99
lokathor
2025-12-01T00:20:07
Closes https://github.com/Lokathor/safe_arch/issues/104
diff --git a/src/x86_x64/avx2.rs b/src/x86_x64/avx2.rs index 4fafad1..a1b7de7 100644 --- a/src/x86_x64/avx2.rs +++ b/src/x86_x64/avx2.rs @@ -2112,7 +2112,7 @@ pub fn shuffle_av_i32_all_m256i(a: m256i, v: m256i) -> m256i { /// # use safe_arch::*; /// let a = m256::from_array([8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15...
1
2
2
9557cbb3c4182eebd877921eebf35b1607d8f87e
Kristof Roomp
2025-11-30T01:02:11
add mul_i16_horizontal_add_m512i and upgrade to rust version 2024 (#124) * add horizontal dot and add ops * fix test * fix test * remove useless must_use for trait implementations * fixed last must_use * fixed missing inline * add cargo
diff --git a/Cargo.toml b/Cargo.toml index 05a188c..371179a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/Lokathor/safe_arch" version = "0.9.3" rust-version = "1.89" authors = ["Lokathor <zefria@gmail.com>"] -edition = "2018" +edition = "2024" license = "Zlib OR Apache-2....
3
21
18
ae3ae96a45e1f947b7dde8aeec67ebd8f86e30d2
Lokathor
2025-11-16T01:54:19
chore: Release safe_arch version 0.9.3
diff --git a/Cargo.toml b/Cargo.toml index b82158e..05a188c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.9.2" +version = "0.9.3" rust-version = "1....
1
1
1
794be266887f4ea73901a6dfa611d66888f31957
Trương Hoàng Long
2025-11-16T01:51:59
Fix compile error for `i686-pc-windows-msvc` target (#123) * Fix compile error for i686-pc-windows-msvc target * Add missing core::arch::x86 import * Fix avx512 doctests for i686 * Add missing imports for avx512 doctests
diff --git a/src/x86_x64/avx512.rs b/src/x86_x64/avx512.rs index 2c86ac2..d8ac55f 100644 --- a/src/x86_x64/avx512.rs +++ b/src/x86_x64/avx512.rs @@ -1,6 +1,10 @@ #![cfg(target_feature = "avx512f")] #![allow(non_camel_case_types)] use super::*; + +#[cfg(target_arch = "x86")] +use ::core::arch::x86::*; +#[cfg(target_a...
1
155
63
99a1aa53867faa4c32e1ebc5e8ed98db5f0ebbac
lokathor
2025-08-11T15:55:14
chore: Release safe_arch version 0.9.2
diff --git a/Cargo.toml b/Cargo.toml index a61539b..b82158e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.9.1" +version = "0.9.2" rust-version = "1....
1
1
1
b0a18ef3cc2c5d5e669371fce9cb6c22a3500229
lokathor
2025-08-11T15:54:13
chore: Release safe_arch version 0.9.1
diff --git a/Cargo.toml b/Cargo.toml index eb69455..a61539b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.9.0" +version = "0.9.1" rust-version = "1....
1
1
1
f71673496f16b650233a1e968a54de0967ccf5ca
lokathor
2025-08-11T15:42:05
Closes https://github.com/Lokathor/safe_arch/issues/120
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index 30ff3bb..dddb578 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -2157,7 +2157,6 @@ pub fn zero_extend_m128i(a: m128i) -> m256i { impl Add for m256d { type Output = Self; - #[must_use] #[inline(always)] fn add(self, rhs: Self) -> Self {...
13
29
154
236ba3d4675145dfcf62f9a567fe739c73a2c663
Anthony Tritonn
2025-08-11T13:05:26
Added missing intrinsics for AVX512 parity with other SIMD levels in wide (#121) * Added more AVX512 float wrappers * Added _s wrappers for AVX512
diff --git a/src/x86_x64/avx512.rs b/src/x86_x64/avx512.rs index 3080aef..2c86ac2 100644 --- a/src/x86_x64/avx512.rs +++ b/src/x86_x64/avx512.rs @@ -916,7 +916,7 @@ pub fn div_m512d(a: m512d, b: m512d) -> m512d { /// let a = set_splat_m512(2.0); /// let b = set_splat_m512(3.0); /// let c = set_splat_m512(1.0); -/// ...
1
417
4
fbaeefa340550d43902b7d03b2b9691ba3b8c20a
Lokathor
2025-08-07T22:43:21
chore: Release safe_arch version 0.9.0
diff --git a/Cargo.toml b/Cargo.toml index 85942b8..eb69455 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.8.0" +version = "0.9.0" rust-version = "1....
1
1
1
49757b6d04effc120b515bd1a3a427a8cab156f3
Fabio Valentini
2025-02-25T20:00:58
chore: exclude some files from published crates (#118) These all seem to be only useful during development.
diff --git a/Cargo.toml b/Cargo.toml index 4f1740b..0b0bc4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,13 @@ edition = "2018" license = "Zlib OR Apache-2.0 OR MIT" categories = ["api-bindings", "hardware-support", "no-std"] keywords = ["intrinsics", "simd"] +exclude = [ + "/.cargo/", + "/.github/", + ...
1
7
0
c790608fc6579f8296bf4a86c17e7c33ba0c944c
Lokathor
2024-12-21T14:53:25
chore: Release safe_arch version 0.7.4
diff --git a/Cargo.toml b/Cargo.toml index aa5d822..4f1740b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.7.3" +version = "0.7.4" authors = ["Lokath...
1
1
1
3d701e98ee9222a5cd2934bb7cd31af6b949dad8
Lokathor
2024-12-21T14:52:00
put the macro back
diff --git a/src/lib.rs b/src/lib.rs index 10bf637..9316c79 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,6 +133,41 @@ use core::{ pub mod naming_conventions; +/// Turns a round operator token to the correct constant value. +#[macro_export] +#[cfg_attr(docsrs, doc(cfg(target_feature = "avx")))] +// Note(Lokatho...
2
35
34
281ffc9ab22e9f7e3f13c61ee17c67c1cf9b499d
Lokathor
2024-12-20T19:21:37
chore: Release safe_arch version 0.7.3
diff --git a/Cargo.toml b/Cargo.toml index c518f3f..aa5d822 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.7.2" +version = "0.7.3" authors = ["Lokath...
1
1
1
6453b2ccb9935a2dc45b25d4861ad1d0be16a72e
Lokathor
2024-12-20T19:21:10
docs formatting.
diff --git a/src/x86_x64/sse.rs b/src/x86_x64/sse.rs index 4a962fa..682f5a4 100644 --- a/src/x86_x64/sse.rs +++ b/src/x86_x64/sse.rs @@ -2,7 +2,8 @@ use super::*; -/// Fetches the cache line containing `addr` into all levels of the cache hierarchy. +/// Fetches the cache line containing `addr` into all levels of t...
1
8
6
0d3618f9bd8d2f4b80817440f801e31f7516e2d8
Lokathor
2024-12-20T19:20:59
remove accidental duplicate cfg
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index 11dc1e0..78320d3 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -1606,7 +1606,6 @@ pub fn set_i32_m256i( #[inline(always)] #[cfg(target_arch = "x86_64")] #[cfg_attr(docsrs, doc(cfg(target_feature = "avx")))] -#[cfg(target_arch = "x86_64")] pub ...
1
0
1
ffe7f6caa9eff3a24d44d64f97461736aa85fa52
Lokathor
2024-12-20T19:20:49
docs formatting
diff --git a/src/x86_x64/adx.rs b/src/x86_x64/adx.rs index aba4b6e..460dd2c 100644 --- a/src/x86_x64/adx.rs +++ b/src/x86_x64/adx.rs @@ -8,8 +8,10 @@ use super::*; /// /// * **Intrinsic:** [`_addcarryx_u32`] /// * **Assembly:** -/// `adcx r32, r32` -/// `adox r32, r32` +/// ```asm +/// adcx r32, r32 +/// adox r32, r...
1
8
5
2beb443eed543e20309161fd0b52c719b0545b51
José Luis Cruz
2024-12-15T17:44:12
add missing attributes and relocate macro (#117) * add missing function attributes * move round_op macro to avx module & rustfmt
diff --git a/src/lib.rs b/src/lib.rs index 14f8b5c..10bf637 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -280,54 +280,4 @@ submodule!(pub x86_x64 { pub fn byte_swap_i64(i: i64) -> i64 { unsafe { _bswap64(i) } } - - /// Turns a round operator token to the correct constant value. - #[macro_export] - #[cfg_at...
5
55
50
131a915b5269ec84c35c144d024db2b370fb988d
Lokathor
2024-06-17T05:48:08
chore: Release safe_arch version 0.7.2
diff --git a/Cargo.toml b/Cargo.toml index 486636b..aacd9e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.7.1" +version = "0.7.2" authors = ["Lokath...
1
1
1
8ffbfaee585afc0bb4862a363875a8e8484fd747
Kristof Roomp
2024-06-17T05:40:26
add ptest (mm_testz/mm_testc) for avx (#114) * add ptest * moved sse4.1 to the right section and enabled sse4.1 tests which were for some reason not running because they weren't included in the module * add assembly * add more comments
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index b41bc04..db6b319 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -1153,6 +1153,116 @@ pub fn move_mask_m256d(a: m256d) -> i32 { unsafe { _mm256_movemask_pd(a.0) } } +/// Computes the bitwise AND of 256 bits in `a` and +/// `b`, returns 1 if th...
6
236
27
92d429f29a2ae4861b7ed18dfec7b0d61ed68149
Alex Yusiuk
2024-01-16T11:26:28
fix(sse2): fix pack_i16_to_u8_m128i doc example (#113)
diff --git a/src/x86_x64/sse2.rs b/src/x86_x64/sse2.rs index 8edf339..1d152b3 100644 --- a/src/x86_x64/sse2.rs +++ b/src/x86_x64/sse2.rs @@ -1953,8 +1953,8 @@ pub fn pack_i32_to_i16_m128i(a: m128i, b: m128i) -> m128i { /// # use safe_arch::*; /// let a = m128i::from([-1_i16, 2, -3, 4, -5, 6, -7, 8]); /// let b = m12...
1
2
2
46cd2e782f75971440c57ce43f8a0a1d2127b67d
Lokathor
2023-07-17T15:53:40
chore: Release safe_arch version 0.7.1
diff --git a/Cargo.toml b/Cargo.toml index 0a17509..486636b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.7.0" +version = "0.7.1" authors = ["Lokath...
1
1
1
0d01daac1ae78f0d4cc16bb61c738310a31fa7f4
Lokathor
2023-05-08T17:10:59
chore: Release safe_arch version 0.7.0
diff --git a/Cargo.toml b/Cargo.toml index 7c5b8f9..0a17509 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.7.0-alpha.0" +version = "0.7.0" authors = ...
1
1
1
914342857f5aaaa8a40f49c7c57bab4c37fb2a54
Kristof Roomp
2023-03-27T22:24:55
Add prefetch instructions (#107) * add prefetch * added prefetch and noncaching store * remove extranious changes * only do prefetch
diff --git a/src/x86_x64/sse.rs b/src/x86_x64/sse.rs index 8569b20..02ea071 100644 --- a/src/x86_x64/sse.rs +++ b/src/x86_x64/sse.rs @@ -2,6 +2,51 @@ use super::*; +/// Fetches the cache line containing `addr` into all levels of the cache hierarchy. +#[inline(always)] +#[cfg_attr(docs_rs, doc(cfg(target_feature = ...
1
45
0
af47a66393e4f7cc5a607320eabc2950853f5a17
Lokathor
2021-07-03T03:36:59
Update Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 8eaf6b0..7c5b8f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.6.1-alpha.0" +version = "0.7.0-alpha.0" au...
1
1
1
561e68b556bcdbef903f91fdb4f1cfb944dbc5bd
Lokathor
2021-07-03T03:36:36
Update sse4_1.rs
diff --git a/src/x86_x64/sse4_1.rs b/src/x86_x64/sse4_1.rs index b4c8a4d..384f54d 100644 --- a/src/x86_x64/sse4_1.rs +++ b/src/x86_x64/sse4_1.rs @@ -689,19 +689,26 @@ pub fn mul_widen_i32_odd_m128i(a: m128i, b: m128i) -> m128i { m128i(unsafe { _mm_mul_epi32(a.0, b.0) }) } -/// Lanewise `a * b` with lanes as `i32`...
1
14
7
d38455a6214a533be3ed9c8a8146de54aac3be4e
Lokathor
2021-06-23T00:38:01
(cargo-release) start next development iteration 0.6.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 0daaee0..8eaf6b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.6.0" +version = "0.6.1-alpha.0" authors = ...
1
1
1
0e2979f98055f36c85f4ffc789f4279ac5ebe735
Lokathor
2021-06-23T00:37:27
(cargo-release) version 0.6.0
diff --git a/Cargo.toml b/Cargo.toml index f7ab13d..0daaee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.6.0-alpha.0" +version = "0.6.0" authors = ...
1
1
1
68abef090f871c10e42ef20069ac9b39554fb683
Lokathor
2021-06-22T23:49:17
move atoi_test to the correct file.
diff --git a/tests/integration/sse2_tests.rs b/tests/integration/sse2_tests.rs index 94c2226..9148c04 100644 --- a/tests/integration/sse2_tests.rs +++ b/tests/integration/sse2_tests.rs @@ -1,27 +1 @@ -use super::*; - -#[test] -fn atoi_test() { - fn atoi(x: [u8; 16]) -> u64 { - let ascii_zero = set_splat_i8_m128i(b'...
2
29
28
85e46ea0d0d984f102ba10d0bc35e3cb20694b4b
Lokathor
2021-06-17T03:32:24
sse, part of https://github.com/Lokathor/safe_arch/issues/96
diff --git a/src/x86_x64/sse.rs b/src/x86_x64/sse.rs index 82216b4..eba1581 100644 --- a/src/x86_x64/sse.rs +++ b/src/x86_x64/sse.rs @@ -1064,32 +1064,22 @@ pub fn zeroed_m128() -> m128 { /// let a = m128::from_array([1.0, 2.0, 3.0, 4.0]); /// let b = m128::from_array([5.0, 6.0, 7.0, 8.0]); /// // -/// let c = shuff...
1
9
21
b984d7396d7c7636be76feda1fd430a5410e7b38
Lokathor
2021-04-27T05:20:36
restrict tests to targets where their functions exist.
diff --git a/tests/integration/sse4_2_tests.rs b/tests/integration/sse4_2_tests.rs index f3c84c1..7f4d836 100644 --- a/tests/integration/sse4_2_tests.rs +++ b/tests/integration/sse4_2_tests.rs @@ -24,12 +24,14 @@ fn test_crc32_u32() { } #[test] +#[cfg(target_arch = "x86_64")] fn test_crc32_u64() { assert_eq!(cr...
1
4
1
21aab11c7f2d1d46ed434d3f714644106b11a63d
Lokathor
2021-04-27T05:04:48
sse3 integration updates.
diff --git a/src/x86_x64/sse3.rs b/src/x86_x64/sse3.rs index 9dc7166..d302f8c 100644 --- a/src/x86_x64/sse3.rs +++ b/src/x86_x64/sse3.rs @@ -3,13 +3,9 @@ use super::*; /// Add the high lane and subtract the low lane. -/// ``` -/// # use safe_arch::*; -/// let a = m128d::from_array([10.0, 50.0]); -/// let b = m128d:...
3
100
60
6e2d69fef779add023e6e53a3895d47154265bc3
Lokathor
2021-04-14T02:55:02
some more stuff moved to the integration tests.
diff --git a/src/x86_x64/m128_.rs b/src/x86_x64/m128_.rs index 6e3792d..e0a768c 100644 --- a/src/x86_x64/m128_.rs +++ b/src/x86_x64/m128_.rs @@ -22,12 +22,6 @@ unsafe impl bytemuck::Pod for m128 {} #[cfg(feature = "bytemuck")] unsafe impl bytemuck::TransparentWrapper<__m128> for m128 {} -#[test] -fn test_m128_size_...
9
398
394
00ef07e701dab22fcdcfb2389906b65d0d9330b3
Lokathor
2021-04-12T16:26:30
sse4.2 integration
diff --git a/src/x86_x64/sse4_2.rs b/src/x86_x64/sse4_2.rs index 582800b..a313989 100644 --- a/src/x86_x64/sse4_2.rs +++ b/src/x86_x64/sse4_2.rs @@ -5,13 +5,9 @@ use super::*; /// Lanewise `a > b` with lanes as `i64`. /// /// All bits 1 for true (`-1`), all bit 0 for false (`0`). -/// ``` -/// # use safe_arch::*; -/...
3
243
482
3f58dd8d7751cd4339cd45fc4fd1650319c829d0
Lokathor
2021-04-12T09:12:42
ssse3 integration
diff --git a/src/x86_x64/ssse3.rs b/src/x86_x64/ssse3.rs index 4fd87b4..d5f1731 100644 --- a/src/x86_x64/ssse3.rs +++ b/src/x86_x64/ssse3.rs @@ -5,14 +5,9 @@ use super::*; /// Lanewise absolute value with lanes as `i8`. /// /// This is a "wrapping" absolute value, so `i8::MIN` stays as `i8::MIN`. -/// ``` -/// # use...
3
196
140
b7290c1baa8c8ac5351301e4639c2c94d4c0a23f
Lokathor
2021-04-12T08:48:02
Closes https://github.com/Lokathor/safe_arch/issues/92
diff --git a/src/x86_x64/avx2.rs b/src/x86_x64/avx2.rs index b8ec18f..1291311 100644 --- a/src/x86_x64/avx2.rs +++ b/src/x86_x64/avx2.rs @@ -13,14 +13,14 @@ use super::*; /// let a = m128i::from([10, 20, 30, 40]); /// let b = m128i::from([100, 200, 300, 400]); /// // -/// let c: [i32; 4] = blend_i32_m128i!(a, b, 0b0...
1
2
2
7b5693181b6e0cd81a5a284c9e69ef19525bbf83
Lokathor
2021-04-12T08:46:58
Closes https://github.com/Lokathor/safe_arch/issues/93
diff --git a/src/x86_x64/sse.rs b/src/x86_x64/sse.rs index 5db0acc..82216b4 100644 --- a/src/x86_x64/sse.rs +++ b/src/x86_x64/sse.rs @@ -409,13 +409,13 @@ pub fn cmp_nlt_mask_m128_s(a: m128, b: m128) -> m128 { /// # use safe_arch::*; /// let a = m128::from_array([0.0, f32::NAN, 0.0, f32::NAN]); /// let b = m128::fro...
2
8
8
bd48361e08fdd878cda6d3b92a1502c71c570fe9
Lokathor
2021-04-12T08:40:14
limit tests that are run on 32-bit.
diff --git a/tests/integration/adx_tests.rs b/tests/integration/adx_tests.rs index f9eabf7..2c06bcd 100644 --- a/tests/integration/adx_tests.rs +++ b/tests/integration/adx_tests.rs @@ -8,6 +8,7 @@ fn test_add_carry_u32() { } #[test] +#[cfg(target_arch = "x86_64")] fn test_add_carry_u64() { let mut out = 0_u64; ...
7
16
0
447163dda9b86651c45f9ce6265f2a6ceb329f58
Lokathor
2021-04-12T08:34:53
popcnt integration
diff --git a/src/x86_x64/popcnt.rs b/src/x86_x64/popcnt.rs index cd73c70..fa68632 100644 --- a/src/x86_x64/popcnt.rs +++ b/src/x86_x64/popcnt.rs @@ -3,12 +3,9 @@ use super::*; /// Count the number of bits set within an `i32` -/// ``` -/// # use safe_arch::*; -/// assert_eq!(population_count_i32(0), 0); -/// assert_...
3
24
12
676e2298fe48564eef65147cec68a77a98a05737
Lokathor
2021-04-12T08:26:51
pclmulqdq integration
diff --git a/src/x86_x64/pclmulqdq.rs b/src/x86_x64/pclmulqdq.rs index 19a3b48..d567f89 100644 --- a/src/x86_x64/pclmulqdq.rs +++ b/src/x86_x64/pclmulqdq.rs @@ -4,60 +4,11 @@ use super::*; /// Performs a "carryless" multiplication of two `i64` values. /// -/// You specify `m128i` expressions and then `, lane 0` or ...
3
25
55
0357a042d0feb6abe6bcf4b5ac2273024542df79
Lokathor
2021-04-12T08:16:50
rdseed integration.
diff --git a/src/x86_x64/rdseed.rs b/src/x86_x64/rdseed.rs index 297ba88..68ed0ee 100644 --- a/src/x86_x64/rdseed.rs +++ b/src/x86_x64/rdseed.rs @@ -3,11 +3,9 @@ use super::*; /// Try to obtain a random `u16` from the hardware RNG. -/// ``` -/// # use safe_arch::*; -/// let mut val = 0_u16; -/// let it_worked = rds...
3
35
15
5c3aae71514cd0c6178f2ff0b57eadd751ea4f84
Lokathor
2021-04-12T07:55:39
update aes, wish i knew how i'd test this one.
diff --git a/src/x86_x64/aes.rs b/src/x86_x64/aes.rs index cb99740..6913b02 100644 --- a/src/x86_x64/aes.rs +++ b/src/x86_x64/aes.rs @@ -2,11 +2,10 @@ use super::*; -/// "Perform one round of AES decryption flow on `a` using the `round_key`." -/// ``` -/// # use safe_arch::*; -/// // TODO -/// ``` +/// Perform one...
1
34
44
22acc423f2d252bee75458adf1fe1cec670218ec
Lokathor
2021-04-12T07:43:13
bmi2 integration
diff --git a/src/x86_x64/bmi2.rs b/src/x86_x64/bmi2.rs index c288260..dbc11f7 100644 --- a/src/x86_x64/bmi2.rs +++ b/src/x86_x64/bmi2.rs @@ -3,13 +3,9 @@ use super::*; /// Zero out all high bits in a `u32` starting at the index given. -/// ``` -/// # use safe_arch::*; -/// assert_eq!(bit_zero_high_index_u32(0b1111,...
3
86
50
5f9a07646d989a94def071d5c200e43b9df094be
Lokathor
2021-04-12T07:31:25
bmi1 to integration
diff --git a/src/x86_x64/bmi1.rs b/src/x86_x64/bmi1.rs index adff59d..9adce2d 100644 --- a/src/x86_x64/bmi1.rs +++ b/src/x86_x64/bmi1.rs @@ -3,16 +3,9 @@ use super::*; /// Bitwise `(!a) & b` for `u32` -/// ``` -/// # use safe_arch::*; -/// let a = [1, 0, 1, 0]; -/// let b = [1, 1, 0, 0]; -/// let mut c = [0_u32; 4]...
3
168
108
4ae2d538c30b0ddc1aa749bdbda0fd74fc3a6429
Lokathor
2021-04-12T06:55:26
fix an actual bug.
diff --git a/src/x86_x64/sse.rs b/src/x86_x64/sse.rs index 2b338f5..5db0acc 100644 --- a/src/x86_x64/sse.rs +++ b/src/x86_x64/sse.rs @@ -1194,7 +1194,7 @@ pub fn store_reverse_m128(r: &mut m128, a: m128) { #[inline(always)] #[cfg_attr(docs_rs, doc(cfg(target_feature = "sse")))] pub fn store_unaligned_m128(r: &mut [f...
1
1
1
206e74462654c24a4772df5b615dd0856bdf7f40
Lokathor
2021-04-12T06:49:50
Closes https://github.com/Lokathor/safe_arch/issues/94
diff --git a/src/x86_x64/avx2.rs b/src/x86_x64/avx2.rs index 15acc4e..b8ec18f 100644 --- a/src/x86_x64/avx2.rs +++ b/src/x86_x64/avx2.rs @@ -1962,14 +1962,14 @@ pub fn min_u32_m256i(a: m256i, b: m256i) -> m256i { /// 0_i8, 11, 2, -13, 4, 15, 6, -17, -8, 19, -20, 21, 22, -23, 24, 127, 0, -1, /// 3, 4, 5, 1, -2, -4...
1
3
3
a8fff66d9b26200b6a911969b149bbc63502ae45
Lokathor
2021-04-12T06:43:41
update version.
diff --git a/Cargo.toml b/Cargo.toml index 3466e0d..f7ab13d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.3-alpha.0" +version = "0.6.0-alpha.0" au...
1
1
1
6aee37883fb3c97cf020e1cffd7f3a7b427a8ddc
Evgeniy Reizner
2021-02-20T04:57:51
Minor documentation fix. (#95)
diff --git a/src/x86_x64/avx2.rs b/src/x86_x64/avx2.rs index 1ecd377..15acc4e 100644 --- a/src/x86_x64/avx2.rs +++ b/src/x86_x64/avx2.rs @@ -700,7 +700,7 @@ macro_rules! blend_imm_i32_m256i { /// ] /// ); /// ``` -/// * **Intrinsic:** [`_mm256_avg_epu16`] +/// * **Intrinsic:** [`_mm256_blendv_epi8`] /// * **Assem...
1
1
1
36ca5efabcaa4c39a533c1182405fa1c83b9b152
Lokathor
2020-08-09T08:04:39
(cargo-release) start next development iteration 0.5.3-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 8b190d7..3466e0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.2" +version = "0.5.3-alpha.0" authors = ...
1
1
1
e4ffc5df0fa1259cd2100c9db0b01ba720735f0a
Lokathor
2020-08-09T08:04:28
(cargo-release) version 0.5.2
diff --git a/Cargo.toml b/Cargo.toml index bf4afef..8b190d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.2-alpha.0" +version = "0.5.2" authors = ...
1
1
1
5bd913c999ea5854de87c6ddbcfd3b928d06f55d
Lokathor
2020-08-09T07:59:09
restrict test to sse2 and up
diff --git a/tests/atoi_sse2.rs b/tests/atoi_sse2.rs new file mode 100644 index 0000000..8f27bbc --- /dev/null +++ b/tests/atoi_sse2.rs @@ -0,0 +1,28 @@ +use safe_arch::*; + +#[test] +#[cfg(target_feature = "sse2")] +fn atoi_test() { + fn atoi(x: [u8; 16]) -> u64 { + let ascii_zero = set_splat_i8_m128i(b'0' as i8);...
2
28
33
614a118b00d9f2a9ea2a3fd59a58924fb31362f8
Lokathor
2020-08-09T07:51:00
solve adx error
diff --git a/src/x86_x64/adx.rs b/src/x86_x64/adx.rs index 0fc9a57..510d33a 100644 --- a/src/x86_x64/adx.rs +++ b/src/x86_x64/adx.rs @@ -28,6 +28,7 @@ pub fn add_carry_u32(c_in: u8, a: u32, b: u32, out: &mut u32) -> u8 { /// ``` #[inline(always)] #[cfg_attr(docs_rs, doc(cfg(target_feature = "adx")))] +#[cfg(target_a...
1
1
0
82ec70fe2278e962bc539dc5d718ca0c82cb9873
Lokathor
2020-08-09T04:53:08
(cargo-release) start next development iteration 0.5.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index a03fcaa..bf4afef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.1" +version = "0.5.2-alpha.0" authors = ...
1
1
1
74d06ca99f1e2e04dd1121f9fa3aefb8a27480e8
Lokathor
2020-08-09T04:52:52
set up for release.
diff --git a/Cargo.toml b/Cargo.toml index 20728b5..a03fcaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.0" +version = "0.5.1" authors = ["Lokath...
1
1
1
31872de0d43ca8f6c69dc1aa1b275748a36e4ebb
Lokathor
2020-06-28T16:57:08
(cargo-release) version 0.5.0
diff --git a/Cargo.toml b/Cargo.toml index a87b629..20728b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.5.0-alpha.0" +version = "0.5.0" authors = ...
1
1
1
01d79663484e5d4543559ca46006946ccdd29eb0
Lokathor
2020-06-24T03:04:21
make the test more concise.
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index 0f996e1..755ead1 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -303,11 +303,8 @@ pub fn cast_to_m256_from_m256d(a: m256d) -> m256 { /// ``` /// # use safe_arch::*; /// let a = load_f64_splat_m256d(&1.0); -/// let b: [u32; 8] = cast_to_m256i_fro...
1
2
5
55279689f6918b6f83f561c9c06a6df2e84f5e4f
Lokathor
2020-06-24T02:56:27
Closes https://github.com/Lokathor/safe_arch/issues/41
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index 04ef0a0..0f996e1 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -279,117 +279,164 @@ pub fn load_f32_splat_m256(a: &f32) -> m256 { m256(unsafe { _mm256_broadcast_ss(&a) }) } -/// Bit-preserving cast from `m256d` to `m256`. +/// Bit-preserving...
1
83
36
b1bd0713d651da2f651df8cc597330e49c3f2617
Lokathor
2020-06-24T01:35:01
vNext will be many breaks
diff --git a/Cargo.toml b/Cargo.toml index 20ce787..a87b629 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.4.1-alpha.0" +version = "0.5.0-alpha.0" au...
1
1
1
511249959acd7fed89d6c09e363ae994b127a40e
Lokathor
2020-06-24T01:22:03
Closes https://github.com/Lokathor/safe_arch/issues/36
diff --git a/src/x86_x64/aes.rs b/src/x86_x64/aes.rs index dbebb88..1d5dbe4 100644 --- a/src/x86_x64/aes.rs +++ b/src/x86_x64/aes.rs @@ -72,7 +72,8 @@ pub fn aes_inv_mix_columns_m128i(a: m128i) -> m128i { macro_rules! aes_key_gen_assist_m128i { ($a:expr, $imm:expr) => {{ let a: m128i = $a; - const IMM: i32 ...
8
127
103
a7bce4a92213a0529b7be0f33e29afb5ddf15161
Lokathor
2020-06-24T00:59:28
Closes https://github.com/Lokathor/safe_arch/issues/34
diff --git a/src/x86_x64/sse4_1.rs b/src/x86_x64/sse4_1.rs index ab5f110..a2022c0 100644 --- a/src/x86_x64/sse4_1.rs +++ b/src/x86_x64/sse4_1.rs @@ -772,7 +772,7 @@ macro_rules! insert_f32_imm_m128 { m128(unsafe { _mm_insert_ps(a.0, b.0, IMM) }) }}; ($a:expr, $b:expr, from $b_lane_src:expr, to $a_lane_dest:e...
1
1
1
1115fd79c8eda1e495066a964fcba8f5aad4e5cd
Lokathor
2020-06-24T00:50:35
Closes https://github.com/Lokathor/safe_arch/issues/76
diff --git a/src/naming_conventions.rs b/src/naming_conventions.rs index 1b4fbd0..0c35b8a 100644 --- a/src/naming_conventions.rs +++ b/src/naming_conventions.rs @@ -60,11 +60,14 @@ //! output where the output value is of the same data type as the inputs, but //! with all the bits in a "true" lane as 1 and all the...
6
148
78
62c8a216b5413c889bb27e8adb67f594b57bf3f8
Lokathor
2020-06-23T23:12:40
Closes https://github.com/Lokathor/safe_arch/issues/85
diff --git a/src/naming_conventions.rs b/src/naming_conventions.rs index 6aa0093..1b4fbd0 100644 --- a/src/naming_conventions.rs +++ b/src/naming_conventions.rs @@ -43,12 +43,12 @@ //! * `add`: Addition. This is "wrapping" by default, though some other types of //! addition are available. Remember that wrapping sig...
6
24
24
e1d687933b9cc9f1579b98038726775e77044d10
Lokathor
2020-06-21T20:54:23
Closes https://github.com/Lokathor/safe_arch/issues/82 (#83)
diff --git a/src/naming_conventions.rs b/src/naming_conventions.rs index ac5f32d..6aa0093 100644 --- a/src/naming_conventions.rs +++ b/src/naming_conventions.rs @@ -43,12 +43,15 @@ //! * `add`: Addition. This is "wrapping" by default, though some other types of //! addition are available. Remember that wrapping sig...
5
60
59
5fec818194c3ba984949ea4b0d5ae04e4bad70db
Lokathor
2020-06-16T14:21:48
(cargo-release) start next development iteration 0.4.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 9d215ef..20ce787 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.4.0" +version = "0.4.1-alpha.0" authors = ...
1
1
1
04b3ceaba36b0085e4347b391481c6013d4c7581
Lokathor
2020-06-16T14:21:25
(cargo-release) version 0.4.0
diff --git a/Cargo.toml b/Cargo.toml index fa09661..9d215ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "safe_arch" description = "Crate that exposes `core::arch` safely via `#[cfg()]`." repository = "https://github.com/Lokathor/safe_arch" -version = "0.4.0-alpha.0" +version = "0.4.0" authors = ...
1
1
1
78fd9468fbf32c729775c633147a6ff291142851
Soveu
2020-06-07T01:07:44
new test and [must_use] fix (#73) * new test and [must_use] fix * more tests * rustfmt on tests/number * tests are now usable on stable
diff --git a/src/x86_x64/avx.rs b/src/x86_x64/avx.rs index 33795e1..6329799 100644 --- a/src/x86_x64/avx.rs +++ b/src/x86_x64/avx.rs @@ -1578,7 +1578,6 @@ pub fn load_masked_m256(a: &m256, mask: m256i) -> m256 { /// ); /// assert_eq!(a.to_array(), [0.0, 17.0]); /// ``` -#[must_use] #[inline(always)] #[cfg_attr(doc...
5
437
116
52538a5351131c34153ee423f9343301ecdcb052
Lokathor
2020-05-25T19:21:05
Improve FMA docs a bit are prefix all ops with "fused" (#71)
diff --git a/src/x86_x64/fma.rs b/src/x86_x64/fma.rs index 428f636..fcf61f9 100644 --- a/src/x86_x64/fma.rs +++ b/src/x86_x64/fma.rs @@ -2,587 +2,704 @@ use super::*; -/// Lanewise `a * b + c` -/// ``` -/// # use safe_arch::*; -/// let a = m256d::from_array([1.0, 2.0, 3.0, 4.0]); -/// let b = m256d::from_array([5....
1
419
302
9891b7fa57f6f243b89a3c92c0e361d896701991
Soveu
2020-05-24T22:16:34
Integration tests (#68) * first test * second test * add_horizontal_m128 is sse3
diff --git a/tests/pythagoras.rs b/tests/pythagoras.rs new file mode 100644 index 0000000..e997bad --- /dev/null +++ b/tests/pythagoras.rs @@ -0,0 +1,115 @@ +#![cfg(target_feature = "sse3")] +#![cfg(feature = "bytemuck")] + +use bytemuck; +use safe_arch::*; + +type Point2D = [f32; 2]; +const PLAYER_POS: Point2D = [128....
2
175
0
cc82af9634eedd4823379c8bbbc7a12e422cb1c4
Soveu
2020-05-24T18:07:25
fix splat inconsistency (#69) * fix splat inconsistency * doc: splat to set_splat * inline doc: splat to set_splat
diff --git a/src/lib.rs b/src/lib.rs index c1b28e1..ee92834 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,7 +64,7 @@ //! * `store`: Writes a register to memory (writes `Foo` to a `&mut Foo`). //! * `set`: Packs values into a register (works like `[1, 2, 3, 4]` to build an //! array). -//! * `splat`: Copy a value...
3
16
16