-
Notifications
You must be signed in to change notification settings - Fork 6
/
alpakaConfig.h
101 lines (83 loc) · 3.48 KB
/
alpakaConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef alpakaConfig_h_
#define alpakaConfig_h_
#include <alpaka/alpaka.hpp>
namespace alpaka_common {
using Dim = alpaka::dim::DimInt<1u>;
using Idx = uint32_t;
using Extent = uint32_t;
using DevHost = alpaka::dev::DevCpu;
using PltfHost = alpaka::pltf::Pltf<DevHost>;
using WorkDiv = alpaka::workdiv::WorkDivMembers<Dim, Idx>;
using Vec = alpaka::vec::Vec<Dim, Idx>;
} // namespace alpaka_common
#ifdef ALPAKA_ACC_GPU_CUDA_ENABLED
#define ALPAKA_ACC_GPU_CUDA_ASYNC_BACKEND
namespace alpaka_cuda_async {
using namespace alpaka_common;
using Acc = alpaka::acc::AccGpuCudaRt<Dim, Extent>;
using DevAcc = alpaka::dev::Dev<Acc>;
using PltfAcc = alpaka::pltf::Pltf<DevAcc>;
using Queue = alpaka::queue::QueueCudaRtNonBlocking;
} // namespace alpaka_cuda_async
#endif // ALPAKA_ACC_GPU_CUDA_ENABLED
#ifdef ALPAKA_ACC_GPU_CUDA_ASYNC_BACKEND
#define ALPAKA_ARCHITECTURE_NAMESPACE alpaka_cuda
#define ALPAKA_ACCELERATOR_NAMESPACE alpaka_cuda_async
#endif // ALPAKA_ACC_GPU_CUDA_ASYNC_BACKEND
#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
#define ALPAKA_ACC_CPU_B_SEQ_T_SEQ_SYNC_BACKEND
namespace alpaka_serial_sync {
using namespace alpaka_common;
using Acc = alpaka::acc::AccCpuSerial<Dim, Extent>;
using DevAcc = alpaka::dev::Dev<Acc>;
using PltfAcc = alpaka::pltf::Pltf<DevAcc>;
using Queue = alpaka::queue::QueueCpuBlocking;
} // namespace alpaka_serial_sync
#endif // ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_SYNC_BACKEND
#define ALPAKA_ARCHITECTURE_NAMESPACE alpaka_cpu
#define ALPAKA_ACCELERATOR_NAMESPACE alpaka_serial_sync
#endif // ALPAKA_ACC_CPU_B_SEQ_T_SEQ_SYNC_BACKEND
#ifdef ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLED
#define ALPAKA_ACC_CPU_B_TBB_T_SEQ_ASYNC_BACKEND
namespace alpaka_tbb_async {
using namespace alpaka_common;
using Acc = alpaka::acc::AccCpuTbbBlocks<Dim, Extent>;
using DevAcc = alpaka::dev::Dev<Acc>;
using PltfAcc = alpaka::pltf::Pltf<DevAcc>;
using Queue = alpaka::queue::QueueCpuNonBlocking;
} // namespace alpaka_tbb_async
#endif // ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLED
#ifdef ALPAKA_ACC_CPU_B_TBB_T_SEQ_ASYNC_BACKEND
#define ALPAKA_ARCHITECTURE_NAMESPACE alpaka_cpu
#define ALPAKA_ACCELERATOR_NAMESPACE alpaka_tbb_async
#endif // ALPAKA_ACC_CPU_B_TBB_T_SEQ_ASYNC_BACKEND
#ifdef ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLED
#define ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ASYNC_BACKEND
namespace alpaka_omp2_async {
using namespace alpaka_common;
using Acc = alpaka::acc::AccCpuOmp2Blocks<Dim, Extent>;
using DevAcc = alpaka::dev::Dev<Acc>;
using PltfAcc = alpaka::pltf::Pltf<DevAcc>;
using Queue = alpaka::queue::QueueCpuNonBlocking;
} // namespace alpaka_omp2_async
#endif // ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLED
#ifdef ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ASYNC_BACKEND
#define ALPAKA_ARCHITECTURE_NAMESPACE alpaka_cpu
#define ALPAKA_ACCELERATOR_NAMESPACE alpaka_omp2_async
#endif // ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ASYNC_BACKEND
#ifdef ALPAKA_ACC_CPU_BT_OMP4_ENABLED
#define ALPAKA_ACC_CPU_BT_OMP4_ASYNC_BACKEND
namespace alpaka_omp4_async {
using namespace alpaka_common;
using Acc = alpaka::acc::AccCpuOmp4<Dim, Extent>;
using DevAcc = alpaka::dev::Dev<Acc>;
using PltfAcc = alpaka::pltf::Pltf<DevAcc>;
using Queue = alpaka::queue::QueueCpuNonBlocking;
} // namespace alpaka_omp4_async
#endif // ALPAKA_ACC_CPU_BT_OMP4_ENABLED
#ifdef ALPAKA_ACC_CPU_BT_OMP4_ASYNC_BACKEND
#define ALPAKA_ARCHITECTURE_NAMESPACE alpaka_cpu
#define ALPAKA_ACCELERATOR_NAMESPACE alpaka_omp4_async
#endif // ALPAKA_ACC_CPU_BT_OMP4_ASYNC_BACKEND
#endif // alpakaConfig_h_