RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
PluginContext.hpp
Go to the documentation of this file.
1 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
2 // Copyright (c) Lawrence Livermore National Security, LLC and other
3 // RAJA Project Developers. See top-level LICENSE and COPYRIGHT
4 // files for dates and other details. No copyright assignment is required
5 // to contribute to RAJA.
6 //
7 // SPDX-License-Identifier: (BSD-3-Clause)
8 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
9 
10 #ifndef RAJA_plugin_context_HPP
11 #define RAJA_plugin_context_HPP
12 
13 #include <string>
14 
17 
18 namespace RAJA
19 {
20 namespace util
21 {
22 
23 class KokkosPluginLoader;
24 
26 {
27 public:
28  PluginContext(const Platform p, std::string&& name)
29  : platform(p),
30  kernel_name(std::move(name))
31  {}
32 
33  Platform platform;
34  std::string kernel_name;
35 
36 private:
37  mutable uint64_t kID;
38 
39  friend class KokkosPluginLoader;
40 };
41 
42 template<typename Policy>
43 PluginContext make_context(std::string&& name)
44 {
45  return PluginContext {detail::get_platform<Policy>::value, std::move(name)};
46 }
47 
48 } // namespace util
49 } // namespace RAJA
50 
51 #endif
Header file for basic RAJA policy mechanics.
Definition: KokkosPluginLoader.hpp:25
PluginContext make_context(std::string &&name)
Definition: PluginContext.hpp:43
Definition: AlignedRangeIndexSetBuilders.cpp:35
Definition: ListSegment.hpp:416
Definition: get_platform.hpp:42
Definition: PluginContext.hpp:26
Platform platform
Definition: PluginContext.hpp:33
PluginContext(const Platform p, std::string &&name)
Definition: PluginContext.hpp:28
std::string kernel_name
Definition: PluginContext.hpp:34