Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simde
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
simde
Commits
7604b37e
Commit
7604b37e
authored
Dec 21, 2020
by
Evan Nemerson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sse, sse2: use ternarylogic on AVX-512VL for NOT functions
parent
175766ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
39 deletions
+51
-39
x86/sse.h
x86/sse.h
+4
-1
x86/sse2.h
x86/sse2.h
+47
-38
No files found.
x86/sse.h
View file @
7604b37e
...
@@ -784,7 +784,10 @@ simde_mm_or_ps (simde__m128 a, simde__m128 b) {
...
@@ -784,7 +784,10 @@ simde_mm_or_ps (simde__m128 a, simde__m128 b) {
SIMDE_FUNCTION_ATTRIBUTES
SIMDE_FUNCTION_ATTRIBUTES
simde__m128
simde__m128
simde_x_mm_not_ps
(
simde__m128
a
)
{
simde_x_mm_not_ps
(
simde__m128
a
)
{
#if defined(SIMDE_X86_SSE2_NATIVE)
#if defined(SIMDE_X86_AVX512VL_NATIVE)
__m128i
ai
=
_mm_castps_si128
(
a
);
return
_mm_castsi128_ps
(
_mm_ternarylogic_epi32
(
ai
,
ai
,
ai
,
0x55
));
#elif defined(SIMDE_X86_SSE2_NATIVE)
/* Note: we use ints instead of floats because we don't want cmpeq
/* Note: we use ints instead of floats because we don't want cmpeq
* to return false for (NaN, NaN) */
* to return false for (NaN, NaN) */
__m128i
ai
=
_mm_castps_si128
(
a
);
__m128i
ai
=
_mm_castps_si128
(
a
);
...
...
x86/sse2.h
View file @
7604b37e
...
@@ -433,6 +433,10 @@ simde_x_mm_abs_pd(simde__m128d a) {
...
@@ -433,6 +433,10 @@ simde_x_mm_abs_pd(simde__m128d a) {
SIMDE_FUNCTION_ATTRIBUTES
SIMDE_FUNCTION_ATTRIBUTES
simde__m128d
simde__m128d
simde_x_mm_not_pd
(
simde__m128d
a
)
{
simde_x_mm_not_pd
(
simde__m128d
a
)
{
#if defined(SIMDE_X86_AVX512VL_NATIVE)
__m128i
ai
=
_mm_castpd_si128
(
a
);
return
_mm_castsi128_pd
(
_mm_ternarylogic_epi64
(
ai
,
ai
,
ai
,
0x55
));
#else
simde__m128d_private
simde__m128d_private
r_
,
r_
,
a_
=
simde__m128d_to_private
(
a
);
a_
=
simde__m128d_to_private
(
a
);
...
@@ -455,6 +459,7 @@ simde_x_mm_not_pd(simde__m128d a) {
...
@@ -455,6 +459,7 @@ simde_x_mm_not_pd(simde__m128d a) {
#endif
#endif
return
simde__m128d_from_private
(
r_
);
return
simde__m128d_from_private
(
r_
);
#endif
}
}
SIMDE_FUNCTION_ATTRIBUTES
SIMDE_FUNCTION_ATTRIBUTES
...
@@ -7290,6 +7295,9 @@ simde_mm_xor_si128 (simde__m128i a, simde__m128i b) {
...
@@ -7290,6 +7295,9 @@ simde_mm_xor_si128 (simde__m128i a, simde__m128i b) {
SIMDE_FUNCTION_ATTRIBUTES
SIMDE_FUNCTION_ATTRIBUTES
simde__m128i
simde__m128i
simde_x_mm_not_si128
(
simde__m128i
a
)
{
simde_x_mm_not_si128
(
simde__m128i
a
)
{
#if defined(SIMDE_X86_AVX512VL_NATIVE)
return
_mm_ternarylogic_epi32
(
a
,
a
,
a
,
0x55
);
#else
simde__m128i_private
simde__m128i_private
r_
,
r_
,
a_
=
simde__m128i_to_private
(
a
);
a_
=
simde__m128i_to_private
(
a
);
...
@@ -7310,6 +7318,7 @@ simde_x_mm_not_si128 (simde__m128i a) {
...
@@ -7310,6 +7318,7 @@ simde_x_mm_not_si128 (simde__m128i a) {
#endif
#endif
return
simde__m128i_from_private
(
r_
);
return
simde__m128i_from_private
(
r_
);
#endif
}
}
#define SIMDE_MM_SHUFFLE2(x, y) (((x) << 1) | (y))
#define SIMDE_MM_SHUFFLE2(x, y) (((x) << 1) | (y))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment