/
RAJA_test-forall-execpol.hpp
144 lines (103 loc) · 5.56 KB
/
RAJA_test-forall-execpol.hpp
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC
// and RAJA project contributors. See the RAJA/LICENSE file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//
// Execution policy lists used throughout forall tests
//
#ifndef __RAJA_test_forall_execpol_HPP__
#define __RAJA_test_forall_execpol_HPP__
#include "RAJA/RAJA.hpp"
#include "camp/list.hpp"
// Sequential execution policy types
using SequentialForallExecPols = camp::list< RAJA::seq_exec,
RAJA::simd_exec >;
//
// Sequential execution policy types for reduction and atomic tests.
//
// Note: RAJA::simd_exec does not work with these.
//
using SequentialForallReduceExecPols = camp::list< RAJA::seq_exec >;
using SequentialForallAtomicExecPols = camp::list< RAJA::seq_exec >;
#if defined(RAJA_ENABLE_OPENMP)
using OpenMPForallExecPols =
camp::list< RAJA::omp_parallel_for_exec
, RAJA::omp_parallel_for_static_exec< >
, RAJA::omp_parallel_for_static_exec<4>
#if defined(RAJA_TEST_EXHAUSTIVE)
, RAJA::omp_parallel_for_dynamic_exec< >
, RAJA::omp_parallel_for_dynamic_exec<4>
, RAJA::omp_parallel_for_guided_exec< >
, RAJA::omp_parallel_for_guided_exec<4>
, RAJA::omp_parallel_for_runtime_exec
, RAJA::omp_parallel_exec<RAJA::omp_for_exec>
, RAJA::omp_parallel_exec<RAJA::omp_for_static_exec< >>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Static< >>>
, RAJA::omp_parallel_exec<RAJA::omp_for_static_exec<8>>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Static<8>>>
, RAJA::omp_parallel_exec<RAJA::omp_for_nowait_schedule_exec<RAJA::policy::omp::Static< >>>
, RAJA::omp_parallel_exec<RAJA::omp_for_nowait_static_exec<4>>
, RAJA::omp_parallel_exec<RAJA::omp_for_nowait_schedule_exec<RAJA::policy::omp::Static<4>>>
, RAJA::omp_parallel_exec<RAJA::omp_for_dynamic_exec< >>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Dynamic< >>>
, RAJA::omp_parallel_exec<RAJA::omp_for_dynamic_exec<8>>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Dynamic<8>>>
, RAJA::omp_parallel_exec<RAJA::omp_for_guided_exec< >>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Guided< >>>
, RAJA::omp_parallel_exec<RAJA::omp_for_guided_exec<8>>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Guided<8>>>
, RAJA::omp_parallel_exec<RAJA::omp_for_runtime_exec>
, RAJA::omp_parallel_exec<RAJA::omp_for_schedule_exec<RAJA::policy::omp::Runtime>>
#endif
>;
using OpenMPForallReduceExecPols = OpenMPForallExecPols;
using OpenMPForallAtomicExecPols =
camp::list< RAJA::omp_parallel_for_exec
#if defined(RAJA_TEST_EXHAUSTIVE)
, RAJA::omp_parallel_for_static_exec< >
, RAJA::omp_parallel_for_static_exec<4>
, RAJA::omp_parallel_exec<RAJA::omp_for_nowait_static_exec< >>
, RAJA::omp_parallel_exec<RAJA::omp_for_nowait_static_exec<4>>
, RAJA::omp_parallel_for_dynamic_exec< >
, RAJA::omp_parallel_for_dynamic_exec<2>
, RAJA::omp_parallel_for_guided_exec< >
, RAJA::omp_parallel_for_guided_exec<3>
, RAJA::omp_parallel_for_runtime_exec
#endif
>;
#endif // RAJA_ENABLE_OPENMP
#if defined(RAJA_ENABLE_TARGET_OPENMP)
using OpenMPTargetForallExecPols =
camp::list< RAJA::omp_target_parallel_for_exec<8>,
RAJA::omp_target_parallel_for_exec_nt >;
using OpenMPTargetForallReduceExecPols = OpenMPTargetForallExecPols;
using OpenMPTargetForallAtomicExecPols = OpenMPTargetForallExecPols;
#endif
#if defined(RAJA_ENABLE_CUDA)
using CudaForallExecPols = camp::list< RAJA::cuda_exec<128>,
RAJA::cuda_exec_occ_calc<256>,
RAJA::cuda_exec_grid<256, 64>,
RAJA::cuda_exec_explicit<256,2>,
RAJA::cuda_exec_occ_fraction<256, RAJA::Fraction<size_t,1,2>>,
RAJA::cuda_exec_occ_custom<256, RAJA::CudaAvoidDeviceMaxThreadOccupancyConcretizer> >;
using CudaForallReduceExecPols = CudaForallExecPols;
using CudaForallAtomicExecPols = CudaForallExecPols;
#endif
#if defined(RAJA_ENABLE_HIP)
using HipForallExecPols = camp::list< RAJA::hip_exec<128>,
RAJA::hip_exec_occ_calc<256>,
RAJA::hip_exec_grid<256, 64>,
RAJA::hip_exec_occ_fraction<256, RAJA::Fraction<size_t,1,2>>,
RAJA::hip_exec_occ_custom<256, RAJA::HipAvoidDeviceMaxThreadOccupancyConcretizer> >;
using HipForallReduceExecPols = HipForallExecPols;
using HipForallAtomicExecPols = HipForallExecPols;
#endif
#if defined(RAJA_ENABLE_SYCL)
using SyclForallExecPols = camp::list< RAJA::sycl_exec<128, false>,
RAJA::sycl_exec<256, false> >;
using SyclForallReduceExecPols = SyclForallExecPols;
using SyclForallAtomicExecPols = SyclForallExecPols;
#endif
#endif // __RAJA_test_forall_execpol_HPP__