Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Ifpack2_BlockHelper_Timers.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4 //
5 // Copyright 2009 NTESS and the Ifpack2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef IFPACK2_BLOCKHELPER_TIMERS_HPP
11 #define IFPACK2_BLOCKHELPER_TIMERS_HPP
12 
13 
14 namespace Ifpack2 {
15 
16  namespace BlockHelperDetails {
17 
18 #if defined(HAVE_IFPACK2_BLOCKTRIDICONTAINER_TIMERS)
19 #define IFPACK2_BLOCKHELPER_TIMER(label, varname) TEUCHOS_FUNC_TIME_MONITOR_DIFF(label, varname);
20 #define IFPACK2_BLOCKHELPER_TIMER_FENCE(execution_space) execution_space().fence();
21 #define IFPACK2_BLOCKHELPER_TIMER_DEFAULT_FENCE() Kokkos::DefaultExecutionSpace().fence();
22 #else
23 #define IFPACK2_BLOCKHELPER_TIMER(label, varname)
24 #define IFPACK2_BLOCKHELPER_TIMER_FENCE(execution_space)
25 #define IFPACK2_BLOCKHELPER_TIMER_DEFAULT_FENCE()
26 #endif
27 
28 #define IFPACK2_BLOCKHELPER_TIMER_WITH_FENCE(label, varname, execution_space) \
29  IFPACK2_BLOCKHELPER_TIMER_FENCE(execution_space) \
30  IFPACK2_BLOCKHELPER_TIMER(label, varname)
31 
32  } // namespace BlockHelperDetails
33 
34 } // namespace Ifpack2
35 
36 #endif