Skip to content

Commit

Permalink
Transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Jun 11, 2024
1 parent b72b932 commit 4de9bec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benches/transpose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::mem::size_of;

use criterion::{Criterion, criterion_group, criterion_main};
use criterion::{criterion_group, criterion_main, Criterion};

use fastlanes::{BitPacking, Transpose};

Expand Down
7 changes: 5 additions & 2 deletions src/transpose.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use seq_macro::seq;
use crate::{FastLanes, FL_ORDER};
use seq_macro::seq;

pub trait Transpose: FastLanes {
const MASK: [usize; 1024] = transpose_mask();
Expand All @@ -9,7 +9,10 @@ pub trait Transpose: FastLanes {
fn untranspose(input: &[Self; 1024], output: &mut [Self; 1024]);
}

impl<T> Transpose for T where T: FastLanes {
impl<T> Transpose for T
where
T: FastLanes,
{
#[inline(never)]
fn transpose(input: &[Self; 1024], output: &mut [Self; 1024]) {
seq!(i in 0..1024 {
Expand Down

0 comments on commit 4de9bec

Please sign in to comment.