From d5c3861d3fa62757cac7e8b57ea63d7fd6ea2be5 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 26 May 2023 08:56:25 +0200 Subject: [PATCH] Limit to HYPRE_Complex --- src/HYPRE.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HYPRE.jl b/src/HYPRE.jl index 3c665b5..1da8fe6 100644 --- a/src/HYPRE.jl +++ b/src/HYPRE.jl @@ -341,7 +341,7 @@ function subarray_unsafe_supported() # depending on the Julia version. If this is not supported, we have to fall # back to allocation of an intermediate buffer. This logic can be removed if # HYPRE.jl drops support for Julia < 1.9. - return @static Int(VERSION.minor) > 8 || Int(VERSION.major) > 1 + return VERSION >= v"1.9.0" end # TODO: This has some duplicated code with to_hypre_data(::SparseMatrixCSC, ilower, iupper) @@ -546,7 +546,7 @@ function Internals.copy_check(dst::HYPREVector, src::PVector) end # TODO: Other eltypes could be support by using a intermediate buffer -function Base.copy!(dst::PVector, src::HYPREVector) +function Base.copy!(dst::PVector{<:AbstractVector{HYPRE_Complex}}, src::HYPREVector) Internals.copy_check(src, dst) map(own_values(dst), dst.index_partition) do ov, vr o_to_g = own_to_global(vr) @@ -567,7 +567,7 @@ function Base.copy!(dst::PVector, src::HYPREVector) return dst end -function Base.copy!(dst::HYPREVector, src::PVector) +function Base.copy!(dst::HYPREVector, src::PVector{<:AbstractVector{HYPRE_Complex}}) Internals.copy_check(dst, src) # Re-initialize the vector @check HYPRE_IJVectorInitialize(dst)