Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security/nflib: Improve handling of SIMD instructions
PR: 272702
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- include/nfl/arch.hpp.orig 2023-07-24 21:28:33 UTC | ||
+++ include/nfl/arch.hpp | ||
@@ -3,14 +3,10 @@ | ||
|
||
#include "nfl/arch/common.hpp" | ||
|
||
-#ifdef NFL_OPTIMIZED | ||
- | ||
-#if defined __AVX2__ && defined NTT_AVX2 | ||
+#if defined __AVX2__ && defined __SSE4_2__ | ||
#define CC_SIMD nfl::simd::avx2 | ||
-#elif defined __SSE4_2__ && defined NTT_SSE | ||
+#elif defined __SSE4_2__ && !defined __AVX2__ | ||
#define CC_SIMD nfl::simd::sse | ||
-#endif | ||
- | ||
#endif | ||
|
||
#ifndef CC_SIMD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- include/nfl/ops.hpp.orig 2023-07-24 21:30:23 UTC | ||
+++ include/nfl/ops.hpp | ||
@@ -281,18 +281,14 @@ struct _make_op<shoup<type, tag0>, expr<mulmod<type, t | ||
|
||
} // nfl | ||
|
||
-#ifdef NFL_OPTIMIZED | ||
- | ||
#include "nfl/opt/ops.hpp" | ||
|
||
-#if defined __SSE4_2__ && defined NTT_SSE | ||
+#if defined __SSE4_2__ && !defined __AVX2__ | ||
#include "nfl/opt/arch/sse.hpp" | ||
#endif | ||
|
||
-#if defined __AVX2__ && defined NTT_AVX2 | ||
+#if defined __AVX2__ && defined __SSE4_2__ | ||
#include "nfl/opt/arch/avx2.hpp" | ||
-#endif | ||
- | ||
#endif | ||
|
||
#endif |