1
1
2
2
// Source originally from https://github.com/BLAKE3-team/BLAKE3
3
- // From commit: 64747d48ffe9d1fbf4b71e94cabeb8a211461081
3
+ // From commit: 2dd4e57f68d85f3983b1880b66250fc7bdf0b7c8
4
4
5
5
#include "blake3_impl.h"
6
6
@@ -171,7 +171,7 @@ INLINE void transpose_vecs(__m256i vecs[DEGREE]) {
171
171
__m256i gh_0145 = _mm256_unpacklo_epi32 (vecs [6 ], vecs [7 ]);
172
172
__m256i gh_2367 = _mm256_unpackhi_epi32 (vecs [6 ], vecs [7 ]);
173
173
174
- // Interleave 64-bit lates . The low unpack is lanes 00/22 and the high is
174
+ // Interleave 64-bit lanes . The low unpack is lanes 00/22 and the high is
175
175
// 11/33.
176
176
__m256i abcd_04 = _mm256_unpacklo_epi64 (ab_0145 , cd_0145 );
177
177
__m256i abcd_15 = _mm256_unpackhi_epi64 (ab_0145 , cd_0145 );
@@ -232,10 +232,10 @@ INLINE void load_counters(uint64_t counter, bool increment_counter,
232
232
}
233
233
234
234
static
235
- void fd_blake3_hash8_avx2 (const uint8_t * const * inputs , size_t blocks ,
236
- const uint32_t key [8 ], uint64_t counter ,
237
- bool increment_counter , uint8_t flags ,
238
- uint8_t flags_start , uint8_t flags_end , uint8_t * out ) {
235
+ void blake3_hash8_avx2 (const uint8_t * const * inputs , size_t blocks ,
236
+ const uint32_t key [8 ], uint64_t counter ,
237
+ bool increment_counter , uint8_t flags ,
238
+ uint8_t flags_start , uint8_t flags_end , uint8_t * out ) {
239
239
__m256i h_vecs [8 ] = {
240
240
set1 (key [0 ]), set1 (key [1 ]), set1 (key [2 ]), set1 (key [3 ]),
241
241
set1 (key [4 ]), set1 (key [5 ]), set1 (key [6 ]), set1 (key [7 ]),
@@ -291,27 +291,27 @@ void fd_blake3_hash8_avx2(const uint8_t *const *inputs, size_t blocks,
291
291
}
292
292
293
293
#if FD_HAS_AVX
294
- void fd_blake3_hash_many_sse41 (const uint8_t * const * inputs , size_t num_inputs ,
294
+ void blake3_hash_many_sse41 (const uint8_t * const * inputs , size_t num_inputs ,
295
+ size_t blocks , const uint32_t key [8 ],
296
+ uint64_t counter , bool increment_counter ,
297
+ uint8_t flags , uint8_t flags_start ,
298
+ uint8_t flags_end , uint8_t * out );
299
+ #else
300
+ void blake3_hash_many_portable (const uint8_t * const * inputs , size_t num_inputs ,
295
301
size_t blocks , const uint32_t key [8 ],
296
302
uint64_t counter , bool increment_counter ,
297
303
uint8_t flags , uint8_t flags_start ,
298
304
uint8_t flags_end , uint8_t * out );
299
- #else
300
- void fd_blake3_hash_many_portable (const uint8_t * const * inputs , size_t num_inputs ,
301
- size_t blocks , const uint32_t key [8 ],
302
- uint64_t counter , bool increment_counter ,
303
- uint8_t flags , uint8_t flags_start ,
304
- uint8_t flags_end , uint8_t * out );
305
305
#endif /* FD_HAS_AVX */
306
306
307
- void fd_blake3_hash_many_avx2 (const uint8_t * const * inputs , size_t num_inputs ,
308
- size_t blocks , const uint32_t key [8 ],
309
- uint64_t counter , bool increment_counter ,
310
- uint8_t flags , uint8_t flags_start ,
311
- uint8_t flags_end , uint8_t * out ) {
307
+ void blake3_hash_many_avx2 (const uint8_t * const * inputs , size_t num_inputs ,
308
+ size_t blocks , const uint32_t key [8 ],
309
+ uint64_t counter , bool increment_counter ,
310
+ uint8_t flags , uint8_t flags_start ,
311
+ uint8_t flags_end , uint8_t * out ) {
312
312
while (num_inputs >= DEGREE ) {
313
- fd_blake3_hash8_avx2 (inputs , blocks , key , counter , increment_counter , flags ,
314
- flags_start , flags_end , out );
313
+ blake3_hash8_avx2 (inputs , blocks , key , counter , increment_counter , flags ,
314
+ flags_start , flags_end , out );
315
315
if (increment_counter ) {
316
316
counter += DEGREE ;
317
317
}
@@ -320,11 +320,11 @@ void fd_blake3_hash_many_avx2(const uint8_t *const *inputs, size_t num_inputs,
320
320
out = & out [DEGREE * BLAKE3_OUT_LEN ];
321
321
}
322
322
#if FD_HAS_AVX
323
- fd_blake3_hash_many_sse41 (inputs , num_inputs , blocks , key , counter ,
324
- increment_counter , flags , flags_start , flags_end , out );
323
+ blake3_hash_many_sse41 (inputs , num_inputs , blocks , key , counter ,
324
+ increment_counter , flags , flags_start , flags_end , out );
325
325
#else
326
- fd_blake3_hash_many_portable (inputs , num_inputs , blocks , key , counter ,
327
- increment_counter , flags , flags_start , flags_end ,
328
- out );
326
+ blake3_hash_many_portable (inputs , num_inputs , blocks , key , counter ,
327
+ increment_counter , flags , flags_start , flags_end ,
328
+ out );
329
329
#endif
330
330
}
0 commit comments