From f42cb6cf37c7e8c24aac726fb450f46fa2a3569e Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 12 Oct 2017 19:44:26 -0400 Subject: Use SIMD for in Threefish GCC 7 can actually vectorize this for AVX2 --- src/lib/block/threefish/threefish.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/block/threefish') diff --git a/src/lib/block/threefish/threefish.cpp b/src/lib/block/threefish/threefish.cpp index 937a673fd..804d6003a 100644 --- a/src/lib/block/threefish/threefish.cpp +++ b/src/lib/block/threefish/threefish.cpp @@ -134,7 +134,7 @@ void Threefish_512::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) } #endif - BOTAN_PARALLEL_FOR(size_t i = 0; i < blocks; ++i) + BOTAN_PARALLEL_SIMD_FOR(size_t i = 0; i < blocks; ++i) { uint64_t X0, X1, X2, X3, X4, X5, X6, X7; load_le(in + BLOCK_SIZE*i, X0, X1, X2, X3, X4, X5, X6, X7); @@ -214,7 +214,7 @@ void Threefish_512::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) THREEFISH_INJECT_KEY(R2); \ } while(0) - BOTAN_PARALLEL_FOR(size_t i = 0; i < blocks; ++i) + BOTAN_PARALLEL_SIMD_FOR(size_t i = 0; i < blocks; ++i) { uint64_t X0, X1, X2, X3, X4, X5, X6, X7; load_le(in + BLOCK_SIZE*i, X0, X1, X2, X3, X4, X5, X6, X7); -- cgit v1.2.3