LLVM 22.0.0git
|
Go to the source code of this file.
Macros | |
#define | BLAKE3_ATOMICS 0 |
#define | ATOMIC_INT int |
#define | ATOMIC_LOAD(x) |
#define | ATOMIC_STORE(x, y) |
#define | MAYBE_UNUSED(x) |
Enumerations | |
enum | cpu_feature { SSE2 = 1 << 0 , SSSE3 = 1 << 1 , SSE41 = 1 << 2 , AVX = 1 << 3 , AVX2 = 1 << 4 , AVX512F = 1 << 5 , AVX512VL = 1 << 6 , UNDEFINED = 1 << 30 } |
Functions | |
static LLVM_ATTRIBUTE_USED enum cpu_feature | get_cpu_features (void) |
void | blake3_compress_in_place (uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags) |
void | blake3_compress_xof (const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags, uint8_t out[64]) |
void | blake3_xof_many (const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags, uint8_t out[64], size_t outblocks) |
void | blake3_hash_many (const uint8_t *const *inputs, size_t num_inputs, size_t blocks, const uint32_t key[8], uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out) |
size_t | blake3_simd_degree (void) |
Variables | |
static ATOMIC_INT | g_cpu_features = UNDEFINED |
#define ATOMIC_INT int |
Definition at line 42 of file blake3_dispatch.c.
#define ATOMIC_LOAD | ( | x | ) |
#define ATOMIC_STORE | ( | x, | |
y ) |
#define BLAKE3_ATOMICS 0 |
Definition at line 29 of file blake3_dispatch.c.
#define MAYBE_UNUSED | ( | x | ) |
Definition at line 47 of file blake3_dispatch.c.
Referenced by blake3_compress_in_place(), blake3_compress_xof(), blake3_hash_many(), blake3_simd_degree(), and blake3_xof_many().
enum cpu_feature |
Enumerator | |
---|---|
SSE2 | |
SSSE3 | |
SSE41 | |
AVX | |
AVX2 | |
AVX512F | |
AVX512VL | |
UNDEFINED |
Definition at line 94 of file blake3_dispatch.c.
void blake3_compress_in_place | ( | uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags ) |
Definition at line 169 of file blake3_dispatch.c.
References AVX512VL, BLAKE3_BLOCK_LEN, blake3_compress_in_place_avx512, blake3_compress_in_place_portable, blake3_compress_in_place_sse2, blake3_compress_in_place_sse41, block, get_cpu_features(), MAYBE_UNUSED, SSE2, and SSE41.
void blake3_compress_xof | ( | const uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | out[64] ) |
Definition at line 198 of file blake3_dispatch.c.
References AVX512VL, BLAKE3_BLOCK_LEN, blake3_compress_xof_avx512, blake3_compress_xof_portable, blake3_compress_xof_sse2, blake3_compress_xof_sse41, block, get_cpu_features(), MAYBE_UNUSED, SSE2, and SSE41.
void blake3_hash_many | ( | const uint8_t *const * | inputs, |
size_t | num_inputs, | ||
size_t | blocks, | ||
const uint32_t | key[8], | ||
uint64_t | counter, | ||
bool | increment_counter, | ||
uint8_t | flags, | ||
uint8_t | flags_start, | ||
uint8_t | flags_end, | ||
uint8_t * | out ) |
Definition at line 251 of file blake3_dispatch.c.
References AVX2, AVX512F, AVX512VL, blake3_hash_many_avx2, blake3_hash_many_avx512, blake3_hash_many_neon, blake3_hash_many_portable, blake3_hash_many_sse2, blake3_hash_many_sse41, blocks, get_cpu_features(), MAYBE_UNUSED, SSE2, and SSE41.
size_t blake3_simd_degree | ( | void | ) |
Definition at line 304 of file blake3_dispatch.c.
References AVX2, AVX512F, AVX512VL, get_cpu_features(), MAYBE_UNUSED, SSE2, and SSE41.
void blake3_xof_many | ( | const uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | out[64], | ||
size_t | outblocks ) |
Definition at line 228 of file blake3_dispatch.c.
References AVX512VL, BLAKE3_BLOCK_LEN, blake3_compress_xof, blake3_xof_many_avx512, block, get_cpu_features(), and MAYBE_UNUSED.
|
static |
Definition at line 116 of file blake3_dispatch.c.
References ATOMIC_LOAD, ATOMIC_STORE, AVX, AVX2, AVX512F, AVX512VL, g_cpu_features, SSE2, SSE41, SSSE3, and UNDEFINED.
Referenced by blake3_compress_in_place(), blake3_compress_xof(), blake3_hash_many(), blake3_simd_degree(), and blake3_xof_many().
|
static |
Definition at line 109 of file blake3_dispatch.c.
Referenced by get_cpu_features().