Skip to content

Commit

Permalink
Rename the exported functions
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 24, 2023
1 parent 729b013 commit 3d589a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/ic0.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export ic0
export kp_ic0

mutable struct NVIDIA_IC0{SM,DM}
P::SM
Expand All @@ -8,7 +8,7 @@ end
for (SparseMatrixType, BlasType) in ((:(CuSparseMatrixCSR{T,Cint}), :BlasFloat),
(:(CuSparseMatrixCSC{T,Cint}), :BlasReal))
@eval begin
function ic0(A::$SparseMatrixType; nrhs::Int=1) where T <: $BlasType
function kp_ic0(A::$SparseMatrixType; nrhs::Int=1) where T <: $BlasType
P = CUSPARSE.ic02(A)
n = checksquare(A)
z = nrhs == 1 ? CuVector{T}(undef, n) : CuMatrix{T}(undef, n, nrhs)
Expand Down Expand Up @@ -40,7 +40,7 @@ end
for (SparseMatrixType, BlasType) in ((:(ROCSparseMatrixCSR{T,Cint}), :BlasFloat),
(:(ROCSparseMatrixCSC{T,Cint}), :BlasReal))
@eval begin
function ic0(A::$SparseMatrixType) where T <: $BlasType
function kp_ic0(A::$SparseMatrixType) where T <: $BlasType
P = rocSPARSE.ic0(A, 'O')
return AMD_IC0(P)
end
Expand Down
6 changes: 3 additions & 3 deletions src/ilu0.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export ilu0
export kp_ilu0

mutable struct NVIDIA_ILU0{SM,DM}
P::SM
Expand All @@ -8,7 +8,7 @@ end
for (SparseMatrixType, BlasType) in ((:(CuSparseMatrixCSR{T,Cint}), :BlasFloat),
(:(CuSparseMatrixCSC{T,Cint}), :BlasReal))
@eval begin
function ilu0(A::$SparseMatrixType; nrhs::Int=1) where T <: $BlasType
function kp_ilu0(A::$SparseMatrixType; nrhs::Int=1) where T <: $BlasType
P = CUSPARSE.ilu02(A)
n = checksquare(A)
z = nrhs == 1 ? CuVector{T}(undef, n) : CuMatrix{T}(undef, n, nrhs)
Expand Down Expand Up @@ -40,7 +40,7 @@ end
for (SparseMatrixType, BlasType) in ((:(ROCSparseMatrixCSR{T,Cint}), :BlasFloat),
(:(ROCSparseMatrixCSC{T,Cint}), :BlasReal))
@eval begin
function ilu0(A::$SparseMatrixType) where T <: $BlasType
function kp_ilu0(A::$SparseMatrixType) where T <: $BlasType
P = rocSPARSE.ilu0(A, 'O')
return AMD_ILU0(P)
end
Expand Down
4 changes: 2 additions & 2 deletions test/gpu/gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function test_ic0(FC, V, M)

A_gpu = M(A_cpu)
b_gpu = V(b_cpu)
P = ic0(A_gpu)
P = kp_ic0(A_gpu)

x_gpu, stats = cg(A_gpu, b_gpu, M=P, ldiv=true)
r_gpu = b_gpu - A_gpu * x_gpu
Expand All @@ -30,7 +30,7 @@ function test_ilu0(FC, V, M)

A_gpu = M(A_cpu)
b_gpu = V(b_cpu)
P = ilu0(A_gpu)
P = kp_ilu0(A_gpu)

x_gpu, stats = gmres(A_gpu, b_gpu, N=P, ldiv=true)
r_gpu = b_gpu - A_gpu * x_gpu
Expand Down

0 comments on commit 3d589a3

Please sign in to comment.