Skip to content

Commit b5c66c2

Browse files
authored
Merge pull request #699 from ComputationalRadiationPhysics/release-0.3.5
0.3.5: Enhance OpenMP atomics performance
2 parents 3097872 + a624b98 commit b5c66c2

File tree

7 files changed

+313
-131
lines changed

7 files changed

+313
-131
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2015-2017 Benjamin Worpitz, Erik Zenker
2+
# Copyright 2015-2018 Benjamin Worpitz, Erik Zenker
33
#
44
# This file is part of alpaka.
55
#
@@ -20,7 +20,6 @@
2020

2121
language: generic
2222
os: linux
23-
sudo: required
2423
dist: trusty
2524
services:
2625
- docker
@@ -34,8 +33,8 @@ services:
3433
# [clang++] ALPAKA_CI_CLANG_VER : {3.5.2, 3.6.2, 3.7.1, 3.8.1, 3.9.1, 4.0.0, 5.0.0}
3534
# CMAKE_BUILD_TYPE : {Debug, Release}
3635
# ALPAKA_CI : {TRAVIS}
37-
# ALPAKA_CI_BOOST_BRANCH : {boost-1.62.0, boost-1.63.0, boost-1.64.0, boost-1.65.1, boost-1.66.0, boost-1.67.0}
38-
# ALPAKA_CI_CMAKE_VER : {3.7.2, 3.8.2, 3.9.6, 3.10.3, 3.11.1}
36+
# ALPAKA_CI_BOOST_BRANCH : {boost-1.62.0, boost-1.63.0, boost-1.64.0, boost-1.65.1, boost-1.66.0, boost-1.67.0, boost-1.68.0}
37+
# ALPAKA_CI_CMAKE_VER : {3.7.2, 3.8.2, 3.9.6, 3.10.3, 3.11.4, 3.12.3}
3938
# ALPAKA_CI_SANITIZERS : {ASan, UBsan, TSan, ESan}
4039
# TSan is not currently used because it produces many unexpected errors
4140
# ALPAKA_CI_ANALYSIS : {ON, OFF}

include/alpaka/acc/AccCpuOmp2Blocks.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <alpaka/idx/bt/IdxBtZero.hpp>
3434
#include <alpaka/atomic/AtomicNoOp.hpp>
3535
#include <alpaka/atomic/AtomicStlLock.hpp>
36-
#include <alpaka/atomic/AtomicOmpCritSec.hpp>
36+
#include <alpaka/atomic/AtomicOmpBuiltIn.hpp>
3737
#include <alpaka/atomic/AtomicHierarchy.hpp>
3838
#include <alpaka/math/MathStl.hpp>
3939
#include <alpaka/block/shared/dyn/BlockSharedMemDynBoostAlignedAlloc.hpp>
@@ -85,7 +85,7 @@ namespace alpaka
8585
public idx::bt::IdxBtZero<TDim, TSize>,
8686
public atomic::AtomicHierarchy<
8787
atomic::AtomicStlLock<16>, // grid atomics
88-
atomic::AtomicOmpCritSec, // block atomics
88+
atomic::AtomicOmpBuiltIn, // block atomics
8989
atomic::AtomicNoOp // thread atomics
9090
>,
9191
public math::MathStl,
@@ -116,7 +116,7 @@ namespace alpaka
116116
idx::bt::IdxBtZero<TDim, TSize>(),
117117
atomic::AtomicHierarchy<
118118
atomic::AtomicStlLock<16>,// atomics between grids
119-
atomic::AtomicOmpCritSec, // atomics between blocks
119+
atomic::AtomicOmpBuiltIn, // atomics between blocks
120120
atomic::AtomicNoOp // atomics between threads
121121
>(),
122122
math::MathStl(),

include/alpaka/acc/AccCpuOmp2Threads.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <alpaka/idx/gb/IdxGbRef.hpp>
3333
#include <alpaka/idx/bt/IdxBtOmp.hpp>
3434
#include <alpaka/atomic/AtomicStlLock.hpp>
35-
#include <alpaka/atomic/AtomicOmpCritSec.hpp>
35+
#include <alpaka/atomic/AtomicOmpBuiltIn.hpp>
3636
#include <alpaka/atomic/AtomicHierarchy.hpp>
3737
#include <alpaka/math/MathStl.hpp>
3838
#include <alpaka/block/shared/dyn/BlockSharedMemDynBoostAlignedAlloc.hpp>
@@ -87,8 +87,8 @@ namespace alpaka
8787
public idx::bt::IdxBtOmp<TDim, TSize>,
8888
public atomic::AtomicHierarchy<
8989
atomic::AtomicStlLock<16>, // grid atomics
90-
atomic::AtomicOmpCritSec, // block atomics
91-
atomic::AtomicOmpCritSec // thread atomics
90+
atomic::AtomicOmpBuiltIn, // block atomics
91+
atomic::AtomicOmpBuiltIn // thread atomics
9292
>,
9393
public math::MathStl,
9494
public block::shared::dyn::BlockSharedMemDynBoostAlignedAlloc,
@@ -118,8 +118,8 @@ namespace alpaka
118118
idx::bt::IdxBtOmp<TDim, TSize>(),
119119
atomic::AtomicHierarchy<
120120
atomic::AtomicStlLock<16>,// atomics between grids
121-
atomic::AtomicOmpCritSec, // atomics between blocks
122-
atomic::AtomicOmpCritSec // atomics between threads
121+
atomic::AtomicOmpBuiltIn, // atomics between blocks
122+
atomic::AtomicOmpBuiltIn // atomics between threads
123123
>(),
124124
math::MathStl(),
125125
block::shared::dyn::BlockSharedMemDynBoostAlignedAlloc(static_cast<std::size_t>(blockSharedMemDynSizeBytes)),

include/alpaka/acc/AccCpuOmp4.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <alpaka/idx/gb/IdxGbRef.hpp>
3333
#include <alpaka/idx/bt/IdxBtOmp.hpp>
3434
#include <alpaka/atomic/AtomicStlLock.hpp>
35-
#include <alpaka/atomic/AtomicOmpCritSec.hpp>
35+
#include <alpaka/atomic/AtomicOmpBuiltIn.hpp>
3636
#include <alpaka/atomic/AtomicHierarchy.hpp>
3737
#include <alpaka/math/MathStl.hpp>
3838
#include <alpaka/block/shared/dyn/BlockSharedMemDynBoostAlignedAlloc.hpp>
@@ -87,8 +87,8 @@ namespace alpaka
8787
public idx::bt::IdxBtOmp<TDim, TSize>,
8888
public atomic::AtomicHierarchy<
8989
atomic::AtomicStlLock<16>, // grid atomics
90-
atomic::AtomicOmpCritSec, // block atomics
91-
atomic::AtomicOmpCritSec // thread atomics
90+
atomic::AtomicOmpBuiltIn, // block atomics
91+
atomic::AtomicOmpBuiltIn // thread atomics
9292
>,
9393
public math::MathStl,
9494
public block::shared::dyn::BlockSharedMemDynBoostAlignedAlloc,
@@ -118,8 +118,8 @@ namespace alpaka
118118
idx::bt::IdxBtOmp<TDim, TSize>(),
119119
atomic::AtomicHierarchy<
120120
atomic::AtomicStlLock<16>,// atomics between grids
121-
atomic::AtomicOmpCritSec, // atomics between blocks
122-
atomic::AtomicOmpCritSec // atomics between threads
121+
atomic::AtomicOmpBuiltIn, // atomics between blocks
122+
atomic::AtomicOmpBuiltIn // atomics between threads
123123
>(),
124124
math::MathStl(),
125125
block::shared::dyn::BlockSharedMemDynBoostAlignedAlloc(static_cast<std::size_t>(blockSharedMemDynSizeBytes)),

include/alpaka/alpaka.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// atomic
4545
#include <alpaka/atomic/AtomicCudaBuiltIn.hpp>
4646
#include <alpaka/atomic/AtomicNoOp.hpp>
47-
#include <alpaka/atomic/AtomicOmpCritSec.hpp>
47+
#include <alpaka/atomic/AtomicOmpBuiltIn.hpp>
4848
#include <alpaka/atomic/AtomicStlLock.hpp>
4949
#include <alpaka/atomic/Op.hpp>
5050
#include <alpaka/atomic/Traits.hpp>

0 commit comments

Comments
 (0)