Loading...
Searching...
No Matches
PriorFreeInverse.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#ifndef GPR_ML_GP_PRIOR_FREE_INVERSE_H_
6#define GPR_ML_GP_PRIOR_FREE_INVERSE_H_
7
8namespace gpr {
9
19inline bool priorFreeReplicatedInverse(bool cholmod, bool scalapack, bool slate,
20 bool unregularized,
21 bool use_hssvd_gradient)
22{
23 if (cholmod || scalapack || slate) return false;
24 return unregularized && !use_hssvd_gradient;
25}
26
34inline bool useDenseFactorForTrace(bool prior_free_inverse,
35 bool use_hssvd_gradient,
36 bool distributed_factor,
37 long long factor_rows, long long factor_cols,
38 long long target_size)
39{
40 return !prior_free_inverse && !use_hssvd_gradient && !distributed_factor &&
41 factor_rows == target_size && factor_cols == target_size &&
42 target_size > 0;
43}
44
45} // namespace gpr
46
47#endif // GPR_ML_GP_PRIOR_FREE_INVERSE_H_
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition Macros.h:16
bool priorFreeReplicatedInverse(bool cholmod, bool scalapack, bool slate, bool unregularized, bool use_hssvd_gradient)
bool useDenseFactorForTrace(bool prior_free_inverse, bool use_hssvd_gradient, bool distributed_factor, long long factor_rows, long long factor_cols, long long target_size)