Conversation
… us a reference to that, causing stores to be blackholed
|
Clippy complains about code I didn't touch. |
You bumped the MSRV, which introduced new rules 🙂 The CI build pipeline now requires updating the MSRV version as well. Since I'm happy with the SIMD changes as long as they meet these two points:
|
|
|
|
That sounds good to me! I'll convert this PR to draft until I have converted at least a good chunk and have placated Clippy. |
|
I think I've picked a poor starting point in rgb-xyz because there functions aren't tested or benchmarked. Because of that it's hard to tell if I broke anything or if there were any performance changes. And since they're not instantiated and used in a binary I cannot easily view the assembly either. |
|
You can change this method to return always false and set EDIT: return always false |
|
Invocation logic goes as so:
If both statements are true then will be invoked Q path with |
|
To confirm, as long as the |
…fe in 1.90" This reverts commit dba2d90.
…d and lower MSRV back to 1.88
…und a rust-analyzer bug: rust-lang/rust-analyzer#21024
…, no meaningful changes needed now that intrinsics are safe to call
…_15.rs, no meaningful changes needed now that intrinsics are safe to call
…q0_15.rs, no meaningful changes needed now that intrinsics are safe to call
…rs, no meaningful changes needed now that intrinsics are safe to call
| let temporary_first_half: &mut [u16; 8] = | ||
| (&mut temporary0.0[..8]).try_into().unwrap(); | ||
| _mm_storeu_si128(temporary_first_half, zx); |
There was a problem hiding this comment.
| let temporary_first_half: &mut [u16; 8] = | |
| (&mut temporary0.0[..8]).try_into().unwrap(); | |
| _mm_storeu_si128(temporary_first_half, zx); | |
| _mm_storeu_si128(temporary0.0.first_chunk_mut::<8>().unwrap(), zx); |
This should work and avoid any chance of creating a temporary.
Removes all
unsafefromavx/rgb_xyz.rsas a proof of concept. The only remainingunsafein that file is for calling a function with a#[target_feature]annotation.Starting with Rust 1.87 platform intrinsics are no longer unsafe to call. Load/store intrinsics still are because they operate on raw pointers, but the
safe_unaligned_simdcrate provides safe wrappers around those.This changes aligned store intrinsics into unaligned ones, but the compiler will turn them right back into aligned store instructions if it can tell the address is always aligned, which should apply here.
Dropping the now-unnecessary block created lots of noisy whitespace changes, but that is split into its own commit to ease review.
This is meant as a starting point, I am happy to help convert the rest of the code to this style if you are OK with the basic direction.