Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions encodings/fastlanes/src/bit_transpose/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::bit_transpose::TRANSPOSE_8X8;
/// This version uses 64-bit gather + parallel bit operations instead of
/// extracting bits one by one. Typically 5-10x faster than the basic scalar version.
#[inline(never)]
#[allow(dead_code)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice looks like a if x86

pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
// Helper to perform 8x8 bit transpose on a u64 (each byte becomes a row)
fn transpose_8x8(mut x: u64) -> u64 {
Expand Down Expand Up @@ -84,6 +85,7 @@ pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {

/// Fast scalar untranspose using the 8x8 bit matrix transpose algorithm.
#[inline(never)]
#[allow(dead_code)]
pub fn untranspose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
fn transpose_8x8(mut x: u64) -> u64 {
let t = (x ^ (x >> 7)) & TRANSPOSE_2X2;
Expand Down
Loading