RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
include
RAJA
util
CaliperPlugin.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_CaliperPlugin_HPP
11
#define RAJA_CaliperPlugin_HPP
12
13
#include "
RAJA/util/PluginOptions.hpp
"
14
#include "
RAJA/util/PluginStrategy.hpp
"
15
#include <iostream>
16
17
#if defined(RAJA_ENABLE_CALIPER)
18
19
namespace
RAJA
20
{
21
namespace
util
22
{
23
24
// Internal variable to toggle Caliper profiling on and off
25
// Users have access to a global function.
26
inline
bool
RAJA_caliper_profile =
false
;
27
28
// Experimental global function to toggle Caliper
29
// profiling on and off
30
inline
void
SetRAJACaliperProfiling(
bool
enable)
31
{
32
RAJA_caliper_profile = enable;
33
}
34
35
class
CaliperPlugin :
public
::RAJA::util::PluginStrategy
36
{
37
public
:
38
CaliperPlugin();
39
40
void
preLaunch(
const
RAJA::util::PluginContext
& p)
override
;
41
42
void
postLaunch(
const
RAJA::util::PluginContext
& p)
override
;
43
};
44
45
void
linkCaliperPlugin
();
46
47
}
// end namespace util
48
}
// end namespace RAJA
49
50
#endif
51
52
#endif
PluginOptions.hpp
PluginStrategy.hpp
RAJA::util::PluginStrategy
Definition:
PluginStrategy.hpp:23
RAJA::util::linkCaliperPlugin
void linkCaliperPlugin()
Definition:
caliper-plugin.cpp:48
RAJA
Definition:
AlignedRangeIndexSetBuilders.cpp:35
RAJA::util::PluginContext
Definition:
PluginContext.hpp:26
Generated by
1.9.1