Skip to content

Commit

Permalink
Fix the error with Hermtian matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Dec 8, 2023
1 parent 006e180 commit 59aed24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function LinearAlgebra.ldlt(A::CuSparseMatrixCSR{T,Cint}) where T <: BlasFloat
n = LinearAlgebra.checksquare(A)
structure = T <: Real ? 'S' : 'H'
solver = CudssSolver(A, structure, 'F')
(T <: Complex) && cudss_set(solver, "pivot_type", 'N')
x = CudssMatrix(T, n)
b = CudssMatrix(T, n)
cudss("analysis", solver, x, b)
Expand Down
1 change: 0 additions & 1 deletion test/test_cudss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ function cudss_generic()
B_gpu = CuMatrix(B_cpu)

solver = ldlt(A_gpu)
(T <: Complex) && cudss_set(solver, "pivot_type", 'N')
ldiv!(X_gpu, solver, B_gpu)
R_gpu = B_gpu - A_gpu * X_gpu
@test norm(R_gpu) eps(R)
Expand Down

0 comments on commit 59aed24

Please sign in to comment.