Eigen-Contrib
5.0.1
Loading...
Searching...
No Matches
GpuSparseLU.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 LU factorization via cuDSS, with pivoting, for general
12
// (non-symmetric) matrices.
13
14
#ifndef EIGEN_GPU_SPARSE_LU_H
15
#define EIGEN_GPU_SPARSE_LU_H
16
17
// IWYU pragma: private
18
#include "./InternalHeaderCheck.h"
19
20
#include "./GpuSparseSolverBase.h"
21
22
namespace
Eigen
{
23
namespace
gpu {
24
33
template
<
typename
Scalar_>
34
class
SparseLU :
public
internal::SparseSolverBase
<Scalar_, SparseLU<Scalar_>> {
35
using
Base =
internal::SparseSolverBase<Scalar_, SparseLU>
;
36
friend
Base;
37
38
public
:
39
using
Scalar = Scalar_;
40
41
SparseLU() =
default
;
42
45
explicit
SparseLU
(
Context
& ctx) : Base(ctx) {}
46
47
template
<
typename
InputType>
48
explicit
SparseLU
(
const
SparseMatrixBase<InputType>
& A) {
49
this->
compute
(A);
50
}
51
53
template
<
typename
InputType>
54
SparseLU
(
Context
& ctx,
const
SparseMatrixBase<InputType>
& A) : Base(ctx) {
55
this->
compute
(A);
56
}
57
58
static
constexpr
bool
needs_csr_conversion() {
return
true
; }
59
static
constexpr
cudssMatrixType_t cudss_matrix_type() {
return
CUDSS_MTYPE_GENERAL; }
60
static
constexpr
cudssMatrixViewType_t cudss_matrix_view() {
return
CUDSS_MVIEW_FULL; }
61
};
62
63
}
// namespace gpu
64
}
// namespace Eigen
65
66
#endif
// EIGEN_GPU_SPARSE_LU_H
Eigen::SparseMatrixBase
Eigen::gpu::Context
Unified GPU execution context owning a CUDA stream and library handles.
Definition
GpuContext.h:81
Eigen::gpu::SparseLU
Definition
GpuSparseLU.h:34
Eigen::gpu::SparseLU::SparseLU
SparseLU(Context &ctx, const SparseMatrixBase< InputType > &A)
Definition
GpuSparseLU.h:54
Eigen::gpu::SparseLU::SparseLU
SparseLU(Context &ctx)
Definition
GpuSparseLU.h:45
Eigen::gpu::internal::SparseSolverBase
Definition
GpuSparseSolverBase.h:139
Eigen::gpu::internal::SparseSolverBase< Scalar_, SparseLU< Scalar_ > >::compute
SparseLU< Scalar_ > & compute(const SparseMatrixBase< InputType > &A)
Definition
GpuSparseSolverBase.h:223
Eigen
Namespace containing all symbols from the Eigen library.
contrib
Eigen
src
GPU
GpuSparseLU.h
Generated by
1.13.2