Loading...
Searching...
No Matches
LinalgThreads.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2#ifndef GPR_LINALG_LINALG_THREADS_H_
3#define GPR_LINALG_LINALG_THREADS_H_
4
5#include <cstdint>
6#include <optional>
7#include <string_view>
8
9namespace gpr {
10namespace linalg {
11
25
28
32[[nodiscard]] std::uint64_t distributedFactorizationGeneration() noexcept;
33
37
38[[nodiscard]] const char* distributedFactorizationName(
39 DistributedFactorization mode) noexcept;
40
42[[nodiscard]] std::optional<DistributedFactorization>
43parseDistributedFactorization(std::string_view name) noexcept;
44
47[[nodiscard]] int blasThreadCount() noexcept;
48
50[[nodiscard]] int affinityCpuCount() noexcept;
51
53[[nodiscard]] int configuredLinalgThreads() noexcept;
54
64void configureLinalgThreads(int threads);
65
70void configureProductThreads(int threads);
71
76void configureTileThreads(int threads);
77
86void configureLibrarySerialKernels(bool enabled) noexcept;
87
88[[nodiscard]] bool librarySerialKernels() noexcept;
89
95void configureUnconstrainedLibraryReductions(bool enabled) noexcept;
96
97[[nodiscard]] bool unconstrainedLibraryReductions() noexcept;
98
102[[nodiscard]] inline bool teamPanelKernels() noexcept
103{
104#if defined(USE_OPENMP)
106#else
107 return false;
108#endif
109}
110
111} // namespace linalg
112} // namespace gpr
113
114#endif // GPR_LINALG_LINALG_THREADS_H_
Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators,...
int blasThreadCount() noexcept
std::uint64_t distributedFactorizationGeneration() noexcept
bool teamPanelKernels() noexcept
std::optional< DistributedFactorization > parseDistributedFactorization(std::string_view name) noexcept
"reproducible" or "library"; anything else gives no value.
void configureProductThreads(int threads)
void configureLinalgThreads(int threads)
const char * distributedFactorizationName(DistributedFactorization mode) noexcept
bool unconstrainedLibraryReductions() noexcept
bool librarySerialKernels() noexcept
void configureTileThreads(int threads)
DistributedFactorization distributedFactorization() noexcept
Process-wide selection; Reproducible unless configured otherwise.
void configureLibrarySerialKernels(bool enabled) noexcept
int configuredLinalgThreads() noexcept
Requested dense numerical budget, independent of nested BLAS controls.
void configureDistributedFactorization(DistributedFactorization mode)
int affinityCpuCount() noexcept
CPUs in this process's scheduling affinity, or 0 when unknown.
void configureUnconstrainedLibraryReductions(bool enabled) noexcept
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition Macros.h:16
STL namespace.