diff options
author | lloyd <[email protected]> | 2010-05-25 14:44:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-05-25 14:44:27 +0000 |
commit | 432bcf59badb8f6271146772ccbc1649822c25cb (patch) | |
tree | 1353fa7ea1807be29e9e70237ad90014a36119d2 /src/block/noekeon_simd/noekeon_simd.h | |
parent | 211d835a356f55e037ff8035017d79c458f13615 (diff) |
Change BlockCipher::parallelism() to return the native parallelism of
the implementation rather than the preferred one. Update all
implementations.
Add a new function parallel_bytes() which returns
parallelism() * BLOCK_SIZE * BUILD_TIME_CONSTANT
This is because i noticed all current calls of parallelism() just
multiplied the result by the block size already, so this simplified
that code.
The build time constant is set to 4, which was the previous default
return value of parallelism(). However the SIMD versions returned
2*native paralellism rather than 4*, so this increases the buffer
sizes used for those algorithms.
The constant multiple lives in buildh.in and build.h, and is named
BOTAN_BLOCK_CIPHER_PAR_MULT.
Diffstat (limited to 'src/block/noekeon_simd/noekeon_simd.h')
-rw-r--r-- | src/block/noekeon_simd/noekeon_simd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/block/noekeon_simd/noekeon_simd.h b/src/block/noekeon_simd/noekeon_simd.h index 55fdfbd22..aba1e3d65 100644 --- a/src/block/noekeon_simd/noekeon_simd.h +++ b/src/block/noekeon_simd/noekeon_simd.h @@ -18,7 +18,7 @@ namespace Botan { class BOTAN_DLL Noekeon_SIMD : public Noekeon { public: - u32bit parallelism() const { return 8; } + u32bit parallelism() const { return 4; } void encrypt_n(const byte in[], byte out[], u32bit blocks) const; void decrypt_n(const byte in[], byte out[], u32bit blocks) const; |