Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
TurTLE
TurTLE
Commits
2c1d2d22
Commit
2c1d2d22
authored
4 years ago
by
Berenger Bramas
Browse files
Options
Downloads
Patches
Plain Diff
Again try to make the intel compiler happy
parent
5b4d4573
No related branches found
No related tags found
No related merge requests found
Pipeline
#101846
failed
4 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpp/particles/lock_free_bool_array.hpp
+4
-0
4 additions, 0 deletions
cpp/particles/lock_free_bool_array.hpp
with
4 additions
and
0 deletions
cpp/particles/lock_free_bool_array.hpp
+
4
−
0
View file @
2c1d2d22
...
@@ -68,7 +68,11 @@ public:
...
@@ -68,7 +68,11 @@ public:
if
(
k
->
ownerId
.
load
()
!=
omp_get_thread_num
()){
if
(
k
->
ownerId
.
load
()
!=
omp_get_thread_num
()){
int
localBusy
=
Busy
;
// Intel complains if we pass a const as last param
int
localBusy
=
Busy
;
// Intel complains if we pass a const as last param
int
expected
=
Available
;
int
expected
=
Available
;
#ifdef __INTEL_COMPILER
while
(
!
__sync_val_compare_and_swap
(
&
k
->
lock
,
&
expected
,
localBusy
)){
#else
while
(
!
std
::
atomic_compare_exchange_strong
(
&
k
->
lock
,
&
expected
,
localBusy
)){
while
(
!
std
::
atomic_compare_exchange_strong
(
&
k
->
lock
,
&
expected
,
localBusy
)){
#endif
usleep
(
1
);
usleep
(
1
);
expected
=
Available
;
expected
=
Available
;
}
}
...
...
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