From 3d589a34b930c0e9cdf77c5787cdf1285a793594 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Tue, 24 Oct 2023 16:22:42 -0500 Subject: [PATCH] Rename the exported functions --- src/ic0.jl | 6 +++--- src/ilu0.jl | 6 +++--- test/gpu/gpu.jl | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ic0.jl b/src/ic0.jl index 612c73b..c79089c 100644 --- a/src/ic0.jl +++ b/src/ic0.jl @@ -1,4 +1,4 @@ -export ic0 +export kp_ic0 mutable struct NVIDIA_IC0{SM,DM} P::SM @@ -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) @@ -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 diff --git a/src/ilu0.jl b/src/ilu0.jl index 8b54eab..38d109d 100644 --- a/src/ilu0.jl +++ b/src/ilu0.jl @@ -1,4 +1,4 @@ -export ilu0 +export kp_ilu0 mutable struct NVIDIA_ILU0{SM,DM} P::SM @@ -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) @@ -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 diff --git a/test/gpu/gpu.jl b/test/gpu/gpu.jl index 293a5a6..7e2ea78 100644 --- a/test/gpu/gpu.jl +++ b/test/gpu/gpu.jl @@ -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 @@ -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