Skip to content

Commit

Permalink
BLAKE3_FORCE_PORTABLE
Browse files Browse the repository at this point in the history
simple flag to only compile the portable implementation

got the idea from BLAKE3-team#364 (comment)

could name it BLAKE3_PORTABLE instead, maybe, idk
  • Loading branch information
divinity76 authored Mar 16, 2024
1 parent d99ad87 commit 2ae9237
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions c/blake3_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ enum blake3_flags {
DERIVE_KEY_MATERIAL = 1 << 6,
};

#ifdef BLAKE3_FORCE_PORTABLE
#define BLAKE3_NO_SSE2
#define BLAKE3_NO_SSE41
#define BLAKE3_NO_AVX2
#define BLAKE3_NO_AVX512
#define BLAKE3_USE_NEON 0
#endif

// This C implementation tries to support recent versions of GCC, Clang, and
// MSVC.
#if defined(_MSC_VER)
Expand Down

0 comments on commit 2ae9237

Please sign in to comment.