Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
30374945
Commit
30374945
authored
6 years ago
by
Sam Yates
Committed by
Benjamin Cumming
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Refine gcc version test for FMA work-around. (#573)
Fixes #568.
parent
fd93306a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/arbor/util/compat.hpp
+8
-2
8 additions, 2 deletions
include/arbor/util/compat.hpp
with
8 additions
and
2 deletions
include/arbor/util/compat.hpp
+
8
−
2
View file @
30374945
...
...
@@ -37,10 +37,16 @@ inline void compiler_barrier_if_icc_leq(unsigned ver) {
#endif
}
// Work-around for bad vectorization of fma in gcc version < 8.2
// Work-around for bad vectorization of fma in gcc.
// Bug fixed in 6.4.1, 7.3.1, 8.1.1 and 9.0: refer to gcc bug #85597,
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85597
template
<
typename
T
>
#if defined(__GNUC__) && (100*__GNUC__ + __GNUC_MINOR__ < 802)
#if defined(__GNUC__) &&\
( __GNUC__<6 ||\
(__GNUC__==6 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 401) ||\
(__GNUC__==7 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 301) ||\
(__GNUC__==8 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 101))
__attribute
((
optimize
(
"no-tree-vectorize"
)))
#endif
inline
auto
fma
(
T
a
,
T
b
,
T
c
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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