Skip to content

Commit

Permalink
Add a function is_supported for MadNLP.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Dec 26, 2024
1 parent d0feaa2 commit 1f3a6dd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "HSL"
uuid = "34c5aeac-e683-54a6-a0e9-6e0fdc586c50"
version = "0.5.0"
version = "0.4.3"

[deps]
HSL_jll = "017b0a0e-03f4-516a-9b91-836bbd1904dd"
Expand Down
26 changes: 26 additions & 0 deletions src/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,29 @@ include("Fortran/hsl_subset/mi24.jl")
include("Fortran/hsl_subset/mi26.jl")
include("Fortran/hsl_subset/ym01.jl")
include("Fortran/hsl_subset/ym11.jl")

# MadNLP
is_supported(::Val{:ma27}, ::DataType) = false
is_supported(::Val{:ma27}, ::Type{Float32}) = true
is_supported(::Val{:ma27}, ::Type{Float64}) = true
is_supported(::Val{:ma27}, ::Type{Float128}) = LIBHSL_version() v"2024.11.28"

is_supported(::Val{:ma57}, ::DataType) = false
is_supported(::Val{:ma57}, ::Type{Float32}) = true
is_supported(::Val{:ma57}, ::Type{Float64}) = true
is_supported(::Val{:ma57}, ::Type{Float128}) = LIBHSL_version() > v"2024.11.28"

is_supported(::Val{:hsl_ma77}, ::DataType) = false
is_supported(::Val{:hsl_ma77}, ::Type{Float32}) = true
is_supported(::Val{:hsl_ma77}, ::Type{Float64}) = true
is_supported(::Val{:hsl_ma77}, ::Type{Float128}) = LIBHSL_version() > v"2024.11.28"

is_supported(::Val{:hsl_ma86}, ::DataType) = false
is_supported(::Val{:hsl_ma86}, ::Type{Float32}) = true
is_supported(::Val{:hsl_ma86}, ::Type{Float64}) = true
is_supported(::Val{:hsl_ma86}, ::Type{Float128}) = LIBHSL_version() > v"2024.11.28"

is_supported(::Val{:hsl_ma97}, ::DataType) = false
is_supported(::Val{:hsl_ma97}, ::Type{Float32}) = true
is_supported(::Val{:hsl_ma97}, ::Type{Float64}) = true
is_supported(::Val{:hsl_ma97}, ::Type{Float128}) = LIBHSL_version() > v"2024.11.28"

0 comments on commit 1f3a6dd

Please sign in to comment.