1
0
mirror of https://github.com/fumiama/blake2b-simd.git synced 2026-06-20 02:40:41 +08:00

Added AVX2 support (#6)

* Added AVX2 support
This commit is contained in:
Frank
2016-07-03 20:54:51 +02:00
committed by Harshavardhana
parent f0521e8972
commit 00562011ad
8 changed files with 808 additions and 19 deletions

View File

@@ -40,8 +40,11 @@ func compressAVX(d *digest, p []uint8) {
}
func compress(d *digest, p []uint8) {
// Verifies if AVX is available, use optimized code path.
if avx {
// Verifies if AVX2 or AVX is available, use optimized code path.
if avx2 {
compressAVX2(d, p)
return
} else if avx {
compressAVX(d, p)
return
} // else { fallback to generic approach.