Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
core
src
Teuchos_Behavior.cpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Teuchos: Common Tools Package
4
//
5
// Copyright 2004 NTESS and the Teuchos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef TEUCHOS_BEHAVIOR_HPP
11
#define TEUCHOS_BEHAVIOR_HPP
12
13
#include "
Teuchos_Behavior.hpp
"
14
#include "
Teuchos_EnvVariables.hpp
"
15
#include "
Teuchos_TestForException.hpp
"
16
17
namespace
Teuchos {
18
19
constexpr
const
std::string_view
FENCE_TIMERS
=
"TEUCHOS_FENCE_TIMERS"
;
20
21
constexpr
bool
fenceTimersDefault
() {
22
#ifdef HAVE_TEUCHOS_TIMER_KOKKOS_FENCE
23
return
true
;
24
#else
25
return
false
;
26
#endif // HAVE_TEUCHOS_TIMER_KOKKOS_FENCE
27
}
28
29
30
bool
Behavior::fenceTimers
() {
31
constexpr
bool
defaultValue =
Teuchos::fenceTimersDefault
();
32
33
static
bool
value_ = defaultValue;
34
static
bool
initialized_ =
false
;
35
return
Teuchos::idempotentlyGetEnvironmentVariable
(value_, initialized_,
Teuchos::FENCE_TIMERS
,
36
defaultValue);
37
}
38
39
}
// namespace Teuchos
40
41
#endif
Teuchos::FENCE_TIMERS
constexpr const std::string_view FENCE_TIMERS
Definition:
Teuchos_Behavior.cpp:19
Teuchos::idempotentlyGetEnvironmentVariable
T idempotentlyGetEnvironmentVariable(T &value, bool &initialized, const std::string_view environmentVariableName, const T defaultValue)
Read a variable from the environment. Example usage:
Definition:
Teuchos_EnvVariables.cpp:182
Teuchos_Behavior.hpp
Teuchos::Behavior::fenceTimers
static bool fenceTimers()
Definition:
Teuchos_Behavior.cpp:30
Teuchos::fenceTimersDefault
constexpr bool fenceTimersDefault()
Definition:
Teuchos_Behavior.cpp:21
Teuchos_TestForException.hpp
Standard test and throw macros.
Teuchos_EnvVariables.hpp
Generated on Fri Sep 12 2025 09:20:56 for Teuchos Package Browser (Single Doxygen Collection) by
1.8.5