Eigen-Contrib
5.0.1
Loading...
Searching...
No Matches
GpuSparseLLT.h
1
// This file is part of Eigen, a lightweight C++ template library
2
// for linear algebra.
3
//
4
// Copyright (C) 2026 Rasmus Munk Larsen <rmlarsen@gmail.com>
5
//
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
// SPDX-License-Identifier: MPL-2.0
10
11
// GPU sparse Cholesky (LL^T / LL^H) via cuDSS.
12
13
#ifndef EIGEN_GPU_SPARSE_LLT_H
14
#define EIGEN_GPU_SPARSE_LLT_H
15
16
// IWYU pragma: private
17
#include "./InternalHeaderCheck.h"
18
19
#include "./GpuSparseSolverBase.h"
20
21
namespace
Eigen
{
22
namespace
gpu {
23
33
template
<
typename
Scalar_,
int
UpLo_ = Lower>
34
class
SparseLLT :
public
internal::SparseSolverBase
<Scalar_, SparseLLT<Scalar_, UpLo_>> {
35
using
Base =
internal::SparseSolverBase<Scalar_, SparseLLT>
;
36
friend
Base;
37
38
public
:
39
using
Scalar = Scalar_;
40
static
constexpr
int
UpLo = UpLo_;
41
42
SparseLLT() =
default
;
43
46
explicit
SparseLLT
(
Context
& ctx) : Base(ctx) {}
47
48
template
<
typename
InputType>
49
explicit
SparseLLT
(
const
SparseMatrixBase<InputType>
& A) {
50
this->
compute
(A);
51
}
52
54
template
<
typename
InputType>
55
SparseLLT
(
Context
& ctx,
const
SparseMatrixBase<InputType>
& A) : Base(ctx) {
56
this->
compute
(A);
57
}
58
59
static
constexpr
bool
needs_csr_conversion() {
return
false
; }
60
static
constexpr
cudssMatrixType_t cudss_matrix_type() {
return
internal::cudss_spd_type<Scalar>::value; }
61
static
constexpr
cudssMatrixViewType_t cudss_matrix_view() {
62
return
internal::cudss_view_type<UpLo, ColMajor>::value;
63
}
64
};
65
66
}
// namespace gpu
67
}
// namespace Eigen
68
69
#endif
// EIGEN_GPU_SPARSE_LLT_H
Eigen::SparseMatrixBase
Eigen::gpu::Context
Unified GPU execution context owning a CUDA stream and library handles.
Definition
GpuContext.h:81
Eigen::gpu::SparseLLT
Definition
GpuSparseLLT.h:34
Eigen::gpu::SparseLLT::SparseLLT
SparseLLT(Context &ctx)
Definition
GpuSparseLLT.h:46
Eigen::gpu::SparseLLT::SparseLLT
SparseLLT(Context &ctx, const SparseMatrixBase< InputType > &A)
Definition
GpuSparseLLT.h:55
Eigen::gpu::internal::SparseSolverBase
Definition
GpuSparseSolverBase.h:139
Eigen::gpu::internal::SparseSolverBase< Scalar_, SparseLLT< Scalar_, Lower > >::compute
SparseLLT< Scalar_, Lower > & compute(const SparseMatrixBase< InputType > &A)
Definition
GpuSparseSolverBase.h:223
Eigen
Namespace containing all symbols from the Eigen library.
contrib
Eigen
src
GPU
GpuSparseLLT.h
Generated by
1.13.2