diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-04-19 06:22:33 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-04-19 06:22:33 -0400 |
commit | 4f2a7b474989e71d319826dfb92e9a8cf5690fd5 (patch) | |
tree | fcac59acb5108f3597417ac4a49c48dcbd1d79a8 /lsh512.cpp | |
parent | f221231472cfe2756df249fef770d805ce73ce26 (diff) | |
download | cryptopp-git-4f2a7b474989e71d319826dfb92e9a8cf5690fd5.tar.gz |
Update comments
Diffstat (limited to 'lsh512.cpp')
-rw-r--r-- | lsh512.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -12,6 +12,10 @@ // the end of Restart(), Update() or Final(). That mistake costs
// about 3 cpb.
+// There's a fair amount of AVX2 code because _mm256_or_si256,
+// _mm256_xor_si256 and _mm256_add_epi64 are AVX2. There's no way
+// to avoid AVX2 for the simple operations.
+
// TODO: cut-over to a *_simd.cpp file for proper runtime dispatching.
#include "pch.h"
@@ -770,7 +774,7 @@ inline void add_blk(lsh_u64 cv_l[8], lsh_u64 cv_r[8]) template <unsigned int R>
inline void rotate_blk(lsh_u64 cv[8])
{
-#if defined(CRYPTOPP_LSH512_AVX_AVAILABLE)
+#if defined(CRYPTOPP_LSH512_AVX2_AVAILABLE)
_mm256_storeu_si256(M256_CAST(cv), _mm256_or_si256(
_mm256_slli_epi64(_mm256_loadu_si256(CONST_M256_CAST(cv)), R),
_mm256_srli_epi64(_mm256_loadu_si256(CONST_M256_CAST(cv)), 64-R)));
|