Skip to content

Commit

Permalink
ppv-lite86: add interface needed for BLAKE
Browse files Browse the repository at this point in the history
  • Loading branch information
kazcw committed Dec 30, 2021
1 parent 34d00f5 commit 8e7c84e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils-simd/ppv-lite86/src/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ impl From<vec256_storage> for [u64; 4] {
[a, b, c, d]
}
}
impl From<[u64; 4]> for vec256_storage {
#[inline(always)]
fn from([a, b, c, d]: [u64; 4]) -> Self {
Self {
v128: [[a, b].into(), [c, d].into()],
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub struct vec512_storage {
v128: [vec128_storage; 4],
Expand Down

0 comments on commit 8e7c84e

Please sign in to comment.