Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
f4d455ba
Commit
f4d455ba
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Only compile the AVX512 version of meswap if using the Intel compiler.
parent
6e6839c1
No related branches found
No related tags found
1 merge request
!548
AVX512 gcc fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/memswap.h
+5
-3
5 additions, 3 deletions
src/memswap.h
with
5 additions
and
3 deletions
src/memswap.h
+
5
−
3
View file @
f4d455ba
...
...
@@ -49,11 +49,13 @@
*
* Keep in mind that this function only works when the underlying data
* is aligned to the vector length, e.g. with the @c
* __attribute__((aligned(32)))
* syntax!
* __attribute__((aligned(32))) syntax!
* Furthermore, register re-labeling only seems to work when the code is
* compiled with @c -funroll-loops.
*
* Note that GCC (at least until 7.3) produces incorrect AVX512 code here
* by automatically assuming alignment.
*
* @param void_a Pointer to the first element.
* @param void_b Pointer to the second element.
* @param bytes Size, in bytes, of the data pointed to by @c a and @c b.
...
...
@@ -61,7 +63,7 @@
__attribute__
((
always_inline
))
inline
void
memswap
(
void
*
void_a
,
void
*
void_b
,
size_t
bytes
)
{
char
*
a
=
(
char
*
)
void_a
,
*
b
=
(
char
*
)
void_b
;
#ifdef
__AVX512F__
#if
def
ined(
__AVX512F__
) && defined(__INTEL_COMPILER)
swap_loop
(
__m512i
,
a
,
b
,
bytes
);
#endif
#ifdef __AVX__
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment