GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
CostModel.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
5
// Operation counts that decide between the dense Cholesky backend and the
6
// preconditioned Krylov backend for one evaluation of the hyperparameter
7
// objective and its gradient. No order cutoff appears: the choice follows
8
// from the order, the cost of one operator action, the noise floor, the
9
// pivot residual curve and the tolerance the optimizer needs.
10
11
#ifndef GPR_LINALG_LINOP_COST_MODEL_H_
12
#define GPR_LINALG_LINOP_COST_MODEL_H_
13
14
#include <Eigen/Core>
15
#include <vector>
16
17
namespace
gpr::linalg::linop
{
18
22
[[nodiscard]]
double
denseObjectiveFlops
(Eigen::Index order,
23
Eigen::Index hyperparameters);
24
25
struct
KrylovObjectiveInputs
{
26
Eigen::Index
order
= 0;
27
Eigen::Index
hyperparameters
= 0;
28
double
matvec_flops
= 0.0;
29
double
column_flops
= 0.0;
30
double
noise_floor
= 0.0;
31
double
relative_tolerance
= 0.0;
32
Eigen::Index
probes
= 0;
34
std::vector<double>
residual_trace
;
35
};
36
37
struct
KrylovPlan
{
38
Eigen::Index
rank
= 0;
39
double
iterations
= 0.0;
40
double
flops
= 0.0;
41
};
42
45
[[nodiscard]]
double
krylovObjectiveFlops
(
const
KrylovObjectiveInputs
& in,
46
Eigen::Index rank);
47
50
[[nodiscard]]
KrylovPlan
planKrylovObjective
(
const
KrylovObjectiveInputs
& in);
51
52
}
// namespace gpr::linalg::linop
53
54
#endif
// GPR_LINALG_LINOP_COST_MODEL_H_
gpr::linalg::linop
Definition
CostModel.cpp:13
gpr::linalg::linop::planKrylovObjective
KrylovPlan planKrylovObjective(const KrylovObjectiveInputs &in)
Definition
CostModel.cpp:49
gpr::linalg::linop::krylovObjectiveFlops
double krylovObjectiveFlops(const KrylovObjectiveInputs &in, Eigen::Index rank)
Definition
CostModel.cpp:26
gpr::linalg::linop::denseObjectiveFlops
double denseObjectiveFlops(Eigen::Index order, Eigen::Index hyperparameters)
Definition
CostModel.cpp:15
gpr::linalg::linop::KrylovObjectiveInputs
Definition
CostModel.h:25
gpr::linalg::linop::KrylovObjectiveInputs::column_flops
double column_flops
one column read while pivoting
Definition
CostModel.h:29
gpr::linalg::linop::KrylovObjectiveInputs::probes
Eigen::Index probes
Definition
CostModel.h:32
gpr::linalg::linop::KrylovObjectiveInputs::noise_floor
double noise_floor
smallest added diagonal entry
Definition
CostModel.h:30
gpr::linalg::linop::KrylovObjectiveInputs::hyperparameters
Eigen::Index hyperparameters
Definition
CostModel.h:27
gpr::linalg::linop::KrylovObjectiveInputs::relative_tolerance
double relative_tolerance
Definition
CostModel.h:31
gpr::linalg::linop::KrylovObjectiveInputs::residual_trace
std::vector< double > residual_trace
Bound on tr(A0 - F_r F_r^T) by rank r = 0, 1, ...
Definition
CostModel.h:34
gpr::linalg::linop::KrylovObjectiveInputs::matvec_flops
double matvec_flops
one operator action on one column
Definition
CostModel.h:28
gpr::linalg::linop::KrylovObjectiveInputs::order
Eigen::Index order
Definition
CostModel.h:26
gpr::linalg::linop::KrylovPlan
Definition
CostModel.h:37
gpr::linalg::linop::KrylovPlan::flops
double flops
Definition
CostModel.h:40
gpr::linalg::linop::KrylovPlan::rank
Eigen::Index rank
Definition
CostModel.h:38
gpr::linalg::linop::KrylovPlan::iterations
double iterations
Definition
CostModel.h:39
gpr
linalg
linop
CostModel.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf