RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
WorkGroup.hpp
Go to the documentation of this file.
1 
11 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
12 // Copyright (c) Lawrence Livermore National Security, LLC and other
13 // RAJA Project Developers. See top-level LICENSE and COPYRIGHT
14 // files for dates and other details. No copyright assignment is required
15 // to contribute to RAJA.
16 //
17 // SPDX-License-Identifier: (BSD-3-Clause)
18 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
19 
20 #ifndef RAJA_Policy_WorkGroup_HPP
21 #define RAJA_Policy_WorkGroup_HPP
22 
23 #include "RAJA/config.hpp"
24 
26 
28 #include "RAJA/util/plugins.hpp"
29 
30 #include "RAJA/util/concepts.hpp"
31 
32 namespace RAJA
33 {
34 
35 namespace policy
36 {
37 namespace workgroup
38 {
39 
43 struct ordered
44  : RAJA::make_policy_pattern_t<Policy::undefined, Pattern::workgroup_order>
45 {};
46 
52  : RAJA::make_policy_pattern_t<Policy::undefined, Pattern::workgroup_order>
53 {};
54 
58  : RAJA::make_policy_pattern_t<Policy::undefined, Pattern::workgroup_storage>
59 {};
60 
64  : RAJA::make_policy_pattern_t<Policy::undefined, Pattern::workgroup_storage>
65 {};
66 
70  : RAJA::make_policy_pattern_t<Policy::undefined, Pattern::workgroup_storage>
71 {};
72 
75  : RAJA::make_policy_pattern_t<Policy::undefined,
76  Pattern::workgroup_dispatch>
77 {};
78 
81  : RAJA::make_policy_pattern_t<Policy::undefined,
82  Pattern::workgroup_dispatch>
83 {};
84 
90 template<typename... RangeAndCallables>
92  : RAJA::make_policy_pattern_t<Policy::undefined,
93  Pattern::workgroup_dispatch>
94 {};
95 
96 template<typename EXEC_POLICY_T,
97  typename ORDER_POLICY_T,
98  typename STORAGE_POLICY_T,
99  typename DISPATCH_POLICY_T = indirect_function_call_dispatch>
101  policy_of<EXEC_POLICY_T>::value,
102  Pattern::workgroup,
103  platform_of<EXEC_POLICY_T>::value>
104 {
105  static_assert(
107  "WorkGroupPolicy: EXEC_POLICY_T must be a workgroup exec policy");
108  static_assert(
110  "WorkGroupPolicy: ORDER_POLICY_T must be a workgroup order policy");
111  static_assert(
112  RAJA::pattern_is<STORAGE_POLICY_T,
114  "WorkGroupPolicy: STORAGE_POLICY_T must be a workgroup storage policy");
115  static_assert(
116  RAJA::pattern_is<DISPATCH_POLICY_T,
118  "WorkGroupPolicy: DISPATCH_POLICY_T must be a workgroup dispatch policy");
119 };
120 
121 } // end namespace workgroup
122 } // end namespace policy
123 
126 
130 
134 
136 
137 } // end namespace RAJA
138 
139 #endif
Header file for basic RAJA policy mechanics.
Header file for RAJA concept definitions.
Definition: AlignedRangeIndexSetBuilders.cpp:35
Definition: PolicyBase.hpp:75
Definition: PolicyBase.hpp:117
Definition: WorkGroup.hpp:104
Definition: WorkGroup.hpp:59
Definition: WorkGroup.hpp:94
Dispatch using function pointers to make indirect function calls.
Definition: WorkGroup.hpp:77
Dispatch using virtual functions to make indirect function calls.
Definition: WorkGroup.hpp:83
Definition: WorkGroup.hpp:45
Definition: WorkGroup.hpp:53