Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on packed_simd by using SIMD intrinsics. #6

Merged
merged 1 commit into from Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 0 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -17,7 +17,6 @@ exclude = [

[dependencies]
arrayref = "0.3.6"
packed_simd = { version = "0.3.4", package = "packed_simd_2" }

[dev-dependencies]
librsync = { git = "https://github.com/goffrie/librsync-rs", rev = "56e7646d133c3174656b66c61f6259d6154a8873", default-features = false }
Expand Down
4 changes: 1 addition & 3 deletions README.md
Expand Up @@ -9,9 +9,7 @@ A faster implementation of [librsync](https://github.com/librsync/librsync) in
pure Rust, using SIMD operations where available. Note that only the legacy MD4
format is supported, not BLAKE2.

Rust nightly is currently required because of
[packed\_simd](https://github.com/rust-lang/packed_simd). Only x86 and x86-64
architectures are currently supported.
Only x86 and x86-64 architectures are currently supported for SIMD.

## The rsync algorithm
This crate offers three major APIs:
Expand Down
17 changes: 0 additions & 17 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/crc.rs
Expand Up @@ -75,11 +75,15 @@ impl Crc {
{
if is_x86_feature_detected!("avx2") {
imp!(#[target_feature(enable = "avx2")] unsafe fn imp_avx2);
unsafe { return imp_avx2(self, buf); }
unsafe {
return imp_avx2(self, buf);
}
}
if is_x86_feature_detected!("sse2") {
imp!(#[target_feature(enable = "sse2")] unsafe fn imp_sse2);
unsafe { return imp_sse2(self, buf); }
unsafe {
return imp_sse2(self, buf);
}
}
}
imp!(fn imp_baseline);
Expand Down