RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
KokkosPluginLoader.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_Kokkos_Plugin_Loader_HPP
11 #define RAJA_Kokkos_Plugin_Loader_HPP
12 
13 #include <memory>
14 #include <vector>
15 
18 
19 namespace RAJA
20 {
21 namespace util
22 {
23 
25 {
26 public:
28  typedef void (*init_function)(const int,
29  const uint64_t,
30  const uint32_t,
31  void*);
32  typedef void (*pre_function)(const char*, const uint32_t, uint64_t*);
33  typedef void (*post_function)(uint64_t);
34  typedef void (*finalize_function)();
35 
37 
38  void preLaunch(const RAJA::util::PluginContext& p) override;
39 
40  void postLaunch(const RAJA::util::PluginContext& p) override;
41 
42  void finalize() override;
43 
44 private:
45  void initPlugin(const std::string& path);
46 
47  void initDirectory(const std::string& path);
48 
49  std::vector<init_function> init_functions;
50  std::vector<pre_function> pre_functions;
51  std::vector<post_function> post_functions;
52  std::vector<finalize_function> finalize_functions;
53 
54 }; // end KokkosPluginLoader class
55 
57 
58 } // end namespace util
59 } // end namespace RAJA
60 
61 #endif
Definition: KokkosPluginLoader.hpp:25
void preLaunch(const RAJA::util::PluginContext &p) override
Definition: KokkosPluginLoader.cpp:64
void finalize() override
Definition: KokkosPluginLoader.cpp:80
void(* init_function)(const int, const uint64_t, const uint32_t, void *)
Definition: KokkosPluginLoader.hpp:28
void(* post_function)(uint64_t)
Definition: KokkosPluginLoader.hpp:33
void(* finalize_function)()
Definition: KokkosPluginLoader.hpp:34
void(* pre_function)(const char *, const uint32_t, uint64_t *)
Definition: KokkosPluginLoader.hpp:32
KokkosPluginLoader()
Definition: KokkosPluginLoader.cpp:49
void postLaunch(const RAJA::util::PluginContext &p) override
Definition: KokkosPluginLoader.cpp:72
Definition: PluginStrategy.hpp:23
void linkKokkosPluginLoader()
Definition: KokkosPluginLoader.cpp:151
Definition: AlignedRangeIndexSetBuilders.cpp:35
Definition: PluginContext.hpp:26