diff options
author | Paul Duncan <pabs@pablotron.org> | 2024-05-07 21:30:29 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2024-05-07 21:30:29 -0400 |
commit | 9e5b201abb0ae1135e4f6567c7f4763150aab501 (patch) | |
tree | 70ac028c8f364400e7a6d974acebbae207e5e3e9 | |
parent | ae421618db3b68ccda95f54d1c9e8d05b2dab90a (diff) | |
download | sha3-9e5b201abb0ae1135e4f6567c7f4763150aab501.tar.bz2 sha3-9e5b201abb0ae1135e4f6567c7f4763150aab501.zip |
sha3.c: s/union/struct/ (yeesh)
-rw-r--r-- | sha3.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -485,18 +485,13 @@ static inline void permute_n_avx512(uint64_t s[static 25], const size_t num_roun // columns are stored in the low 5 64-bit lanes. this wastes one // 64-bit lane per row at the expense of making many of the instructions // simpler. -typedef union { +typedef struct { uint64x2_t p0, p1, p2; } row_t; // set contents of row static inline row_t row_set(const uint64x2_t a, const uint64x2_t b, const uint64x2_t c) { - row_t r; - r.p0 = a; - r.p1 = b; - r.p2 = c; - - return r; + return (row_t) { a, b, c }; } // get Nth pair of u64s from row |