Skip to content

Commit

Permalink
Sync BLAKE3
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlie committed Dec 31, 2023
1 parent ce03f29 commit 7ea4348
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/belahash/blake3.lock
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/BLAKE3-team/BLAKE3
12823b87604cbb7bcd0e5cdc347a53f80b2a617c
4d32708f511fd85c6b0fb131295cc73224246738
2 changes: 1 addition & 1 deletion src/belahash/blake3/blake3.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extern "C" {
#endif

#define BLAKE3_VERSION_STRING "1.4.1"
#define BLAKE3_VERSION_STRING "1.5.0"
#define BLAKE3_KEY_LEN 32
#define BLAKE3_OUT_LEN 32
#define BLAKE3_BLOCK_LEN 64
Expand Down
6 changes: 3 additions & 3 deletions src/belahash/blake3/blake3_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#define ATOMIC_LOAD(x) x
#define ATOMIC_STORE(x, y) x = y
#elif defined(_MSC_VER)
#define ATOMIC_INT long
#define ATOMIC_LOAD(x) _InterlockedOr(&x, 0)
#define ATOMIC_STORE(x, y) _InterlockedExchange(&x, y)
#define ATOMIC_INT LONG
#define ATOMIC_LOAD(x) InterlockedOr(&x, 0)
#define ATOMIC_STORE(x, y) InterlockedExchange(&x, y)
#else
#define ATOMIC_INT int
#define ATOMIC_LOAD(x) x
Expand Down
6 changes: 5 additions & 1 deletion src/belahash/blake3/blake3_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ enum blake3_flags {
#if !defined(BLAKE3_USE_NEON)
// If BLAKE3_USE_NEON not manually set, autodetect based on AArch64ness
#if defined(IS_AARCH64)
#define BLAKE3_USE_NEON 1
#if defined(__ARM_BIG_ENDIAN)
#define BLAKE3_USE_NEON 0
#else
#define BLAKE3_USE_NEON 1
#endif
#else
#define BLAKE3_USE_NEON 0
#endif
Expand Down

0 comments on commit 7ea4348

Please sign in to comment.