15#if !defined(GPR_KOKKOS_EXECUTION_KIND) || !defined(GPR_KOKKOS_MEMORY_KIND)
17 "KokkosBackend.h needs GPR_KOKKOS_EXECUTION_KIND and GPR_KOKKOS_MEMORY_KIND from the build"
26 static constexpr const char*
name =
"kokkos";
31 ExecutionKind::GPR_KOKKOS_EXECUTION_KIND;
47 const Eigen::VectorXd& rhs);
49 const Eigen::VectorXd& rhs);
57 const Eigen::VectorXd& prior);
63struct KokkosDeviceFactor;
64inline int kokkosSolverExtent(std::size_t extent)
66 if (extent >
static_cast<std::size_t
>(std::numeric_limits<int>::max()))
67 throw std::overflow_error(
68 "Kokkos factor exceeds the solver integer range");
69 return static_cast<int>(extent);
112 [[nodiscard]] Eigen::Index
order() const noexcept
119 Eigen::VectorXd squaredNorms(
const EigenMatrix& rhs)
const;
122 void resetTransferStats();
123 double halfLogDeterminant()
const;
125 double lowerFrobeniusNorm()
const;
131 double schurRelativeError()
const;
135 explicit KokkosFactor(
const detail::KokkosDeviceFactor& factor);
Vocabulary of the swappable dense linear-algebra backend.
KokkosFactor(const KokkosFactor &)=delete
KokkosFactor & operator=(const KokkosFactor &)=delete
KokkosFactor(const EigenMatrix &factor)
friend class KokkosMolecularPosterior
Eigen::Index order() const noexcept
Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators,...
EigenMatrix back_solve_mat(const EigenMatrix &L, const EigenMatrix &B)
Back triangular solve with matrix RHS (BLAS equivalent: dtrsm with side=L, uplo=L,...
Eigen::VectorXd forward_solve(const EigenMatrix &L, const Eigen::VectorXd &b)
Forward triangular solve with vector RHS (BLAS equivalent: dtrsv).
EigenMatrix forward_solve_mat(const EigenMatrix &L, const EigenMatrix &B)
Forward triangular solve with matrix RHS (BLAS equivalent: dtrsm).
Eigen::VectorXd forward_solve_mat_colwise_squared_norm(const EigenMatrix &L, const EigenMatrix &B)
Forward triangular solve followed by columnwise squared norms.
double log_det_cholesky(const EigenMatrix &L)
Half log-determinant from Cholesky factor.
Eigen::VectorXd back_solve(const EigenMatrix &L, const Eigen::VectorXd &b)
Back triangular solve with vector RHS (BLAS equivalent: dtrsv).
ExecutionKind
Which units run the operation.
double trace_product(const EigenMatrix &A, const EigenMatrix &B)
Frobenius inner product / trace of matrix product.
Eigen::VectorXd bordered_cholesky_diagonal(const EigenMatrix &L, const EigenMatrix &B, const Eigen::VectorXd &prior)
Posterior diagonal from bordered Cholesky pivots.
EigenMatrix cholesky_inverse(const EigenMatrix &L)
Symmetric inverse from Cholesky factor (LAPACK equivalent: dpotri).
bool cholesky(const EigenMatrix &C, EigenMatrix &L)
Cholesky decomposition (LAPACK equivalent: dpotrf).
void resetKokkosTransferAuditStats() noexcept
KokkosTransferAuditStats kokkosTransferAuditStats() noexcept
Eigen::Matrix< double, EigenDynamic, EigenDynamic, EigenMatrixStorage > EigenMatrix
static constexpr ExecutionKind execution
static constexpr MemoryKind memory
static constexpr bool distributed
static constexpr const char * name
static constexpr ArithmeticClass arithmetic
static constexpr bool resident
static constexpr bool retains_factor
Eigen::VectorXd vector_type
KokkosTransferDirectionStats device_to_device
std::size_t max_boundary_to_execution
std::size_t mirror_create_calls
KokkosTransferDirectionStats host_to_host
std::size_t mirror_create_bytes
KokkosTransferDirectionStats device_to_host
std::size_t max_boundary_to_host
KokkosTransferDirectionStats boundary_to_execution
KokkosTransferDirectionStats host_to_device
KokkosTransferDirectionStats boundary_to_host