GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
minimize_request.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
//
5
// The per-thread minimizer request that
6
// gpr_minimize_request_max_inner_steps sets, and the call frame that takes
7
// it. This is internal to the library and its bindings. It is not part of the
8
// C ABI and is not installed.
9
10
#ifndef GPR_CAPI_MINIMIZE_REQUEST_HPP
11
#define GPR_CAPI_MINIMIZE_REQUEST_HPP
12
13
namespace
gpr
{
14
namespace
capi
{
15
namespace
detail {
16
19
int
pending_minimize_request() noexcept;
20
22
int
take_minimize_request() noexcept;
23
38
class MinimizeRequestScope {
39
public
:
40
MinimizeRequestScope() noexcept : max_inner_steps_(take_minimize_request())
41
{
42
}
43
MinimizeRequestScope(
const
MinimizeRequestScope&) =
delete
;
44
MinimizeRequestScope& operator=(
const
MinimizeRequestScope&) =
delete
;
45
47
[[nodiscard]]
int
max_inner_steps() const noexcept
48
{
49
return
max_inner_steps_;
50
}
51
52
private
:
53
int
max_inner_steps_;
54
};
55
56
}
// namespace detail
57
}
// namespace capi
58
}
// namespace gpr
59
60
#endif
gpr::capi
Definition
gpridge.hpp:26
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr
capi
minimize_request.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf