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 f08772c commit b72b932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transpose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ impl<T> Transpose for T where T: FastLanes {
#[inline(never)]
fn transpose(input: &[Self; 1024], output: &mut [Self; 1024]) {
seq!(i in 0..1024 {
unsafe { *output.get_unchecked_mut(i) = *input.get_unchecked(Self::MASK[i]) };
output[i] = input[Self::MASK[i]];
});
}

#[inline(never)]
fn untranspose(input: &[Self; 1024], output: &mut [Self; 1024]) {
seq!(i in 0..1024 {
unsafe { *output.get_unchecked_mut(i) = *input.get_unchecked(Self::UNMASK[i]) };
output[i] = input[Self::UNMASK[i]];
});
}
}
Expand Down

0 comments on commit b72b932

Please sign in to comment.