From f20d587bfbedbb8fbd0b4a085d3da51f7d92b107 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 26 Dec 2024 12:04:19 +0100 Subject: [PATCH] Add the C interface for hsl_subset --- gen/rewriter.jl | 21 +- src/C/hsl_subset/hsl_ma48.jl | 445 ++++++++++++++++++ src/C/hsl_subset/hsl_ma57.jl | 804 +++++++++++++++++++++++++++++++ src/C/hsl_subset/hsl_ma77.jl | 882 +++++++++++++++++++++++++++++++++++ src/C/hsl_subset/hsl_ma86.jl | 316 +++++++++++++ src/C/hsl_subset/hsl_ma87.jl | 348 ++++++++++++++ src/C/hsl_subset/hsl_ma97.jl | 746 +++++++++++++++++++++++++++++ src/C/hsl_subset/hsl_mc64.jl | 99 ++++ src/C/hsl_subset/hsl_mc68.jl | 47 ++ src/C/hsl_subset/hsl_mi20.jl | 421 +++++++++++++++++ src/C/hsl_subset/hsl_mi28.jl | 222 +++++++++ src/wrappers.jl | 11 + 12 files changed, 4361 insertions(+), 1 deletion(-) create mode 100644 src/C/hsl_subset/hsl_ma48.jl create mode 100644 src/C/hsl_subset/hsl_ma57.jl create mode 100644 src/C/hsl_subset/hsl_ma77.jl create mode 100644 src/C/hsl_subset/hsl_ma86.jl create mode 100644 src/C/hsl_subset/hsl_ma87.jl create mode 100644 src/C/hsl_subset/hsl_ma97.jl create mode 100644 src/C/hsl_subset/hsl_mc64.jl create mode 100644 src/C/hsl_subset/hsl_mc68.jl create mode 100644 src/C/hsl_subset/hsl_mi20.jl create mode 100644 src/C/hsl_subset/hsl_mi28.jl diff --git a/gen/rewriter.jl b/gen/rewriter.jl index ee4c3f7..3858c68 100644 --- a/gen/rewriter.jl +++ b/gen/rewriter.jl @@ -134,6 +134,7 @@ end function hsl_subset_rewrite!(path::String, name::String, optimized::Bool) text = read(path, String) structures = "" + info_structures = Tuple{String, String, Bool}[] if optimized text = replace(text, "struct " => "mutable struct ") text = replace(text, "hsl_longc_" => Int64) @@ -166,6 +167,10 @@ function hsl_subset_rewrite!(path::String, name::String, optimized::Bool) routine = replace(routine, "ipc_" => ipc_) routine = replace(routine, "rpc_" => rpc_) + # Update the type of the structures + routine = replace(routine, "_d}" => "_d{$rpc_,$ipc_}}") + routine = replace(routine, "_i}" => "_i{$rpc_,$ipc_}}") + # Float128 should be passed by value as a Cfloat128 routine = replace(routine, "::Float128" => "::Cfloat128") @@ -173,7 +178,7 @@ function hsl_subset_rewrite!(path::String, name::String, optimized::Bool) end elseif contains(code, "struct") structure = code * "end\n" - structure_name = split(split(code, "struct ")[2], "\n")[1] + structure_name = split(split(code, "struct ")[2], "\n")[1] |> String generic_structure_name = structure_name[1:end-2] |> String generic_structure_name = 'M' * generic_structure_name[2:end] generic_structure_name = replace(generic_structure_name, "_solve_control" => "SolveControl") @@ -186,8 +191,10 @@ function hsl_subset_rewrite!(path::String, name::String, optimized::Bool) structure = replace(structure, "ipc_" => "INT") if !contains(code, "rpc_") structure = replace(structure, structure_name => generic_structure_name * "{INT}") + push!(info_structures, (structure_name, generic_structure_name, false)) else structure = replace(structure, structure_name => generic_structure_name * "{T,INT}") + push!(info_structures, (structure_name, generic_structure_name, true)) end structures = structures * structure * "\n" else @@ -198,6 +205,18 @@ function hsl_subset_rewrite!(path::String, name::String, optimized::Bool) text = structures * "\n" * text startswith(text, '\n') && (text = text[2:end]) + # Rename the structures in the wrappers + for (old_struct, new_struct, bool) in info_structures + if bool + text = replace(text, "Ptr{$old_struct" => "Ref{$new_struct") + else + for precision in ("Float32", "Float64", "Float128") + text = replace(text, "Ptr{$old_struct{$precision,Int32}}" => "Ref{$new_struct{Int32}}") + text = replace(text, "Ptr{$old_struct{$precision,Int64}}" => "Ref{$new_struct{Int64}}") + end + end + end + write(path, text) format_file(path, YASStyle()) end diff --git a/src/C/hsl_subset/hsl_ma48.jl b/src/C/hsl_subset/hsl_ma48.jl new file mode 100644 index 0000000..75cfd7c --- /dev/null +++ b/src/C/hsl_subset/hsl_ma48.jl @@ -0,0 +1,445 @@ +mutable struct Ma48Control{T, INT} + f_arrays::INT + multiplier::T + u::T + switch_::T + drop::T + tolerance::T + cgce::T + lp::INT + wp::INT + mp::INT + ldiag::INT + btf::INT + struct_::INT + maxit::INT + factor_blocking::INT + solve_blas::INT + pivoting::INT + diagonal_pivoting::INT + fill_in::INT + switch_mode::INT +end + +mutable struct Ma48Ainfo{T, INT} + ops::T + flag::INT + more::INT + lena_analyse::Int64 + lenj_analyse::Int64 + lena_factorize::Int64 + leni_factorize::Int64 + ncmpa::INT + rank::INT + drop::Int64 + struc_rank::INT + oor::Int64 + dup::Int64 + stat::INT + lblock::INT + sblock::INT + tblock::Int64 +end + +mutable struct Ma48Finfo{T, INT} + ops::T + flag::INT + more::INT + size_factor::Int64 + lena_factorize::Int64 + leni_factorize::Int64 + drop::Int64 + rank::INT + stat::INT +end + +mutable struct Ma48Sinfo{INT} + flag::INT + more::INT + stat::INT +end + +function ma48_initialize(::Type{Float32}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma48_initialize_s(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_initialize(::Type{Float64}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma48_initialize_d(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_initialize(::Type{Float128}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma48_initialize_q(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_initialize(::Type{Float32}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma48_initialize_s_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_initialize(::Type{Float64}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma48_initialize_d_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_initialize(::Type{Float128}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma48_initialize_q_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma48_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma48_default_control_s(control::Ref{Ma48Control{Float32, Int32}})::Cvoid +end + +function ma48_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma48_default_control_d(control::Ref{Ma48Control{Float64, Int32}})::Cvoid +end + +function ma48_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma48_default_control_q(control::Ref{Ma48Control{Float128, Int32}})::Cvoid +end + +function ma48_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma48_default_control_s_64(control::Ref{Ma48Control{Float32, Int64}})::Cvoid +end + +function ma48_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma48_default_control_d_64(control::Ref{Ma48Control{Float64, Int64}})::Cvoid +end + +function ma48_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma48_default_control_q_64(control::Ref{Ma48Control{Float128, Int64}})::Cvoid +end + +function ma48_analyse(::Type{Float32}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset.ma48_analyse_s(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float32, Int32}}, + ainfo::Ref{Ma48Ainfo{Float32, Int32}}, + finfo::Ref{Ma48Finfo{Float32, Int32}}, perm::Ptr{Int32}, + endcol::Ptr{Int32})::Cvoid +end + +function ma48_analyse(::Type{Float64}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset.ma48_analyse_d(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float64, Int32}}, + ainfo::Ref{Ma48Ainfo{Float64, Int32}}, + finfo::Ref{Ma48Finfo{Float64, Int32}}, perm::Ptr{Int32}, + endcol::Ptr{Int32})::Cvoid +end + +function ma48_analyse(::Type{Float128}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset.ma48_analyse_q(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float128, Int32}}, + ainfo::Ref{Ma48Ainfo{Float128, Int32}}, + finfo::Ref{Ma48Finfo{Float128, Int32}}, perm::Ptr{Int32}, + endcol::Ptr{Int32})::Cvoid +end + +function ma48_analyse(::Type{Float32}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset_64.ma48_analyse_s_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float32, Int64}}, + ainfo::Ref{Ma48Ainfo{Float32, Int64}}, + finfo::Ref{Ma48Finfo{Float32, Int64}}, perm::Ptr{Int64}, + endcol::Ptr{Int64})::Cvoid +end + +function ma48_analyse(::Type{Float64}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset_64.ma48_analyse_d_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float64, Int64}}, + ainfo::Ref{Ma48Ainfo{Float64, Int64}}, + finfo::Ref{Ma48Finfo{Float64, Int64}}, perm::Ptr{Int64}, + endcol::Ptr{Int64})::Cvoid +end + +function ma48_analyse(::Type{Float128}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + ainfo, finfo, perm, endcol) + @ccall libhsl_subset_64.ma48_analyse_q_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float128, Int64}}, + ainfo::Ref{Ma48Ainfo{Float128, Int64}}, + finfo::Ref{Ma48Finfo{Float128, Int64}}, + perm::Ptr{Int64}, + endcol::Ptr{Int64})::Cvoid +end + +function ma48_get_perm(::Type{Float32}, ::Type{Int32}, m, n, factors, perm, control) + @ccall libhsl_subset.ma48_get_perm_s(m::Int32, n::Int32, factors::Ptr{Cvoid}, perm::Ptr{Int32}, + control::Ref{Ma48Control{Float32, Int32}})::Cvoid +end + +function ma48_get_perm(::Type{Float64}, ::Type{Int32}, m, n, factors, perm, control) + @ccall libhsl_subset.ma48_get_perm_d(m::Int32, n::Int32, factors::Ptr{Cvoid}, perm::Ptr{Int32}, + control::Ref{Ma48Control{Float64, Int32}})::Cvoid +end + +function ma48_get_perm(::Type{Float128}, ::Type{Int32}, m, n, factors, perm, control) + @ccall libhsl_subset.ma48_get_perm_q(m::Int32, n::Int32, factors::Ptr{Cvoid}, perm::Ptr{Int32}, + control::Ref{Ma48Control{Float128, Int32}})::Cvoid +end + +function ma48_get_perm(::Type{Float32}, ::Type{Int64}, m, n, factors, perm, control) + @ccall libhsl_subset_64.ma48_get_perm_s_64(m::Int64, n::Int64, factors::Ptr{Cvoid}, + perm::Ptr{Int64}, + control::Ref{Ma48Control{Float32, Int64}})::Cvoid +end + +function ma48_get_perm(::Type{Float64}, ::Type{Int64}, m, n, factors, perm, control) + @ccall libhsl_subset_64.ma48_get_perm_d_64(m::Int64, n::Int64, factors::Ptr{Cvoid}, + perm::Ptr{Int64}, + control::Ref{Ma48Control{Float64, Int64}})::Cvoid +end + +function ma48_get_perm(::Type{Float128}, ::Type{Int64}, m, n, factors, perm, control) + @ccall libhsl_subset_64.ma48_get_perm_q_64(m::Int64, n::Int64, factors::Ptr{Cvoid}, + perm::Ptr{Int64}, + control::Ref{Ma48Control{Float128, Int64}})::Cvoid +end + +function ma48_factorize(::Type{Float32}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset.ma48_factorize_s(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float32, Int32}}, + finfo::Ref{Ma48Finfo{Float32, Int32}}, fast::Int32, + partial::Int32)::Cvoid +end + +function ma48_factorize(::Type{Float64}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset.ma48_factorize_d(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float64, Int32}}, + finfo::Ref{Ma48Finfo{Float64, Int32}}, fast::Int32, + partial::Int32)::Cvoid +end + +function ma48_factorize(::Type{Float128}, ::Type{Int32}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset.ma48_factorize_q(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, + col::Ptr{Int32}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float128, Int32}}, + finfo::Ref{Ma48Finfo{Float128, Int32}}, fast::Int32, + partial::Int32)::Cvoid +end + +function ma48_factorize(::Type{Float32}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset_64.ma48_factorize_s_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float32, Int64}}, + finfo::Ref{Ma48Finfo{Float32, Int64}}, fast::Int64, + partial::Int64)::Cvoid +end + +function ma48_factorize(::Type{Float64}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset_64.ma48_factorize_d_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float64, Int64}}, + finfo::Ref{Ma48Finfo{Float64, Int64}}, fast::Int64, + partial::Int64)::Cvoid +end + +function ma48_factorize(::Type{Float128}, ::Type{Int64}, m, n, ne, row, col, val, factors, control, + finfo, fast, partial) + @ccall libhsl_subset_64.ma48_factorize_q_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, + control::Ref{Ma48Control{Float128, Int64}}, + finfo::Ref{Ma48Finfo{Float128, Int64}}, fast::Int64, + partial::Int64)::Cvoid +end + +function ma48_solve(::Type{Float32}, ::Type{Int32}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset.ma48_solve_s(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, rhs::Ptr{Float32}, + x::Ptr{Float32}, + control::Ref{Ma48Control{Float32, Int32}}, + sinfo::Ref{Ma48Sinfo{Int32}}, trans::Int32, + resid::Ptr{Float32}, error::Ptr{Float32})::Cvoid +end + +function ma48_solve(::Type{Float64}, ::Type{Int32}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset.ma48_solve_d(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, rhs::Ptr{Float64}, + x::Ptr{Float64}, + control::Ref{Ma48Control{Float64, Int32}}, + sinfo::Ref{Ma48Sinfo{Int32}}, trans::Int32, + resid::Ptr{Float64}, error::Ptr{Float64})::Cvoid +end + +function ma48_solve(::Type{Float128}, ::Type{Int32}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset.ma48_solve_q(m::Int32, n::Int32, ne::Int64, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, rhs::Ptr{Float128}, + x::Ptr{Float128}, + control::Ref{Ma48Control{Float128, Int32}}, + sinfo::Ref{Ma48Sinfo{Int32}}, trans::Int32, + resid::Ptr{Float128}, error::Ptr{Float128})::Cvoid +end + +function ma48_solve(::Type{Float32}, ::Type{Int64}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset_64.ma48_solve_s_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float32}, factors::Ptr{Cvoid}, rhs::Ptr{Float32}, + x::Ptr{Float32}, + control::Ref{Ma48Control{Float32, Int64}}, + sinfo::Ref{Ma48Sinfo{Int64}}, trans::Int64, + resid::Ptr{Float32}, error::Ptr{Float32})::Cvoid +end + +function ma48_solve(::Type{Float64}, ::Type{Int64}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset_64.ma48_solve_d_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float64}, factors::Ptr{Cvoid}, rhs::Ptr{Float64}, + x::Ptr{Float64}, + control::Ref{Ma48Control{Float64, Int64}}, + sinfo::Ref{Ma48Sinfo{Int64}}, trans::Int64, + resid::Ptr{Float64}, error::Ptr{Float64})::Cvoid +end + +function ma48_solve(::Type{Float128}, ::Type{Int64}, m, n, ne, row, col, val, factors, rhs, x, + control, sinfo, trans, resid, error) + @ccall libhsl_subset_64.ma48_solve_q_64(m::Int64, n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float128}, factors::Ptr{Cvoid}, + rhs::Ptr{Float128}, x::Ptr{Float128}, + control::Ref{Ma48Control{Float128, Int64}}, + sinfo::Ref{Ma48Sinfo{Int64}}, trans::Int64, + resid::Ptr{Float128}, error::Ptr{Float128})::Cvoid +end + +function ma48_finalize(::Type{Float32}, ::Type{Int32}, factors, control) + @ccall libhsl_subset.ma48_finalize_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float32, Int32}})::Int32 +end + +function ma48_finalize(::Type{Float64}, ::Type{Int32}, factors, control) + @ccall libhsl_subset.ma48_finalize_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float64, Int32}})::Int32 +end + +function ma48_finalize(::Type{Float128}, ::Type{Int32}, factors, control) + @ccall libhsl_subset.ma48_finalize_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float128, Int32}})::Int32 +end + +function ma48_finalize(::Type{Float32}, ::Type{Int64}, factors, control) + @ccall libhsl_subset_64.ma48_finalize_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float32, Int64}})::Int64 +end + +function ma48_finalize(::Type{Float64}, ::Type{Int64}, factors, control) + @ccall libhsl_subset_64.ma48_finalize_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float64, Int64}})::Int64 +end + +function ma48_finalize(::Type{Float128}, ::Type{Int64}, factors, control) + @ccall libhsl_subset_64.ma48_finalize_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma48Control{Float128, Int64}})::Int64 +end + +function ma48_special_rows_and_cols(::Type{Float32}, ::Type{Int32}, factors, rank, rows, cols, + control) + @ccall libhsl_subset.ma48_special_rows_and_cols_s(factors::Ptr{Cvoid}, rank::Ptr{Int32}, + rows::Ptr{Int32}, + cols::Ptr{Int32}, + control::Ref{Ma48Control{Float32, Int32}})::Int32 +end + +function ma48_special_rows_and_cols(::Type{Float64}, ::Type{Int32}, factors, rank, rows, cols, + control) + @ccall libhsl_subset.ma48_special_rows_and_cols_d(factors::Ptr{Cvoid}, rank::Ptr{Int32}, + rows::Ptr{Int32}, + cols::Ptr{Int32}, + control::Ref{Ma48Control{Float64, Int32}})::Int32 +end + +function ma48_special_rows_and_cols(::Type{Float128}, ::Type{Int32}, factors, rank, rows, cols, + control) + @ccall libhsl_subset.ma48_special_rows_and_cols_q(factors::Ptr{Cvoid}, rank::Ptr{Int32}, + rows::Ptr{Int32}, + cols::Ptr{Int32}, + control::Ref{Ma48Control{Float128, Int32}})::Int32 +end + +function ma48_special_rows_and_cols(::Type{Float32}, ::Type{Int64}, factors, rank, rows, cols, + control) + @ccall libhsl_subset_64.ma48_special_rows_and_cols_s_64(factors::Ptr{Cvoid}, rank::Ptr{Int64}, + rows::Ptr{Int64}, + cols::Ptr{Int64}, + control::Ref{Ma48Control{Float32, Int64}})::Int64 +end + +function ma48_special_rows_and_cols(::Type{Float64}, ::Type{Int64}, factors, rank, rows, cols, + control) + @ccall libhsl_subset_64.ma48_special_rows_and_cols_d_64(factors::Ptr{Cvoid}, rank::Ptr{Int64}, + rows::Ptr{Int64}, + cols::Ptr{Int64}, + control::Ref{Ma48Control{Float64, Int64}})::Int64 +end + +function ma48_special_rows_and_cols(::Type{Float128}, ::Type{Int64}, factors, rank, rows, cols, + control) + @ccall libhsl_subset_64.ma48_special_rows_and_cols_q_64(factors::Ptr{Cvoid}, rank::Ptr{Int64}, + rows::Ptr{Int64}, + cols::Ptr{Int64}, + control::Ref{Ma48Control{Float128, Int64}})::Int64 +end + +function ma48_determinant(::Type{Float32}, ::Type{Int32}, factors, sgndet, logdet, control) + @ccall libhsl_subset.ma48_determinant_s(factors::Ptr{Cvoid}, sgndet::Ptr{Int32}, + logdet::Ptr{Float32}, + control::Ref{Ma48Control{Float32, Int32}})::Int32 +end + +function ma48_determinant(::Type{Float64}, ::Type{Int32}, factors, sgndet, logdet, control) + @ccall libhsl_subset.ma48_determinant_d(factors::Ptr{Cvoid}, sgndet::Ptr{Int32}, + logdet::Ptr{Float64}, + control::Ref{Ma48Control{Float64, Int32}})::Int32 +end + +function ma48_determinant(::Type{Float128}, ::Type{Int32}, factors, sgndet, logdet, control) + @ccall libhsl_subset.ma48_determinant_q(factors::Ptr{Cvoid}, sgndet::Ptr{Int32}, + logdet::Ptr{Float128}, + control::Ref{Ma48Control{Float128, Int32}})::Int32 +end + +function ma48_determinant(::Type{Float32}, ::Type{Int64}, factors, sgndet, logdet, control) + @ccall libhsl_subset_64.ma48_determinant_s_64(factors::Ptr{Cvoid}, sgndet::Ptr{Int64}, + logdet::Ptr{Float32}, + control::Ref{Ma48Control{Float32, Int64}})::Int64 +end + +function ma48_determinant(::Type{Float64}, ::Type{Int64}, factors, sgndet, logdet, control) + @ccall libhsl_subset_64.ma48_determinant_d_64(factors::Ptr{Cvoid}, sgndet::Ptr{Int64}, + logdet::Ptr{Float64}, + control::Ref{Ma48Control{Float64, Int64}})::Int64 +end + +function ma48_determinant(::Type{Float128}, ::Type{Int64}, factors, sgndet, logdet, control) + @ccall libhsl_subset_64.ma48_determinant_q_64(factors::Ptr{Cvoid}, sgndet::Ptr{Int64}, + logdet::Ptr{Float128}, + control::Ref{Ma48Control{Float128, Int64}})::Int64 +end diff --git a/src/C/hsl_subset/hsl_ma57.jl b/src/C/hsl_subset/hsl_ma57.jl new file mode 100644 index 0000000..051089f --- /dev/null +++ b/src/C/hsl_subset/hsl_ma57.jl @@ -0,0 +1,804 @@ +mutable struct Ma57Control{T, INT} + f_arrays::INT + multiplier::T + reduce::T + u::T + static_tolerance::T + static_level::T + tolerance::T + convergence::T + consist::T + lp::INT + wp::INT + mp::INT + sp::INT + ldiag::INT + nemin::INT + factorblocking::INT + solveblocking::INT + la::INT + liw::INT + maxla::INT + maxliw::INT + pivoting::INT + thresh::INT + ordering::INT + scaling::INT + rank_deficient::INT + ispare::NTuple{5, INT} + rspare::NTuple{10, T} +end + +mutable struct Ma57Ainfo{T, INT} + opsa::T + opse::T + flag::INT + more::INT + nsteps::INT + nrltot::INT + nirtot::INT + nrlnec::INT + nirnec::INT + nrladu::INT + niradu::INT + ncmpa::INT + ordering::INT + oor::INT + dup::INT + maxfrt::INT + stat::INT + ispare::NTuple{5, INT} + rspare::NTuple{10, T} +end + +mutable struct Ma57Finfo{T, INT} + opsa::T + opse::T + opsb::T + maxchange::T + smin::T + smax::T + flag::INT + more::INT + maxfrt::INT + nebdu::INT + nrlbdu::INT + nirbdu::INT + nrltot::INT + nirtot::INT + nrlnec::INT + nirnec::INT + ncmpbr::INT + ncmpbi::INT + ntwo::INT + neig::INT + delay::INT + signc::INT + static_::INT + modstep::INT + rank::INT + stat::INT + ispare::NTuple{5, INT} + rspare::NTuple{10, T} +end + +mutable struct Ma57Sinfo{T, INT} + cond::T + cond2::T + berr::T + berr2::T + error::T + flag::INT + stat::INT + ispare::NTuple{5, INT} + rspare::NTuple{10, T} +end + +function ma57_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma57_default_control_s(control::Ref{Ma57Control{Float32, Int32}})::Cvoid +end + +function ma57_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma57_default_control_d(control::Ref{Ma57Control{Float64, Int32}})::Cvoid +end + +function ma57_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma57_default_control_q(control::Ref{Ma57Control{Float128, Int32}})::Cvoid +end + +function ma57_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma57_default_control_s_64(control::Ref{Ma57Control{Float32, Int64}})::Cvoid +end + +function ma57_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma57_default_control_d_64(control::Ref{Ma57Control{Float64, Int64}})::Cvoid +end + +function ma57_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma57_default_control_q_64(control::Ref{Ma57Control{Float128, Int64}})::Cvoid +end + +function ma57_init_factors(::Type{Float32}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma57_init_factors_s(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_init_factors(::Type{Float64}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma57_init_factors_d(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_init_factors(::Type{Float128}, ::Type{Int32}, factors) + @ccall libhsl_subset.ma57_init_factors_q(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_init_factors(::Type{Float32}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma57_init_factors_s_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_init_factors(::Type{Float64}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma57_init_factors_d_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_init_factors(::Type{Float128}, ::Type{Int64}, factors) + @ccall libhsl_subset_64.ma57_init_factors_q_64(factors::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma57_analyse(::Type{Float32}, ::Type{Int32}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset.ma57_analyse_s(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + ainfo::Ref{Ma57Ainfo{Float32, Int32}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_analyse(::Type{Float64}, ::Type{Int32}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset.ma57_analyse_d(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + ainfo::Ref{Ma57Ainfo{Float64, Int32}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_analyse(::Type{Float128}, ::Type{Int32}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset.ma57_analyse_q(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + ainfo::Ref{Ma57Ainfo{Float128, Int32}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_analyse(::Type{Float32}, ::Type{Int64}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset_64.ma57_analyse_s_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + ainfo::Ref{Ma57Ainfo{Float32, Int64}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_analyse(::Type{Float64}, ::Type{Int64}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset_64.ma57_analyse_d_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + ainfo::Ref{Ma57Ainfo{Float64, Int64}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_analyse(::Type{Float128}, ::Type{Int64}, n, ne, row, col, factors, control, ainfo, + perm) + @ccall libhsl_subset_64.ma57_analyse_q_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + ainfo::Ref{Ma57Ainfo{Float128, Int64}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_factorize(::Type{Float32}, ::Type{Int32}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset.ma57_factorize_s(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + finfo::Ref{Ma57Finfo{Float32, Int32}})::Cvoid +end + +function ma57_factorize(::Type{Float64}, ::Type{Int32}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset.ma57_factorize_d(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + finfo::Ref{Ma57Finfo{Float64, Int32}})::Cvoid +end + +function ma57_factorize(::Type{Float128}, ::Type{Int32}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset.ma57_factorize_q(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + finfo::Ref{Ma57Finfo{Float128, Int32}})::Cvoid +end + +function ma57_factorize(::Type{Float32}, ::Type{Int64}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset_64.ma57_factorize_s_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float32}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + finfo::Ref{Ma57Finfo{Float32, Int64}})::Cvoid +end + +function ma57_factorize(::Type{Float64}, ::Type{Int64}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset_64.ma57_factorize_d_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float64}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + finfo::Ref{Ma57Finfo{Float64, Int64}})::Cvoid +end + +function ma57_factorize(::Type{Float128}, ::Type{Int64}, n, ne, row, col, val, factors, control, + finfo) + @ccall libhsl_subset_64.ma57_factorize_q_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float128}, + factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + finfo::Ref{Ma57Finfo{Float128, Int64}})::Cvoid +end + +function ma57_solve(::Type{Float32}, ::Type{Int32}, n, ne, row, col, val, factors, nrhs, x, control, + sinfo, rhs, iter, cond) + @ccall libhsl_subset.ma57_solve_s(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int32, x::Ptr{Float32}, + control::Ref{Ma57Control{Float32, Int32}}, + sinfo::Ref{Ma57Sinfo{Float32, Int32}}, rhs::Ptr{Float32}, + iter::Int32, cond::Int32)::Cvoid +end + +function ma57_solve(::Type{Float64}, ::Type{Int32}, n, ne, row, col, val, factors, nrhs, x, control, + sinfo, rhs, iter, cond) + @ccall libhsl_subset.ma57_solve_d(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int32, x::Ptr{Float64}, + control::Ref{Ma57Control{Float64, Int32}}, + sinfo::Ref{Ma57Sinfo{Float64, Int32}}, rhs::Ptr{Float64}, + iter::Int32, cond::Int32)::Cvoid +end + +function ma57_solve(::Type{Float128}, ::Type{Int32}, n, ne, row, col, val, factors, nrhs, x, + control, sinfo, rhs, iter, cond) + @ccall libhsl_subset.ma57_solve_q(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int32, x::Ptr{Float128}, + control::Ref{Ma57Control{Float128, Int32}}, + sinfo::Ref{Ma57Sinfo{Float128, Int32}}, rhs::Ptr{Float128}, + iter::Int32, cond::Int32)::Cvoid +end + +function ma57_solve(::Type{Float32}, ::Type{Int64}, n, ne, row, col, val, factors, nrhs, x, control, + sinfo, rhs, iter, cond) + @ccall libhsl_subset_64.ma57_solve_s_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float32}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int64, x::Ptr{Float32}, + control::Ref{Ma57Control{Float32, Int64}}, + sinfo::Ref{Ma57Sinfo{Float32, Int64}}, rhs::Ptr{Float32}, + iter::Int64, cond::Int64)::Cvoid +end + +function ma57_solve(::Type{Float64}, ::Type{Int64}, n, ne, row, col, val, factors, nrhs, x, control, + sinfo, rhs, iter, cond) + @ccall libhsl_subset_64.ma57_solve_d_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float64}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int64, x::Ptr{Float64}, + control::Ref{Ma57Control{Float64, Int64}}, + sinfo::Ref{Ma57Sinfo{Float64, Int64}}, rhs::Ptr{Float64}, + iter::Int64, cond::Int64)::Cvoid +end + +function ma57_solve(::Type{Float128}, ::Type{Int64}, n, ne, row, col, val, factors, nrhs, x, + control, sinfo, rhs, iter, cond) + @ccall libhsl_subset_64.ma57_solve_q_64(n::Int64, ne::Int64, row::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float128}, + factors::Ptr{Ptr{Cvoid}}, nrhs::Int64, x::Ptr{Float128}, + control::Ref{Ma57Control{Float128, Int64}}, + sinfo::Ref{Ma57Sinfo{Float128, Int64}}, + rhs::Ptr{Float128}, + iter::Int64, cond::Int64)::Cvoid +end + +function ma57_finalize(::Type{Float32}, ::Type{Int32}, factors, control, info) + @ccall libhsl_subset.ma57_finalize_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + info::Ptr{Int32})::Cvoid +end + +function ma57_finalize(::Type{Float64}, ::Type{Int32}, factors, control, info) + @ccall libhsl_subset.ma57_finalize_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + info::Ptr{Int32})::Cvoid +end + +function ma57_finalize(::Type{Float128}, ::Type{Int32}, factors, control, info) + @ccall libhsl_subset.ma57_finalize_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + info::Ptr{Int32})::Cvoid +end + +function ma57_finalize(::Type{Float32}, ::Type{Int64}, factors, control, info) + @ccall libhsl_subset_64.ma57_finalize_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + info::Ptr{Int64})::Cvoid +end + +function ma57_finalize(::Type{Float64}, ::Type{Int64}, factors, control, info) + @ccall libhsl_subset_64.ma57_finalize_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + info::Ptr{Int64})::Cvoid +end + +function ma57_finalize(::Type{Float128}, ::Type{Int64}, factors, control, info) + @ccall libhsl_subset_64.ma57_finalize_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + info::Ptr{Int64})::Cvoid +end + +function ma57_enquire_perm(::Type{Float32}, ::Type{Int32}, control, factors, perm) + @ccall libhsl_subset.ma57_enquire_perm_s(control::Ref{Ma57Control{Float32, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_enquire_perm(::Type{Float64}, ::Type{Int32}, control, factors, perm) + @ccall libhsl_subset.ma57_enquire_perm_d(control::Ref{Ma57Control{Float64, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_enquire_perm(::Type{Float128}, ::Type{Int32}, control, factors, perm) + @ccall libhsl_subset.ma57_enquire_perm_q(control::Ref{Ma57Control{Float128, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int32})::Cvoid +end + +function ma57_enquire_perm(::Type{Float32}, ::Type{Int64}, control, factors, perm) + @ccall libhsl_subset_64.ma57_enquire_perm_s_64(control::Ref{Ma57Control{Float32, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_enquire_perm(::Type{Float64}, ::Type{Int64}, control, factors, perm) + @ccall libhsl_subset_64.ma57_enquire_perm_d_64(control::Ref{Ma57Control{Float64, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_enquire_perm(::Type{Float128}, ::Type{Int64}, control, factors, perm) + @ccall libhsl_subset_64.ma57_enquire_perm_q_64(control::Ref{Ma57Control{Float128, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + perm::Ptr{Int64})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float32}, ::Type{Int32}, control, factors, pivots) + @ccall libhsl_subset.ma57_enquire_pivots_s(control::Ref{Ma57Control{Float32, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int32})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float64}, ::Type{Int32}, control, factors, pivots) + @ccall libhsl_subset.ma57_enquire_pivots_d(control::Ref{Ma57Control{Float64, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int32})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float128}, ::Type{Int32}, control, factors, pivots) + @ccall libhsl_subset.ma57_enquire_pivots_q(control::Ref{Ma57Control{Float128, Int32}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int32})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float32}, ::Type{Int64}, control, factors, pivots) + @ccall libhsl_subset_64.ma57_enquire_pivots_s_64(control::Ref{Ma57Control{Float32, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int64})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float64}, ::Type{Int64}, control, factors, pivots) + @ccall libhsl_subset_64.ma57_enquire_pivots_d_64(control::Ref{Ma57Control{Float64, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int64})::Cvoid +end + +function ma57_enquire_pivots(::Type{Float128}, ::Type{Int64}, control, factors, pivots) + @ccall libhsl_subset_64.ma57_enquire_pivots_q_64(control::Ref{Ma57Control{Float128, Int64}}, + factors::Ptr{Ptr{Cvoid}}, + pivots::Ptr{Int64})::Cvoid +end + +function ma57_enquire_d(::Type{Float32}, ::Type{Int32}, factors, d) + @ccall libhsl_subset.ma57_enquire_d_s(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float32})::Cvoid +end + +function ma57_enquire_d(::Type{Float64}, ::Type{Int32}, factors, d) + @ccall libhsl_subset.ma57_enquire_d_d(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float64})::Cvoid +end + +function ma57_enquire_d(::Type{Float128}, ::Type{Int32}, factors, d) + @ccall libhsl_subset.ma57_enquire_d_q(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float128})::Cvoid +end + +function ma57_enquire_d(::Type{Float32}, ::Type{Int64}, factors, d) + @ccall libhsl_subset_64.ma57_enquire_d_s_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float32})::Cvoid +end + +function ma57_enquire_d(::Type{Float64}, ::Type{Int64}, factors, d) + @ccall libhsl_subset_64.ma57_enquire_d_d_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float64})::Cvoid +end + +function ma57_enquire_d(::Type{Float128}, ::Type{Int64}, factors, d) + @ccall libhsl_subset_64.ma57_enquire_d_q_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float128})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float32}, ::Type{Int32}, factors, perturbation) + @ccall libhsl_subset.ma57_enquire_perturbation_s(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float32})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float64}, ::Type{Int32}, factors, perturbation) + @ccall libhsl_subset.ma57_enquire_perturbation_d(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float64})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float128}, ::Type{Int32}, factors, perturbation) + @ccall libhsl_subset.ma57_enquire_perturbation_q(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float128})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float32}, ::Type{Int64}, factors, perturbation) + @ccall libhsl_subset_64.ma57_enquire_perturbation_s_64(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float32})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float64}, ::Type{Int64}, factors, perturbation) + @ccall libhsl_subset_64.ma57_enquire_perturbation_d_64(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float64})::Cvoid +end + +function ma57_enquire_perturbation(::Type{Float128}, ::Type{Int64}, factors, perturbation) + @ccall libhsl_subset_64.ma57_enquire_perturbation_q_64(factors::Ptr{Ptr{Cvoid}}, + perturbation::Ptr{Float128})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float32}, ::Type{Int32}, factors, scaling) + @ccall libhsl_subset.ma57_enquire_scaling_s(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float32})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float64}, ::Type{Int32}, factors, scaling) + @ccall libhsl_subset.ma57_enquire_scaling_d(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float64})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float128}, ::Type{Int32}, factors, scaling) + @ccall libhsl_subset.ma57_enquire_scaling_q(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float128})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float32}, ::Type{Int64}, factors, scaling) + @ccall libhsl_subset_64.ma57_enquire_scaling_s_64(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float32})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float64}, ::Type{Int64}, factors, scaling) + @ccall libhsl_subset_64.ma57_enquire_scaling_d_64(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float64})::Cvoid +end + +function ma57_enquire_scaling(::Type{Float128}, ::Type{Int64}, factors, scaling) + @ccall libhsl_subset_64.ma57_enquire_scaling_q_64(factors::Ptr{Ptr{Cvoid}}, + scaling::Ptr{Float128})::Cvoid +end + +function ma57_alter_d(::Type{Float32}, ::Type{Int32}, factors, d, info) + @ccall libhsl_subset.ma57_alter_d_s(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float32}, + info::Ptr{Int32})::Cvoid +end + +function ma57_alter_d(::Type{Float64}, ::Type{Int32}, factors, d, info) + @ccall libhsl_subset.ma57_alter_d_d(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float64}, + info::Ptr{Int32})::Cvoid +end + +function ma57_alter_d(::Type{Float128}, ::Type{Int32}, factors, d, info) + @ccall libhsl_subset.ma57_alter_d_q(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float128}, + info::Ptr{Int32})::Cvoid +end + +function ma57_alter_d(::Type{Float32}, ::Type{Int64}, factors, d, info) + @ccall libhsl_subset_64.ma57_alter_d_s_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float32}, + info::Ptr{Int64})::Cvoid +end + +function ma57_alter_d(::Type{Float64}, ::Type{Int64}, factors, d, info) + @ccall libhsl_subset_64.ma57_alter_d_d_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float64}, + info::Ptr{Int64})::Cvoid +end + +function ma57_alter_d(::Type{Float128}, ::Type{Int64}, factors, d, info) + @ccall libhsl_subset_64.ma57_alter_d_q_64(factors::Ptr{Ptr{Cvoid}}, d::Ptr{Float128}, + info::Ptr{Int64})::Cvoid +end + +function ma57_part_solve(::Type{Float32}, ::Type{Int32}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset.ma57_part_solve_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + part::Cchar, nrhs::Int32, x::Ptr{Float32}, + info::Ptr{Int32})::Cvoid +end + +function ma57_part_solve(::Type{Float64}, ::Type{Int32}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset.ma57_part_solve_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + part::Cchar, nrhs::Int32, x::Ptr{Float64}, + info::Ptr{Int32})::Cvoid +end + +function ma57_part_solve(::Type{Float128}, ::Type{Int32}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset.ma57_part_solve_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + part::Cchar, nrhs::Int32, x::Ptr{Float128}, + info::Ptr{Int32})::Cvoid +end + +function ma57_part_solve(::Type{Float32}, ::Type{Int64}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset_64.ma57_part_solve_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + part::Cchar, nrhs::Int64, x::Ptr{Float32}, + info::Ptr{Int64})::Cvoid +end + +function ma57_part_solve(::Type{Float64}, ::Type{Int64}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset_64.ma57_part_solve_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + part::Cchar, nrhs::Int64, x::Ptr{Float64}, + info::Ptr{Int64})::Cvoid +end + +function ma57_part_solve(::Type{Float128}, ::Type{Int64}, factors, control, part, nrhs, x, info) + @ccall libhsl_subset_64.ma57_part_solve_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + part::Cchar, nrhs::Int64, x::Ptr{Float128}, + info::Ptr{Int64})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float32}, ::Type{Int32}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset.ma57_sparse_lsolve_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + nzrhs::Int32, irhs::Ptr{Int32}, nzsoln::Ptr{Int32}, + isoln::Ptr{Int32}, x::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int32}})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float64}, ::Type{Int32}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset.ma57_sparse_lsolve_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + nzrhs::Int32, irhs::Ptr{Int32}, nzsoln::Ptr{Int32}, + isoln::Ptr{Int32}, x::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int32}})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float128}, ::Type{Int32}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset.ma57_sparse_lsolve_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + nzrhs::Int32, irhs::Ptr{Int32}, nzsoln::Ptr{Int32}, + isoln::Ptr{Int32}, x::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int32}})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float32}, ::Type{Int64}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset_64.ma57_sparse_lsolve_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + nzrhs::Int64, irhs::Ptr{Int64}, + nzsoln::Ptr{Int64}, + isoln::Ptr{Int64}, x::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int64}})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float64}, ::Type{Int64}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset_64.ma57_sparse_lsolve_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + nzrhs::Int64, irhs::Ptr{Int64}, + nzsoln::Ptr{Int64}, + isoln::Ptr{Int64}, x::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int64}})::Cvoid +end + +function ma57_sparse_lsolve(::Type{Float128}, ::Type{Int64}, factors, control, nzrhs, irhs, nzsoln, + isoln, x, sinfo) + @ccall libhsl_subset_64.ma57_sparse_lsolve_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + nzrhs::Int64, irhs::Ptr{Int64}, + nzsoln::Ptr{Int64}, + isoln::Ptr{Int64}, x::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int64}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float32}, ::Type{Int32}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset.ma57_fredholm_alternative_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + x::Ptr{Float32}, fredx::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int32}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float64}, ::Type{Int32}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset.ma57_fredholm_alternative_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + x::Ptr{Float64}, fredx::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int32}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float128}, ::Type{Int32}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset.ma57_fredholm_alternative_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + x::Ptr{Float128}, fredx::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int32}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float32}, ::Type{Int64}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset_64.ma57_fredholm_alternative_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + x::Ptr{Float32}, fredx::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int64}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float64}, ::Type{Int64}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset_64.ma57_fredholm_alternative_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + x::Ptr{Float64}, fredx::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int64}})::Cvoid +end + +function ma57_fredholm_alternative(::Type{Float128}, ::Type{Int64}, factors, control, x, fredx, + sinfo) + @ccall libhsl_subset_64.ma57_fredholm_alternative_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + x::Ptr{Float128}, fredx::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int64}})::Cvoid +end + +function ma57_lmultiply(::Type{Float32}, ::Type{Int32}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset.ma57_lmultiply_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + trans::Cchar, x::Ptr{Float32}, y::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int32}})::Cvoid +end + +function ma57_lmultiply(::Type{Float64}, ::Type{Int32}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset.ma57_lmultiply_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + trans::Cchar, x::Ptr{Float64}, y::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int32}})::Cvoid +end + +function ma57_lmultiply(::Type{Float128}, ::Type{Int32}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset.ma57_lmultiply_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + trans::Cchar, x::Ptr{Float128}, y::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int32}})::Cvoid +end + +function ma57_lmultiply(::Type{Float32}, ::Type{Int64}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset_64.ma57_lmultiply_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + trans::Cchar, x::Ptr{Float32}, y::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int64}})::Cvoid +end + +function ma57_lmultiply(::Type{Float64}, ::Type{Int64}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset_64.ma57_lmultiply_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + trans::Cchar, x::Ptr{Float64}, y::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int64}})::Cvoid +end + +function ma57_lmultiply(::Type{Float128}, ::Type{Int64}, factors, control, trans, x, y, sinfo) + @ccall libhsl_subset_64.ma57_lmultiply_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + trans::Cchar, x::Ptr{Float128}, y::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int64}})::Cvoid +end + +function ma57_get_factors(::Type{Float32}, ::Type{Int32}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset.ma57_get_factors_s(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int32}}, + nzl::Ptr{Int32}, iptrl::Ptr{Int32}, lrows::Ptr{Int32}, + lvals::Ptr{Float32}, nzd::Ptr{Int32}, iptrd::Ptr{Int32}, + drows::Ptr{Int32}, dvals::Ptr{Float32}, perm::Ptr{Int32}, + invperm::Ptr{Int32}, scale::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int32}})::Cvoid +end + +function ma57_get_factors(::Type{Float64}, ::Type{Int32}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset.ma57_get_factors_d(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int32}}, + nzl::Ptr{Int32}, iptrl::Ptr{Int32}, lrows::Ptr{Int32}, + lvals::Ptr{Float64}, nzd::Ptr{Int32}, iptrd::Ptr{Int32}, + drows::Ptr{Int32}, dvals::Ptr{Float64}, perm::Ptr{Int32}, + invperm::Ptr{Int32}, scale::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int32}})::Cvoid +end + +function ma57_get_factors(::Type{Float128}, ::Type{Int32}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset.ma57_get_factors_q(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int32}}, + nzl::Ptr{Int32}, iptrl::Ptr{Int32}, lrows::Ptr{Int32}, + lvals::Ptr{Float128}, nzd::Ptr{Int32}, iptrd::Ptr{Int32}, + drows::Ptr{Int32}, dvals::Ptr{Float128}, perm::Ptr{Int32}, + invperm::Ptr{Int32}, scale::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int32}})::Cvoid +end + +function ma57_get_factors(::Type{Float32}, ::Type{Int64}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset_64.ma57_get_factors_s_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float32, Int64}}, + nzl::Ptr{Int64}, iptrl::Ptr{Int64}, + lrows::Ptr{Int64}, + lvals::Ptr{Float32}, nzd::Ptr{Int64}, + iptrd::Ptr{Int64}, + drows::Ptr{Int64}, dvals::Ptr{Float32}, + perm::Ptr{Int64}, + invperm::Ptr{Int64}, scale::Ptr{Float32}, + sinfo::Ref{Ma57Sinfo{Float32, Int64}})::Cvoid +end + +function ma57_get_factors(::Type{Float64}, ::Type{Int64}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset_64.ma57_get_factors_d_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float64, Int64}}, + nzl::Ptr{Int64}, iptrl::Ptr{Int64}, + lrows::Ptr{Int64}, + lvals::Ptr{Float64}, nzd::Ptr{Int64}, + iptrd::Ptr{Int64}, + drows::Ptr{Int64}, dvals::Ptr{Float64}, + perm::Ptr{Int64}, + invperm::Ptr{Int64}, scale::Ptr{Float64}, + sinfo::Ref{Ma57Sinfo{Float64, Int64}})::Cvoid +end + +function ma57_get_factors(::Type{Float128}, ::Type{Int64}, factors, control, nzl, iptrl, lrows, + lvals, nzd, iptrd, drows, dvals, + perm, invperm, scale, sinfo) + @ccall libhsl_subset_64.ma57_get_factors_q_64(factors::Ptr{Ptr{Cvoid}}, + control::Ref{Ma57Control{Float128, Int64}}, + nzl::Ptr{Int64}, iptrl::Ptr{Int64}, + lrows::Ptr{Int64}, + lvals::Ptr{Float128}, nzd::Ptr{Int64}, + iptrd::Ptr{Int64}, + drows::Ptr{Int64}, dvals::Ptr{Float128}, + perm::Ptr{Int64}, + invperm::Ptr{Int64}, scale::Ptr{Float128}, + sinfo::Ref{Ma57Sinfo{Float128, Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_ma77.jl b/src/C/hsl_subset/hsl_ma77.jl new file mode 100644 index 0000000..15971cd --- /dev/null +++ b/src/C/hsl_subset/hsl_ma77.jl @@ -0,0 +1,882 @@ +mutable struct Ma77Control{T, INT} + f_arrays::INT + print_level::INT + unit_diagnostics::INT + unit_error::INT + unit_warning::INT + bits::INT + buffer_lpage::NTuple{2, INT} + buffer_npage::NTuple{2, INT} + file_size::Int64 + maxstore::Int64 + storage::NTuple{3, Int64} + nemin::INT + maxit::INT + infnorm::INT + thresh::T + nb54::INT + action::INT + multiplier::T + nb64::INT + nbi::INT + small::T + static_::T + storage_indef::Int64 + u::T + umin::T + consist_tol::T + ispare::NTuple{5, INT} + lspare::NTuple{5, Int64} + rspare::NTuple{5, T} +end + +mutable struct Ma77Info{T, INT} + detlog::T + detsign::INT + flag::INT + iostat::INT + matrix_dup::INT + matrix_rank::INT + matrix_outrange::INT + maxdepth::INT + maxfront::INT + minstore::Int64 + ndelay::INT + nfactor::Int64 + nflops::Int64 + niter::INT + nsup::INT + num_neg::INT + num_nothresh::INT + num_perturbed::INT + ntwo::INT + stat::INT + index::NTuple{4, INT} + nio_read::NTuple{2, Int64} + nio_write::NTuple{2, Int64} + nwd_read::NTuple{2, Int64} + nwd_write::NTuple{2, Int64} + num_file::NTuple{4, INT} + storage::NTuple{4, Int64} + tree_nodes::INT + unit_restart::INT + unused::INT + usmall::T + ispare::NTuple{5, INT} + lspare::NTuple{5, Int64} + rspare::NTuple{5, T} +end + +function ma77_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma77_default_control_s(control::Ref{Ma77Control{Float32, Int32}})::Cvoid +end + +function ma77_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma77_default_control_d(control::Ref{Ma77Control{Float64, Int32}})::Cvoid +end + +function ma77_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma77_default_control_q(control::Ref{Ma77Control{Float128, Int32}})::Cvoid +end + +function ma77_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma77_default_control_s_64(control::Ref{Ma77Control{Float32, Int64}})::Cvoid +end + +function ma77_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma77_default_control_d_64(control::Ref{Ma77Control{Float64, Int64}})::Cvoid +end + +function ma77_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma77_default_control_q_64(control::Ref{Ma77Control{Float128, Int64}})::Cvoid +end + +function ma77_open_nelt(::Type{Float32}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset.ma77_open_nelt_s(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + nelt::Int32)::Cvoid +end + +function ma77_open_nelt(::Type{Float64}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset.ma77_open_nelt_d(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + nelt::Int32)::Cvoid +end + +function ma77_open_nelt(::Type{Float128}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset.ma77_open_nelt_q(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + nelt::Int32)::Cvoid +end + +function ma77_open_nelt(::Type{Float32}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset_64.ma77_open_nelt_s_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + nelt::Int64)::Cvoid +end + +function ma77_open_nelt(::Type{Float64}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset_64.ma77_open_nelt_d_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + nelt::Int64)::Cvoid +end + +function ma77_open_nelt(::Type{Float128}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, + control, info, nelt) + @ccall libhsl_subset_64.ma77_open_nelt_q_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + nelt::Int64)::Cvoid +end + +function ma77_open(::Type{Float32}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, control, + info) + @ccall libhsl_subset.ma77_open_s(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_open(::Type{Float64}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, control, + info) + @ccall libhsl_subset.ma77_open_d(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_open(::Type{Float128}, ::Type{Int32}, n, fname1, fname2, fname3, fname4, keep, + control, info) + @ccall libhsl_subset.ma77_open_q(n::Int32, fname1::Cstring, fname2::Cstring, fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_open(::Type{Float32}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, control, + info) + @ccall libhsl_subset_64.ma77_open_s_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_open(::Type{Float64}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, control, + info) + @ccall libhsl_subset_64.ma77_open_d_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_open(::Type{Float128}, ::Type{Int64}, n, fname1, fname2, fname3, fname4, keep, + control, info) + @ccall libhsl_subset_64.ma77_open_q_64(n::Int64, fname1::Cstring, fname2::Cstring, + fname3::Cstring, + fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_input_vars(::Type{Float32}, ::Type{Int32}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset.ma77_input_vars_s(idx::Int32, nvar::Int32, list::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_input_vars(::Type{Float64}, ::Type{Int32}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset.ma77_input_vars_d(idx::Int32, nvar::Int32, list::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_input_vars(::Type{Float128}, ::Type{Int32}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset.ma77_input_vars_q(idx::Int32, nvar::Int32, list::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_input_vars(::Type{Float32}, ::Type{Int64}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset_64.ma77_input_vars_s_64(idx::Int64, nvar::Int64, list::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_input_vars(::Type{Float64}, ::Type{Int64}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset_64.ma77_input_vars_d_64(idx::Int64, nvar::Int64, list::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_input_vars(::Type{Float128}, ::Type{Int64}, idx, nvar, list, keep, control, info) + @ccall libhsl_subset_64.ma77_input_vars_q_64(idx::Int64, nvar::Int64, list::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_input_reals(::Type{Float32}, ::Type{Int32}, idx, length, reals, keep, control, info) + @ccall libhsl_subset.ma77_input_reals_s(idx::Int32, length::Int32, reals::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_input_reals(::Type{Float64}, ::Type{Int32}, idx, length, reals, keep, control, info) + @ccall libhsl_subset.ma77_input_reals_d(idx::Int32, length::Int32, reals::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_input_reals(::Type{Float128}, ::Type{Int32}, idx, length, reals, keep, control, info) + @ccall libhsl_subset.ma77_input_reals_q(idx::Int32, length::Int32, reals::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_input_reals(::Type{Float32}, ::Type{Int64}, idx, length, reals, keep, control, info) + @ccall libhsl_subset_64.ma77_input_reals_s_64(idx::Int64, length::Int64, reals::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_input_reals(::Type{Float64}, ::Type{Int64}, idx, length, reals, keep, control, info) + @ccall libhsl_subset_64.ma77_input_reals_d_64(idx::Int64, length::Int64, reals::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_input_reals(::Type{Float128}, ::Type{Int64}, idx, length, reals, keep, control, info) + @ccall libhsl_subset_64.ma77_input_reals_q_64(idx::Int64, length::Int64, reals::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_analyse(::Type{Float32}, ::Type{Int32}, order, keep, control, info) + @ccall libhsl_subset.ma77_analyse_s(order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_analyse(::Type{Float64}, ::Type{Int32}, order, keep, control, info) + @ccall libhsl_subset.ma77_analyse_d(order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_analyse(::Type{Float128}, ::Type{Int32}, order, keep, control, info) + @ccall libhsl_subset.ma77_analyse_q(order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_analyse(::Type{Float32}, ::Type{Int64}, order, keep, control, info) + @ccall libhsl_subset_64.ma77_analyse_s_64(order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_analyse(::Type{Float64}, ::Type{Int64}, order, keep, control, info) + @ccall libhsl_subset_64.ma77_analyse_d_64(order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_analyse(::Type{Float128}, ::Type{Int64}, order, keep, control, info) + @ccall libhsl_subset_64.ma77_analyse_q_64(order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_factor(::Type{Float32}, ::Type{Int32}, posdef, keep, control, info, scale) + @ccall libhsl_subset.ma77_factor_s(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_factor(::Type{Float64}, ::Type{Int32}, posdef, keep, control, info, scale) + @ccall libhsl_subset.ma77_factor_d(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_factor(::Type{Float128}, ::Type{Int32}, posdef, keep, control, info, scale) + @ccall libhsl_subset.ma77_factor_q(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_factor(::Type{Float32}, ::Type{Int64}, posdef, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_factor_s_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_factor(::Type{Float64}, ::Type{Int64}, posdef, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_factor_d_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_factor(::Type{Float128}, ::Type{Int64}, posdef, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_factor_q_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_factor_solve(::Type{Float32}, ::Type{Int32}, posdef, keep, control, info, scale, nrhs, + lx, rhs) + @ccall libhsl_subset.ma77_factor_solve_s(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + scale::Ptr{Float32}, nrhs::Int32, lx::Int32, + rhs::Ptr{Float32})::Cvoid +end + +function ma77_factor_solve(::Type{Float64}, ::Type{Int32}, posdef, keep, control, info, scale, nrhs, + lx, rhs) + @ccall libhsl_subset.ma77_factor_solve_d(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + scale::Ptr{Float64}, nrhs::Int32, lx::Int32, + rhs::Ptr{Float64})::Cvoid +end + +function ma77_factor_solve(::Type{Float128}, ::Type{Int32}, posdef, keep, control, info, scale, + nrhs, lx, rhs) + @ccall libhsl_subset.ma77_factor_solve_q(posdef::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + scale::Ptr{Float128}, nrhs::Int32, lx::Int32, + rhs::Ptr{Float128})::Cvoid +end + +function ma77_factor_solve(::Type{Float32}, ::Type{Int64}, posdef, keep, control, info, scale, nrhs, + lx, rhs) + @ccall libhsl_subset_64.ma77_factor_solve_s_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + scale::Ptr{Float32}, nrhs::Int64, lx::Int64, + rhs::Ptr{Float32})::Cvoid +end + +function ma77_factor_solve(::Type{Float64}, ::Type{Int64}, posdef, keep, control, info, scale, nrhs, + lx, rhs) + @ccall libhsl_subset_64.ma77_factor_solve_d_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + scale::Ptr{Float64}, nrhs::Int64, lx::Int64, + rhs::Ptr{Float64})::Cvoid +end + +function ma77_factor_solve(::Type{Float128}, ::Type{Int64}, posdef, keep, control, info, scale, + nrhs, lx, rhs) + @ccall libhsl_subset_64.ma77_factor_solve_q_64(posdef::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + scale::Ptr{Float128}, nrhs::Int64, lx::Int64, + rhs::Ptr{Float128})::Cvoid +end + +function ma77_solve(::Type{Float32}, ::Type{Int32}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset.ma77_solve_s(job::Int32, nrhs::Int32, lx::Int32, x::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_solve(::Type{Float64}, ::Type{Int32}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset.ma77_solve_d(job::Int32, nrhs::Int32, lx::Int32, x::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_solve(::Type{Float128}, ::Type{Int32}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset.ma77_solve_q(job::Int32, nrhs::Int32, lx::Int32, x::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_solve(::Type{Float32}, ::Type{Int64}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_solve_s_64(job::Int64, nrhs::Int64, lx::Int64, x::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_solve(::Type{Float64}, ::Type{Int64}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_solve_d_64(job::Int64, nrhs::Int64, lx::Int64, x::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_solve(::Type{Float128}, ::Type{Int64}, job, nrhs, lx, x, keep, control, info, scale) + @ccall libhsl_subset_64.ma77_solve_q_64(job::Int64, nrhs::Int64, lx::Int64, x::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_resid(::Type{Float32}, ::Type{Int32}, nrhs, lx, x, lresid, resid, keep, control, info, + anorm_bnd) + @ccall libhsl_subset.ma77_resid_s(nrhs::Int32, lx::Int32, x::Ptr{Float32}, lresid::Int32, + resid::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + anorm_bnd::Ptr{Float32})::Cvoid +end + +function ma77_resid(::Type{Float64}, ::Type{Int32}, nrhs, lx, x, lresid, resid, keep, control, info, + anorm_bnd) + @ccall libhsl_subset.ma77_resid_d(nrhs::Int32, lx::Int32, x::Ptr{Float64}, lresid::Int32, + resid::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + anorm_bnd::Ptr{Float64})::Cvoid +end + +function ma77_resid(::Type{Float128}, ::Type{Int32}, nrhs, lx, x, lresid, resid, keep, control, + info, anorm_bnd) + @ccall libhsl_subset.ma77_resid_q(nrhs::Int32, lx::Int32, x::Ptr{Float128}, lresid::Int32, + resid::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + anorm_bnd::Ptr{Float128})::Cvoid +end + +function ma77_resid(::Type{Float32}, ::Type{Int64}, nrhs, lx, x, lresid, resid, keep, control, info, + anorm_bnd) + @ccall libhsl_subset_64.ma77_resid_s_64(nrhs::Int64, lx::Int64, x::Ptr{Float32}, lresid::Int64, + resid::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + anorm_bnd::Ptr{Float32})::Cvoid +end + +function ma77_resid(::Type{Float64}, ::Type{Int64}, nrhs, lx, x, lresid, resid, keep, control, info, + anorm_bnd) + @ccall libhsl_subset_64.ma77_resid_d_64(nrhs::Int64, lx::Int64, x::Ptr{Float64}, lresid::Int64, + resid::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + anorm_bnd::Ptr{Float64})::Cvoid +end + +function ma77_resid(::Type{Float128}, ::Type{Int64}, nrhs, lx, x, lresid, resid, keep, control, + info, anorm_bnd) + @ccall libhsl_subset_64.ma77_resid_q_64(nrhs::Int64, lx::Int64, x::Ptr{Float128}, lresid::Int64, + resid::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + anorm_bnd::Ptr{Float128})::Cvoid +end + +function ma77_scale(::Type{Float32}, ::Type{Int32}, scale, keep, control, info, anorm) + @ccall libhsl_subset.ma77_scale_s(scale::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, anorm::Ptr{Float32})::Cvoid +end + +function ma77_scale(::Type{Float64}, ::Type{Int32}, scale, keep, control, info, anorm) + @ccall libhsl_subset.ma77_scale_d(scale::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, anorm::Ptr{Float64})::Cvoid +end + +function ma77_scale(::Type{Float128}, ::Type{Int32}, scale, keep, control, info, anorm) + @ccall libhsl_subset.ma77_scale_q(scale::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + anorm::Ptr{Float128})::Cvoid +end + +function ma77_scale(::Type{Float32}, ::Type{Int64}, scale, keep, control, info, anorm) + @ccall libhsl_subset_64.ma77_scale_s_64(scale::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + anorm::Ptr{Float32})::Cvoid +end + +function ma77_scale(::Type{Float64}, ::Type{Int64}, scale, keep, control, info, anorm) + @ccall libhsl_subset_64.ma77_scale_d_64(scale::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + anorm::Ptr{Float64})::Cvoid +end + +function ma77_scale(::Type{Float128}, ::Type{Int64}, scale, keep, control, info, anorm) + @ccall libhsl_subset_64.ma77_scale_q_64(scale::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + anorm::Ptr{Float128})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float32}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_posdef_s(d::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float64}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_posdef_d(d::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float128}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_posdef_q(d::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float32}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_posdef_s_64(d::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float64}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_posdef_d_64(d::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_enquire_posdef(::Type{Float128}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_posdef_q_64(d::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float32}, ::Type{Int32}, piv_order, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_indef_s(piv_order::Ptr{Cint}, d::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float64}, ::Type{Int32}, piv_order, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_indef_d(piv_order::Ptr{Cint}, d::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float128}, ::Type{Int32}, piv_order, d, keep, control, info) + @ccall libhsl_subset.ma77_enquire_indef_q(piv_order::Ptr{Cint}, d::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float32}, ::Type{Int64}, piv_order, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_indef_s_64(piv_order::Ptr{Cint}, d::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float64}, ::Type{Int64}, piv_order, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_indef_d_64(piv_order::Ptr{Cint}, d::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_enquire_indef(::Type{Float128}, ::Type{Int64}, piv_order, d, keep, control, info) + @ccall libhsl_subset_64.ma77_enquire_indef_q_64(piv_order::Ptr{Cint}, d::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_alter(::Type{Float32}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_alter_s(d::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_alter(::Type{Float64}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_alter_d(d::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_alter(::Type{Float128}, ::Type{Int32}, d, keep, control, info) + @ccall libhsl_subset.ma77_alter_q(d::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_alter(::Type{Float32}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_alter_s_64(d::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_alter(::Type{Float64}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_alter_d_64(d::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_alter(::Type{Float128}, ::Type{Int64}, d, keep, control, info) + @ccall libhsl_subset_64.ma77_alter_q_64(d::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_restart(::Type{Float32}, ::Type{Int32}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset.ma77_restart_s(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_restart(::Type{Float64}, ::Type{Int32}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset.ma77_restart_d(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_restart(::Type{Float128}, ::Type{Int32}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset.ma77_restart_q(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_restart(::Type{Float32}, ::Type{Int64}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset_64.ma77_restart_s_64(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_restart(::Type{Float64}, ::Type{Int64}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset_64.ma77_restart_d_64(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_restart(::Type{Float128}, ::Type{Int64}, restart_file, fname1, fname2, fname3, fname4, + keep, control, info) + @ccall libhsl_subset_64.ma77_restart_q_64(restart_file::Cstring, fname1::Cstring, fname2::Cstring, + fname3::Cstring, fname4::Cstring, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_finalise(::Type{Float32}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.ma77_finalise_s(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}})::Cvoid +end + +function ma77_finalise(::Type{Float64}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.ma77_finalise_d(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}})::Cvoid +end + +function ma77_finalise(::Type{Float128}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.ma77_finalise_q(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}})::Cvoid +end + +function ma77_finalise(::Type{Float32}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.ma77_finalise_s_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}})::Cvoid +end + +function ma77_finalise(::Type{Float64}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.ma77_finalise_d_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}})::Cvoid +end + +function ma77_finalise(::Type{Float128}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.ma77_finalise_q_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float32}, ::Type{Int32}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset.ma77_solve_fredholm_s(nrhs::Cint, flag_out::Ptr{Int32}, lx::Int32, + x::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float64}, ::Type{Int32}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset.ma77_solve_fredholm_d(nrhs::Cint, flag_out::Ptr{Int32}, lx::Int32, + x::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float128}, ::Type{Int32}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset.ma77_solve_fredholm_q(nrhs::Cint, flag_out::Ptr{Int32}, lx::Int32, + x::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float32}, ::Type{Int64}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset_64.ma77_solve_fredholm_s_64(nrhs::Cint, flag_out::Ptr{Int64}, lx::Int64, + x::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float64}, ::Type{Int64}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset_64.ma77_solve_fredholm_d_64(nrhs::Cint, flag_out::Ptr{Int64}, lx::Int64, + x::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_solve_fredholm(::Type{Float128}, ::Type{Int64}, nrhs, flag_out, lx, x, keep, control, + info, scale) + @ccall libhsl_subset_64.ma77_solve_fredholm_q_64(nrhs::Cint, flag_out::Ptr{Int64}, lx::Int64, + x::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_lmultiply(::Type{Float32}, ::Type{Int32}, trans, k, lx, x, ly, y, keep, control, info, + scale) + @ccall libhsl_subset.ma77_lmultiply_s(trans::Cint, k::Int32, lx::Int32, x::Ptr{Float32}, + ly::Int32, + y::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int32}}, + info::Ref{Ma77Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_lmultiply(::Type{Float64}, ::Type{Int32}, trans, k, lx, x, ly, y, keep, control, info, + scale) + @ccall libhsl_subset.ma77_lmultiply_d(trans::Cint, k::Int32, lx::Int32, x::Ptr{Float64}, + ly::Int32, + y::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int32}}, + info::Ref{Ma77Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_lmultiply(::Type{Float128}, ::Type{Int32}, trans, k, lx, x, ly, y, keep, control, + info, scale) + @ccall libhsl_subset.ma77_lmultiply_q(trans::Cint, k::Int32, lx::Int32, x::Ptr{Float128}, + ly::Int32, + y::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int32}}, + info::Ref{Ma77Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma77_lmultiply(::Type{Float32}, ::Type{Int64}, trans, k, lx, x, ly, y, keep, control, info, + scale) + @ccall libhsl_subset_64.ma77_lmultiply_s_64(trans::Cint, k::Int64, lx::Int64, x::Ptr{Float32}, + ly::Int64, + y::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float32, Int64}}, + info::Ref{Ma77Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma77_lmultiply(::Type{Float64}, ::Type{Int64}, trans, k, lx, x, ly, y, keep, control, info, + scale) + @ccall libhsl_subset_64.ma77_lmultiply_d_64(trans::Cint, k::Int64, lx::Int64, x::Ptr{Float64}, + ly::Int64, + y::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float64, Int64}}, + info::Ref{Ma77Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma77_lmultiply(::Type{Float128}, ::Type{Int64}, trans, k, lx, x, ly, y, keep, control, + info, scale) + @ccall libhsl_subset_64.ma77_lmultiply_q_64(trans::Cint, k::Int64, lx::Int64, x::Ptr{Float128}, + ly::Int64, + y::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma77Control{Float128, Int64}}, + info::Ref{Ma77Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_ma86.jl b/src/C/hsl_subset/hsl_ma86.jl new file mode 100644 index 0000000..2b16f1c --- /dev/null +++ b/src/C/hsl_subset/hsl_ma86.jl @@ -0,0 +1,316 @@ +mutable struct Ma86Control{T, INT} + f_arrays::INT + diagnostics_level::INT + unit_diagnostics::INT + unit_error::INT + unit_warning::INT + nemin::INT + nb::INT + action::INT + nbi::INT + pool_size::INT + small_::T + static_::T + u::T + umin::T + scaling::INT +end + +mutable struct Ma86Info{T, INT} + detlog::T + detsign::INT + flag::INT + matrix_rank::INT + maxdepth::INT + num_delay::INT + num_factor::Int64 + num_flops::Int64 + num_neg::INT + num_nodes::INT + num_nothresh::INT + num_perturbed::INT + num_two::INT + pool_size::INT + stat::INT + usmall::T +end + +function ma86_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma86_default_control_s(control::Ref{Ma86Control{Float32, Int32}})::Cvoid +end + +function ma86_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma86_default_control_d(control::Ref{Ma86Control{Float64, Int32}})::Cvoid +end + +function ma86_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma86_default_control_q(control::Ref{Ma86Control{Float128, Int32}})::Cvoid +end + +function ma86_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma86_default_control_s_64(control::Ref{Ma86Control{Float32, Int64}})::Cvoid +end + +function ma86_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma86_default_control_d_64(control::Ref{Ma86Control{Float64, Int64}})::Cvoid +end + +function ma86_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma86_default_control_q_64(control::Ref{Ma86Control{Float128, Int64}})::Cvoid +end + +function ma86_analyse(::Type{Float32}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma86_analyse_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int32}}, + info::Ref{Ma86Info{Float32, Int32}})::Cvoid +end + +function ma86_analyse(::Type{Float64}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma86_analyse_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int32}}, + info::Ref{Ma86Info{Float64, Int32}})::Cvoid +end + +function ma86_analyse(::Type{Float128}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma86_analyse_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int32}}, + info::Ref{Ma86Info{Float128, Int32}})::Cvoid +end + +function ma86_analyse(::Type{Float32}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma86_analyse_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int64}}, + info::Ref{Ma86Info{Float32, Int64}})::Cvoid +end + +function ma86_analyse(::Type{Float64}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma86_analyse_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int64}}, + info::Ref{Ma86Info{Float64, Int64}})::Cvoid +end + +function ma86_analyse(::Type{Float128}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma86_analyse_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int64}}, + info::Ref{Ma86Info{Float128, Int64}})::Cvoid +end + +function ma86_factor(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_factor_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float32}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int32}}, + info::Ref{Ma86Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma86_factor(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_factor_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float64}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int32}}, + info::Ref{Ma86Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma86_factor(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_factor_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float128}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int32}}, + info::Ref{Ma86Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_factor(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_factor_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int64}}, + info::Ref{Ma86Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma86_factor(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_factor_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int64}}, + info::Ref{Ma86Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma86_factor(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_factor_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int64}}, + info::Ref{Ma86Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_factor_solve(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset.ma86_factor_solve_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int32}}, + info::Ref{Ma86Info{Float32, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float32}, + scale::Ptr{Float32})::Cvoid +end + +function ma86_factor_solve(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset.ma86_factor_solve_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int32}}, + info::Ref{Ma86Info{Float64, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float64}, + scale::Ptr{Float64})::Cvoid +end + +function ma86_factor_solve(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset.ma86_factor_solve_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int32}}, + info::Ref{Ma86Info{Float128, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float128}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_factor_solve(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset_64.ma86_factor_solve_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int64}}, + info::Ref{Ma86Info{Float32, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float32}, + scale::Ptr{Float32})::Cvoid +end + +function ma86_factor_solve(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset_64.ma86_factor_solve_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int64}}, + info::Ref{Ma86Info{Float64, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float64}, + scale::Ptr{Float64})::Cvoid +end + +function ma86_factor_solve(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x, scale) + @ccall libhsl_subset_64.ma86_factor_solve_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int64}}, + info::Ref{Ma86Info{Float128, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float128}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_solve(::Type{Float32}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_solve_s(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float32}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int32}}, + info::Ref{Ma86Info{Float32, Int32}}, scale::Ptr{Float32})::Cvoid +end + +function ma86_solve(::Type{Float64}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_solve_d(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float64}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int32}}, + info::Ref{Ma86Info{Float64, Int32}}, scale::Ptr{Float64})::Cvoid +end + +function ma86_solve(::Type{Float128}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset.ma86_solve_q(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float128}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int32}}, + info::Ref{Ma86Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_solve(::Type{Float32}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_solve_s_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float32}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int64}}, + info::Ref{Ma86Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma86_solve(::Type{Float64}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_solve_d_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int64}}, + info::Ref{Ma86Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma86_solve(::Type{Float128}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info, + scale) + @ccall libhsl_subset_64.ma86_solve_q_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float128}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int64}}, + info::Ref{Ma86Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma86_finalise(::Type{Float32}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma86_finalise_s(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int32}})::Cvoid +end + +function ma86_finalise(::Type{Float64}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma86_finalise_d(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int32}})::Cvoid +end + +function ma86_finalise(::Type{Float128}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma86_finalise_q(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int32}})::Cvoid +end + +function ma86_finalise(::Type{Float32}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma86_finalise_s_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float32, Int64}})::Cvoid +end + +function ma86_finalise(::Type{Float64}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma86_finalise_d_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float64, Int64}})::Cvoid +end + +function ma86_finalise(::Type{Float128}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma86_finalise_q_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma86Control{Float128, Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_ma87.jl b/src/C/hsl_subset/hsl_ma87.jl new file mode 100644 index 0000000..8477f5f --- /dev/null +++ b/src/C/hsl_subset/hsl_ma87.jl @@ -0,0 +1,348 @@ +mutable struct Ma87Control{T, INT} + f_arrays::INT + diagnostics_level::INT + unit_diagnostics::INT + unit_error::INT + unit_warning::INT + nemin::INT + nb::INT + pool_size::INT + diag_zero_minus::T + diag_zero_plus::T + unused::NTuple{40, Cchar} +end + +mutable struct Ma87Info{T, INT} + detlog::T + flag::INT + maxdepth::INT + num_factor::Int64 + num_flops::Int64 + num_nodes::INT + pool_size::INT + stat::INT + num_zero::INT + unused::NTuple{40, Cchar} +end + +function ma87_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma87_default_control_s(control::Ref{Ma87Control{Float32, Int32}})::Cvoid +end + +function ma87_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma87_default_control_d(control::Ref{Ma87Control{Float64, Int32}})::Cvoid +end + +function ma87_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma87_default_control_q(control::Ref{Ma87Control{Float128, Int32}})::Cvoid +end + +function ma87_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma87_default_control_s_64(control::Ref{Ma87Control{Float32, Int64}})::Cvoid +end + +function ma87_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma87_default_control_d_64(control::Ref{Ma87Control{Float64, Int64}})::Cvoid +end + +function ma87_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma87_default_control_q_64(control::Ref{Ma87Control{Float128, Int64}})::Cvoid +end + +function ma87_analyse(::Type{Float32}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma87_analyse_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}}, + info::Ref{Ma87Info{Float32, Int32}})::Cvoid +end + +function ma87_analyse(::Type{Float64}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma87_analyse_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}}, + info::Ref{Ma87Info{Float64, Int32}})::Cvoid +end + +function ma87_analyse(::Type{Float128}, ::Type{Int32}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset.ma87_analyse_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}}, + info::Ref{Ma87Info{Float128, Int32}})::Cvoid +end + +function ma87_analyse(::Type{Float32}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma87_analyse_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}}, + info::Ref{Ma87Info{Float32, Int64}})::Cvoid +end + +function ma87_analyse(::Type{Float64}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma87_analyse_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}}, + info::Ref{Ma87Info{Float64, Int64}})::Cvoid +end + +function ma87_analyse(::Type{Float128}, ::Type{Int64}, n, ptr, row, order, keep, control, info) + @ccall libhsl_subset_64.ma87_analyse_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}}, + info::Ref{Ma87Info{Float128, Int64}})::Cvoid +end + +function ma87_factor(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset.ma87_factor_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float32}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}}, + info::Ref{Ma87Info{Float32, Int32}})::Cvoid +end + +function ma87_factor(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset.ma87_factor_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float64}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}}, + info::Ref{Ma87Info{Float64, Int32}})::Cvoid +end + +function ma87_factor(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset.ma87_factor_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, val::Ptr{Float128}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}}, + info::Ref{Ma87Info{Float128, Int32}})::Cvoid +end + +function ma87_factor(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset_64.ma87_factor_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}}, + info::Ref{Ma87Info{Float32, Int64}})::Cvoid +end + +function ma87_factor(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset_64.ma87_factor_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}}, + info::Ref{Ma87Info{Float64, Int64}})::Cvoid +end + +function ma87_factor(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, order, keep, control, info) + @ccall libhsl_subset_64.ma87_factor_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}}, + info::Ref{Ma87Info{Float128, Int64}})::Cvoid +end + +function ma87_factor_solve(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset.ma87_factor_solve_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}}, + info::Ref{Ma87Info{Float32, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float32})::Cvoid +end + +function ma87_factor_solve(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset.ma87_factor_solve_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}}, + info::Ref{Ma87Info{Float64, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float64})::Cvoid +end + +function ma87_factor_solve(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset.ma87_factor_solve_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + order::Ptr{Int32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}}, + info::Ref{Ma87Info{Float128, Int32}}, + nrhs::Int32, ldx::Int32, x::Ptr{Float128})::Cvoid +end + +function ma87_factor_solve(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset_64.ma87_factor_solve_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}}, + info::Ref{Ma87Info{Float32, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float32})::Cvoid +end + +function ma87_factor_solve(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset_64.ma87_factor_solve_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}}, + info::Ref{Ma87Info{Float64, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float64})::Cvoid +end + +function ma87_factor_solve(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, order, keep, control, + info, nrhs, ldx, x) + @ccall libhsl_subset_64.ma87_factor_solve_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + order::Ptr{Int64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}}, + info::Ref{Ma87Info{Float128, Int64}}, + nrhs::Int64, ldx::Int64, x::Ptr{Float128})::Cvoid +end + +function ma87_solve(::Type{Float32}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset.ma87_solve_s(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float32}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}}, + info::Ref{Ma87Info{Float32, Int32}})::Cvoid +end + +function ma87_solve(::Type{Float64}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset.ma87_solve_d(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float64}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}}, + info::Ref{Ma87Info{Float64, Int32}})::Cvoid +end + +function ma87_solve(::Type{Float128}, ::Type{Int32}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset.ma87_solve_q(job::Int32, nrhs::Int32, ldx::Int32, x::Ptr{Float128}, + order::Ptr{Int32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}}, + info::Ref{Ma87Info{Float128, Int32}})::Cvoid +end + +function ma87_solve(::Type{Float32}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset_64.ma87_solve_s_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float32}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}}, + info::Ref{Ma87Info{Float32, Int64}})::Cvoid +end + +function ma87_solve(::Type{Float64}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset_64.ma87_solve_d_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float64}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}}, + info::Ref{Ma87Info{Float64, Int64}})::Cvoid +end + +function ma87_solve(::Type{Float128}, ::Type{Int64}, job, nrhs, ldx, x, order, keep, control, info) + @ccall libhsl_subset_64.ma87_solve_q_64(job::Int64, nrhs::Int64, ldx::Int64, x::Ptr{Float128}, + order::Ptr{Int64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}}, + info::Ref{Ma87Info{Float128, Int64}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float32}, ::Type{Int32}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset.ma87_sparse_fwd_solve_s(nbi::Int32, bindex::Ptr{Int32}, b::Ptr{Float32}, + order::Ptr{Int32}, invp::Ptr{Int32}, nxi::Ptr{Int32}, + index::Ptr{Int32}, x::Ptr{Float32}, w::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}}, + info::Ref{Ma87Info{Float32, Int32}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float64}, ::Type{Int32}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset.ma87_sparse_fwd_solve_d(nbi::Int32, bindex::Ptr{Int32}, b::Ptr{Float64}, + order::Ptr{Int32}, invp::Ptr{Int32}, nxi::Ptr{Int32}, + index::Ptr{Int32}, x::Ptr{Float64}, w::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}}, + info::Ref{Ma87Info{Float64, Int32}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float128}, ::Type{Int32}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset.ma87_sparse_fwd_solve_q(nbi::Int32, bindex::Ptr{Int32}, b::Ptr{Float128}, + order::Ptr{Int32}, invp::Ptr{Int32}, nxi::Ptr{Int32}, + index::Ptr{Int32}, x::Ptr{Float128}, + w::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}}, + info::Ref{Ma87Info{Float128, Int32}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float32}, ::Type{Int64}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset_64.ma87_sparse_fwd_solve_s_64(nbi::Int64, bindex::Ptr{Int64}, + b::Ptr{Float32}, + order::Ptr{Int64}, invp::Ptr{Int64}, + nxi::Ptr{Int64}, + index::Ptr{Int64}, x::Ptr{Float32}, + w::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}}, + info::Ref{Ma87Info{Float32, Int64}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float64}, ::Type{Int64}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset_64.ma87_sparse_fwd_solve_d_64(nbi::Int64, bindex::Ptr{Int64}, + b::Ptr{Float64}, + order::Ptr{Int64}, invp::Ptr{Int64}, + nxi::Ptr{Int64}, + index::Ptr{Int64}, x::Ptr{Float64}, + w::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}}, + info::Ref{Ma87Info{Float64, Int64}})::Cvoid +end + +function ma87_sparse_fwd_solve(::Type{Float128}, ::Type{Int64}, nbi, bindex, b, order, invp, nxi, + index, x, w, keep, control, info) + @ccall libhsl_subset_64.ma87_sparse_fwd_solve_q_64(nbi::Int64, bindex::Ptr{Int64}, + b::Ptr{Float128}, + order::Ptr{Int64}, invp::Ptr{Int64}, + nxi::Ptr{Int64}, + index::Ptr{Int64}, x::Ptr{Float128}, + w::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}}, + info::Ref{Ma87Info{Float128, Int64}})::Cvoid +end + +function ma87_finalise(::Type{Float32}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma87_finalise_s(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int32}})::Cvoid +end + +function ma87_finalise(::Type{Float64}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma87_finalise_d(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int32}})::Cvoid +end + +function ma87_finalise(::Type{Float128}, ::Type{Int32}, keep, control) + @ccall libhsl_subset.ma87_finalise_q(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int32}})::Cvoid +end + +function ma87_finalise(::Type{Float32}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma87_finalise_s_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float32, Int64}})::Cvoid +end + +function ma87_finalise(::Type{Float64}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma87_finalise_d_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float64, Int64}})::Cvoid +end + +function ma87_finalise(::Type{Float128}, ::Type{Int64}, keep, control) + @ccall libhsl_subset_64.ma87_finalise_q_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma87Control{Float128, Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_ma97.jl b/src/C/hsl_subset/hsl_ma97.jl new file mode 100644 index 0000000..9443750 --- /dev/null +++ b/src/C/hsl_subset/hsl_ma97.jl @@ -0,0 +1,746 @@ +mutable struct Ma97Control{T, INT} + f_arrays::INT + action::INT + nemin::INT + multiplier::T + ordering::INT + print_level::INT + scaling::INT + small::T + u::T + unit_diagnostics::INT + unit_error::INT + unit_warning::INT + factor_min::Int64 + solve_blas3::INT + solve_min::Int64 + solve_mf::INT + consist_tol::T + ispare::NTuple{5, INT} + rspare::NTuple{10, T} +end + +mutable struct Ma97Info{T, INT} + flag::INT + flag68::INT + flag77::INT + matrix_dup::INT + matrix_rank::INT + matrix_outrange::INT + matrix_missing_diag::INT + maxdepth::INT + maxfront::INT + num_delay::INT + num_factor::Int64 + num_flops::Int64 + num_neg::INT + num_sup::INT + num_two::INT + ordering::INT + stat::INT + maxsupernode::INT + ispare::NTuple{4, INT} + rspare::NTuple{10, T} +end + +function ma97_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.ma97_default_control_s(control::Ref{Ma97Control{Float32, Int32}})::Cvoid +end + +function ma97_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.ma97_default_control_d(control::Ref{Ma97Control{Float64, Int32}})::Cvoid +end + +function ma97_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.ma97_default_control_q(control::Ref{Ma97Control{Float128, Int32}})::Cvoid +end + +function ma97_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma97_default_control_s_64(control::Ref{Ma97Control{Float32, Int64}})::Cvoid +end + +function ma97_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma97_default_control_d_64(control::Ref{Ma97Control{Float64, Int64}})::Cvoid +end + +function ma97_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.ma97_default_control_q_64(control::Ref{Ma97Control{Float128, Int64}})::Cvoid +end + +function ma97_analyse(::Type{Float32}, ::Type{Int32}, check, n, ptr, row, val, akeep, control, info, + order) + @ccall libhsl_subset.ma97_analyse_s(check::Cint, n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, order::Ptr{Int32})::Cvoid +end + +function ma97_analyse(::Type{Float64}, ::Type{Int32}, check, n, ptr, row, val, akeep, control, info, + order) + @ccall libhsl_subset.ma97_analyse_d(check::Cint, n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, order::Ptr{Int32})::Cvoid +end + +function ma97_analyse(::Type{Float128}, ::Type{Int32}, check, n, ptr, row, val, akeep, control, + info, order) + @ccall libhsl_subset.ma97_analyse_q(check::Cint, n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + order::Ptr{Int32})::Cvoid +end + +function ma97_analyse(::Type{Float32}, ::Type{Int64}, check, n, ptr, row, val, akeep, control, info, + order) + @ccall libhsl_subset_64.ma97_analyse_s_64(check::Cint, n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_analyse(::Type{Float64}, ::Type{Int64}, check, n, ptr, row, val, akeep, control, info, + order) + @ccall libhsl_subset_64.ma97_analyse_d_64(check::Cint, n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_analyse(::Type{Float128}, ::Type{Int64}, check, n, ptr, row, val, akeep, control, + info, order) + @ccall libhsl_subset_64.ma97_analyse_q_64(check::Cint, n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_analyse_coord(::Type{Float32}, ::Type{Int32}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset.ma97_analyse_coord_s(n::Cint, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, + order::Ptr{Int32})::Cvoid +end + +function ma97_analyse_coord(::Type{Float64}, ::Type{Int32}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset.ma97_analyse_coord_d(n::Cint, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, + order::Ptr{Int32})::Cvoid +end + +function ma97_analyse_coord(::Type{Float128}, ::Type{Int32}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset.ma97_analyse_coord_q(n::Cint, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + order::Ptr{Int32})::Cvoid +end + +function ma97_analyse_coord(::Type{Float32}, ::Type{Int64}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset_64.ma97_analyse_coord_s_64(n::Cint, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_analyse_coord(::Type{Float64}, ::Type{Int64}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset_64.ma97_analyse_coord_d_64(n::Cint, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_analyse_coord(::Type{Float128}, ::Type{Int64}, n, ne, row, col, val, akeep, control, + info, order) + @ccall libhsl_subset_64.ma97_analyse_coord_q_64(n::Cint, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + order::Ptr{Int64})::Cvoid +end + +function ma97_factor(::Type{Float32}, ::Type{Int32}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset.ma97_factor_s(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma97_factor(::Type{Float64}, ::Type{Int32}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset.ma97_factor_d(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma97_factor(::Type{Float128}, ::Type{Int32}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset.ma97_factor_q(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma97_factor(::Type{Float32}, ::Type{Int64}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset_64.ma97_factor_s_64(matrix_type::Cint, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma97_factor(::Type{Float64}, ::Type{Int64}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset_64.ma97_factor_d_64(matrix_type::Cint, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma97_factor(::Type{Float128}, ::Type{Int64}, matrix_type, ptr, row, val, akeep, fkeep, + control, info, scale) + @ccall libhsl_subset_64.ma97_factor_q_64(matrix_type::Cint, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma97_factor_solve(::Type{Float32}, ::Type{Int32}, matrix_type, ptr, row, val, nrhs, x, ldx, + akeep, fkeep, control, info, + scale) + @ccall libhsl_subset.ma97_factor_solve_s(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, nrhs::Int32, x::Ptr{Float32}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, + scale::Ptr{Float32})::Cvoid +end + +function ma97_factor_solve(::Type{Float64}, ::Type{Int32}, matrix_type, ptr, row, val, nrhs, x, ldx, + akeep, fkeep, control, info, + scale) + @ccall libhsl_subset.ma97_factor_solve_d(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, nrhs::Int32, x::Ptr{Float64}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, + scale::Ptr{Float64})::Cvoid +end + +function ma97_factor_solve(::Type{Float128}, ::Type{Int32}, matrix_type, ptr, row, val, nrhs, x, + ldx, akeep, fkeep, control, info, + scale) + @ccall libhsl_subset.ma97_factor_solve_q(matrix_type::Cint, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, nrhs::Int32, x::Ptr{Float128}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + scale::Ptr{Float128})::Cvoid +end + +function ma97_factor_solve(::Type{Float32}, ::Type{Int64}, matrix_type, ptr, row, val, nrhs, x, ldx, + akeep, fkeep, control, info, + scale) + @ccall libhsl_subset_64.ma97_factor_solve_s_64(matrix_type::Cint, ptr::Ptr{Int64}, + row::Ptr{Int64}, + val::Ptr{Float32}, nrhs::Int64, x::Ptr{Float32}, + ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + scale::Ptr{Float32})::Cvoid +end + +function ma97_factor_solve(::Type{Float64}, ::Type{Int64}, matrix_type, ptr, row, val, nrhs, x, ldx, + akeep, fkeep, control, info, + scale) + @ccall libhsl_subset_64.ma97_factor_solve_d_64(matrix_type::Cint, ptr::Ptr{Int64}, + row::Ptr{Int64}, + val::Ptr{Float64}, nrhs::Int64, x::Ptr{Float64}, + ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + scale::Ptr{Float64})::Cvoid +end + +function ma97_factor_solve(::Type{Float128}, ::Type{Int64}, matrix_type, ptr, row, val, nrhs, x, + ldx, akeep, fkeep, control, info, + scale) + @ccall libhsl_subset_64.ma97_factor_solve_q_64(matrix_type::Cint, ptr::Ptr{Int64}, + row::Ptr{Int64}, + val::Ptr{Float128}, nrhs::Int64, x::Ptr{Float128}, + ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + scale::Ptr{Float128})::Cvoid +end + +function ma97_solve(::Type{Float32}, ::Type{Int32}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_solve_s(job::Cint, nrhs::Int32, x::Ptr{Float32}, ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}})::Cvoid +end + +function ma97_solve(::Type{Float64}, ::Type{Int32}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_solve_d(job::Cint, nrhs::Int32, x::Ptr{Float64}, ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}})::Cvoid +end + +function ma97_solve(::Type{Float128}, ::Type{Int32}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_solve_q(job::Cint, nrhs::Int32, x::Ptr{Float128}, ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}})::Cvoid +end + +function ma97_solve(::Type{Float32}, ::Type{Int64}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_solve_s_64(job::Cint, nrhs::Int64, x::Ptr{Float32}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}})::Cvoid +end + +function ma97_solve(::Type{Float64}, ::Type{Int64}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_solve_d_64(job::Cint, nrhs::Int64, x::Ptr{Float64}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}})::Cvoid +end + +function ma97_solve(::Type{Float128}, ::Type{Int64}, job, nrhs, x, ldx, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_solve_q_64(job::Cint, nrhs::Int64, x::Ptr{Float128}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}})::Cvoid +end + +function ma97_free_akeep(::Type{Float32}, ::Type{Int32}, akeep) + @ccall libhsl_subset.ma97_free_akeep_s(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_akeep(::Type{Float64}, ::Type{Int32}, akeep) + @ccall libhsl_subset.ma97_free_akeep_d(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_akeep(::Type{Float128}, ::Type{Int32}, akeep) + @ccall libhsl_subset.ma97_free_akeep_q(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_akeep(::Type{Float32}, ::Type{Int64}, akeep) + @ccall libhsl_subset_64.ma97_free_akeep_s_64(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_akeep(::Type{Float64}, ::Type{Int64}, akeep) + @ccall libhsl_subset_64.ma97_free_akeep_d_64(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_akeep(::Type{Float128}, ::Type{Int64}, akeep) + @ccall libhsl_subset_64.ma97_free_akeep_q_64(akeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float32}, ::Type{Int32}, fkeep) + @ccall libhsl_subset.ma97_free_fkeep_s(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float64}, ::Type{Int32}, fkeep) + @ccall libhsl_subset.ma97_free_fkeep_d(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float128}, ::Type{Int32}, fkeep) + @ccall libhsl_subset.ma97_free_fkeep_q(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float32}, ::Type{Int64}, fkeep) + @ccall libhsl_subset_64.ma97_free_fkeep_s_64(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float64}, ::Type{Int64}, fkeep) + @ccall libhsl_subset_64.ma97_free_fkeep_d_64(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_free_fkeep(::Type{Float128}, ::Type{Int64}, fkeep) + @ccall libhsl_subset_64.ma97_free_fkeep_q_64(fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float32}, ::Type{Int32}, akeep, fkeep) + @ccall libhsl_subset.ma97_finalise_s(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float64}, ::Type{Int32}, akeep, fkeep) + @ccall libhsl_subset.ma97_finalise_d(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float128}, ::Type{Int32}, akeep, fkeep) + @ccall libhsl_subset.ma97_finalise_q(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float32}, ::Type{Int64}, akeep, fkeep) + @ccall libhsl_subset_64.ma97_finalise_s_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float64}, ::Type{Int64}, akeep, fkeep) + @ccall libhsl_subset_64.ma97_finalise_d_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_finalise(::Type{Float128}, ::Type{Int64}, akeep, fkeep) + @ccall libhsl_subset_64.ma97_finalise_q_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float32}, ::Type{Int32}, akeep, fkeep, control, info, d) + @ccall libhsl_subset.ma97_enquire_posdef_s(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, + d::Ptr{Float32})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float64}, ::Type{Int32}, akeep, fkeep, control, info, d) + @ccall libhsl_subset.ma97_enquire_posdef_d(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, + d::Ptr{Float64})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float128}, ::Type{Int32}, akeep, fkeep, control, info, d) + @ccall libhsl_subset.ma97_enquire_posdef_q(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + d::Ptr{Float128})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float32}, ::Type{Int64}, akeep, fkeep, control, info, d) + @ccall libhsl_subset_64.ma97_enquire_posdef_s_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + d::Ptr{Float32})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float64}, ::Type{Int64}, akeep, fkeep, control, info, d) + @ccall libhsl_subset_64.ma97_enquire_posdef_d_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + d::Ptr{Float64})::Cvoid +end + +function ma97_enquire_posdef(::Type{Float128}, ::Type{Int64}, akeep, fkeep, control, info, d) + @ccall libhsl_subset_64.ma97_enquire_posdef_q_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + d::Ptr{Float128})::Cvoid +end + +function ma97_enquire_indef(::Type{Float32}, ::Type{Int32}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset.ma97_enquire_indef_s(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}}, + piv_order::Ptr{Int32}, d::Ptr{Float32})::Cvoid +end + +function ma97_enquire_indef(::Type{Float64}, ::Type{Int32}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset.ma97_enquire_indef_d(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}}, + piv_order::Ptr{Int32}, d::Ptr{Float64})::Cvoid +end + +function ma97_enquire_indef(::Type{Float128}, ::Type{Int32}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset.ma97_enquire_indef_q(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}}, + piv_order::Ptr{Int32}, d::Ptr{Float128})::Cvoid +end + +function ma97_enquire_indef(::Type{Float32}, ::Type{Int64}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset_64.ma97_enquire_indef_s_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}}, + piv_order::Ptr{Int64}, d::Ptr{Float32})::Cvoid +end + +function ma97_enquire_indef(::Type{Float64}, ::Type{Int64}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset_64.ma97_enquire_indef_d_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}}, + piv_order::Ptr{Int64}, d::Ptr{Float64})::Cvoid +end + +function ma97_enquire_indef(::Type{Float128}, ::Type{Int64}, akeep, fkeep, control, info, piv_order, + d) + @ccall libhsl_subset_64.ma97_enquire_indef_q_64(akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}}, + piv_order::Ptr{Int64}, d::Ptr{Float128})::Cvoid +end + +function ma97_alter(::Type{Float32}, ::Type{Int32}, d, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_alter_s(d::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}})::Cvoid +end + +function ma97_alter(::Type{Float64}, ::Type{Int32}, d, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_alter_d(d::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}})::Cvoid +end + +function ma97_alter(::Type{Float128}, ::Type{Int32}, d, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_alter_q(d::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}})::Cvoid +end + +function ma97_alter(::Type{Float32}, ::Type{Int64}, d, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_alter_s_64(d::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}})::Cvoid +end + +function ma97_alter(::Type{Float64}, ::Type{Int64}, d, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_alter_d_64(d::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}})::Cvoid +end + +function ma97_alter(::Type{Float128}, ::Type{Int64}, d, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_alter_q_64(d::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float32}, ::Type{Int32}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_solve_fredholm_s(nrhs::Cint, flag_out::Ptr{Int32}, x::Ptr{Float32}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float64}, ::Type{Int32}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_solve_fredholm_d(nrhs::Cint, flag_out::Ptr{Int32}, x::Ptr{Float64}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float128}, ::Type{Int32}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_solve_fredholm_q(nrhs::Cint, flag_out::Ptr{Int32}, x::Ptr{Float128}, + ldx::Int32, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float32}, ::Type{Int64}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_solve_fredholm_s_64(nrhs::Cint, flag_out::Ptr{Int64}, + x::Ptr{Float32}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float64}, ::Type{Int64}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_solve_fredholm_d_64(nrhs::Cint, flag_out::Ptr{Int64}, + x::Ptr{Float64}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}})::Cvoid +end + +function ma97_solve_fredholm(::Type{Float128}, ::Type{Int64}, nrhs, flag_out, x, ldx, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_solve_fredholm_q_64(nrhs::Cint, flag_out::Ptr{Int64}, + x::Ptr{Float128}, ldx::Int64, + akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}})::Cvoid +end + +function ma97_lmultiply(::Type{Float32}, ::Type{Int32}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_lmultiply_s(trans::Cint, k::Int32, x::Ptr{Float32}, ldx::Int32, + y::Ptr{Float32}, + ldy::Int32, akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}})::Cvoid +end + +function ma97_lmultiply(::Type{Float64}, ::Type{Int32}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_lmultiply_d(trans::Cint, k::Int32, x::Ptr{Float64}, ldx::Int32, + y::Ptr{Float64}, + ldy::Int32, akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}})::Cvoid +end + +function ma97_lmultiply(::Type{Float128}, ::Type{Int32}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset.ma97_lmultiply_q(trans::Cint, k::Int32, x::Ptr{Float128}, ldx::Int32, + y::Ptr{Float128}, + ldy::Int32, akeep::Ptr{Ptr{Cvoid}}, fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}})::Cvoid +end + +function ma97_lmultiply(::Type{Float32}, ::Type{Int64}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_lmultiply_s_64(trans::Cint, k::Int64, x::Ptr{Float32}, ldx::Int64, + y::Ptr{Float32}, + ldy::Int64, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}})::Cvoid +end + +function ma97_lmultiply(::Type{Float64}, ::Type{Int64}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_lmultiply_d_64(trans::Cint, k::Int64, x::Ptr{Float64}, ldx::Int64, + y::Ptr{Float64}, + ldy::Int64, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}})::Cvoid +end + +function ma97_lmultiply(::Type{Float128}, ::Type{Int64}, trans, k, x, ldx, y, ldy, akeep, fkeep, + control, info) + @ccall libhsl_subset_64.ma97_lmultiply_q_64(trans::Cint, k::Int64, x::Ptr{Float128}, ldx::Int64, + y::Ptr{Float128}, + ldy::Int64, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float32}, ::Type{Int32}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_sparse_fwd_solve_s(nbi::Cint, bindex::Ptr{Int32}, b::Ptr{Float32}, + order::Ptr{Int32}, nxi::Ptr{Int32}, + xindex::Ptr{Int32}, + x::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int32}}, + info::Ref{Ma97Info{Float32, Int32}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float64}, ::Type{Int32}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_sparse_fwd_solve_d(nbi::Cint, bindex::Ptr{Int32}, b::Ptr{Float64}, + order::Ptr{Int32}, nxi::Ptr{Int32}, + xindex::Ptr{Int32}, + x::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int32}}, + info::Ref{Ma97Info{Float64, Int32}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float128}, ::Type{Int32}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset.ma97_sparse_fwd_solve_q(nbi::Cint, bindex::Ptr{Int32}, b::Ptr{Float128}, + order::Ptr{Int32}, nxi::Ptr{Int32}, + xindex::Ptr{Int32}, + x::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int32}}, + info::Ref{Ma97Info{Float128, Int32}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float32}, ::Type{Int64}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_sparse_fwd_solve_s_64(nbi::Cint, bindex::Ptr{Int64}, b::Ptr{Float32}, + order::Ptr{Int64}, nxi::Ptr{Int64}, + xindex::Ptr{Int64}, + x::Ptr{Float32}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float32, Int64}}, + info::Ref{Ma97Info{Float32, Int64}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float64}, ::Type{Int64}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_sparse_fwd_solve_d_64(nbi::Cint, bindex::Ptr{Int64}, b::Ptr{Float64}, + order::Ptr{Int64}, nxi::Ptr{Int64}, + xindex::Ptr{Int64}, + x::Ptr{Float64}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float64, Int64}}, + info::Ref{Ma97Info{Float64, Int64}})::Cvoid +end + +function ma97_sparse_fwd_solve(::Type{Float128}, ::Type{Int64}, nbi, bindex, b, order, nxi, xindex, + x, akeep, fkeep, control, info) + @ccall libhsl_subset_64.ma97_sparse_fwd_solve_q_64(nbi::Cint, bindex::Ptr{Int64}, + b::Ptr{Float128}, + order::Ptr{Int64}, nxi::Ptr{Int64}, + xindex::Ptr{Int64}, + x::Ptr{Float128}, akeep::Ptr{Ptr{Cvoid}}, + fkeep::Ptr{Ptr{Cvoid}}, + control::Ref{Ma97Control{Float128, Int64}}, + info::Ref{Ma97Info{Float128, Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_mc64.jl b/src/C/hsl_subset/hsl_mc64.jl new file mode 100644 index 0000000..1dd8563 --- /dev/null +++ b/src/C/hsl_subset/hsl_mc64.jl @@ -0,0 +1,99 @@ +mutable struct Mc64Control{INT} + f_arrays::INT + lp::INT + wp::INT + sp::INT + ldiag::INT + checking::INT +end + +mutable struct Mc64Info{INT} + flag::INT + more::INT + strucrank::INT + stat::INT +end + +function mc64_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.mc64_default_control_s(control::Ref{Mc64Control{Int32}})::Cvoid +end + +function mc64_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.mc64_default_control_d(control::Ref{Mc64Control{Int32}})::Cvoid +end + +function mc64_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.mc64_default_control_q(control::Ref{Mc64Control{Int32}})::Cvoid +end + +function mc64_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mc64_default_control_s_64(control::Ref{Mc64Control{Int64}})::Cvoid +end + +function mc64_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mc64_default_control_d_64(control::Ref{Mc64Control{Int64}})::Cvoid +end + +function mc64_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mc64_default_control_q_64(control::Ref{Mc64Control{Int64}})::Cvoid +end + +function mc64_matching(::Type{Float32}, ::Type{Int32}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset.mc64_matching_s(job::Int32, matrix_type::Int32, m::Int32, n::Int32, + ptr::Ptr{Int32}, + row::Ptr{Int32}, cval::Ptr{Float32}, + control::Ref{Mc64Control{Int32}}, + info::Ref{Mc64Info{Int32}}, perm::Ptr{Int32}, + scale::Ptr{Float32})::Cvoid +end + +function mc64_matching(::Type{Float64}, ::Type{Int32}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset.mc64_matching_d(job::Int32, matrix_type::Int32, m::Int32, n::Int32, + ptr::Ptr{Int32}, + row::Ptr{Int32}, cval::Ptr{Float64}, + control::Ref{Mc64Control{Int32}}, + info::Ref{Mc64Info{Int32}}, perm::Ptr{Int32}, + scale::Ptr{Float64})::Cvoid +end + +function mc64_matching(::Type{Float128}, ::Type{Int32}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset.mc64_matching_q(job::Int32, matrix_type::Int32, m::Int32, n::Int32, + ptr::Ptr{Int32}, + row::Ptr{Int32}, cval::Ptr{Float128}, + control::Ref{Mc64Control{Int32}}, + info::Ref{Mc64Info{Int32}}, perm::Ptr{Int32}, + scale::Ptr{Float128})::Cvoid +end + +function mc64_matching(::Type{Float32}, ::Type{Int64}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset_64.mc64_matching_s_64(job::Int64, matrix_type::Int64, m::Int64, n::Int64, + ptr::Ptr{Int64}, + row::Ptr{Int64}, cval::Ptr{Float32}, + control::Ref{Mc64Control{Int64}}, + info::Ref{Mc64Info{Int64}}, perm::Ptr{Int64}, + scale::Ptr{Float32})::Cvoid +end + +function mc64_matching(::Type{Float64}, ::Type{Int64}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset_64.mc64_matching_d_64(job::Int64, matrix_type::Int64, m::Int64, n::Int64, + ptr::Ptr{Int64}, + row::Ptr{Int64}, cval::Ptr{Float64}, + control::Ref{Mc64Control{Int64}}, + info::Ref{Mc64Info{Int64}}, perm::Ptr{Int64}, + scale::Ptr{Float64})::Cvoid +end + +function mc64_matching(::Type{Float128}, ::Type{Int64}, job, matrix_type, m, n, ptr, row, cval, + control, info, perm, scale) + @ccall libhsl_subset_64.mc64_matching_q_64(job::Int64, matrix_type::Int64, m::Int64, n::Int64, + ptr::Ptr{Int64}, + row::Ptr{Int64}, cval::Ptr{Float128}, + control::Ref{Mc64Control{Int64}}, + info::Ref{Mc64Info{Int64}}, perm::Ptr{Int64}, + scale::Ptr{Float128})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_mc68.jl b/src/C/hsl_subset/hsl_mc68.jl new file mode 100644 index 0000000..f2001e9 --- /dev/null +++ b/src/C/hsl_subset/hsl_mc68.jl @@ -0,0 +1,47 @@ +mutable struct Mc68Control{INT} + f_array_in::INT + f_array_out::INT + min_l_workspace::INT + lp::INT + wp::INT + mp::INT + nemin::INT + print_level::INT + row_full_thresh::INT + row_search::INT +end + +mutable struct Mc68Info{INT} + flag::INT + iostat::INT + stat::INT + out_range::INT + duplicate::INT + n_compressions::INT + n_zero_eigs::INT + l_workspace::Int64 + zb01_info::INT + n_dense_rows::INT +end + +function mc68_default_control(::Type{Int32}, control) + @ccall libhsl_subset.mc68_default_control_d(control::Ref{Mc68Control{Int32}})::Cvoid +end + +function mc68_default_control(::Type{Int64}, control) + @ccall libhsl_subset_64.mc68_default_control_d_64(control::Ref{Mc68Control{Int64}})::Cvoid +end + +function mc68_order(::Type{Int32}, ord, n, ptr, row, perm, control, info) + @ccall libhsl_subset.mc68_order_d(ord::Int32, n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + perm::Ptr{Int32}, + control::Ref{Mc68Control{Int32}}, + info::Ref{Mc68Info{Int32}})::Cvoid +end + +function mc68_order(::Type{Int64}, ord, n, ptr, row, perm, control, info) + @ccall libhsl_subset_64.mc68_order_d_64(ord::Int64, n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + perm::Ptr{Int64}, + control::Ref{Mc68Control{Int64}}, + info::Ref{Mc68Info{Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_mi20.jl b/src/C/hsl_subset/hsl_mi20.jl new file mode 100644 index 0000000..95ca3ba --- /dev/null +++ b/src/C/hsl_subset/hsl_mi20.jl @@ -0,0 +1,421 @@ +mutable struct Mi20Control{T, INT} + f_arrays::INT + aggressive::INT + c_fail::INT + max_levels::INT + max_points::INT + reduction::T + st_method::INT + st_parameter::T + testing::INT + trunc_parameter::T + coarse_solver::INT + coarse_solver_its::INT + damping::T + err_tol::T + levels::INT + pre_smoothing::INT + smoother::INT + post_smoothing::INT + v_iterations::INT + print_level::INT + print::INT + error::INT + one_pass_coarsen::INT +end + +mutable struct Mi20SolveControl{T, INT} + abs_tol::T + breakdown_tol::T + gmres_restart::INT + init_guess::Bool + krylov_solver::INT + max_its::INT + preconditioner_side::INT + rel_tol::T +end + +mutable struct Mi20Info{T, INT} + flag::INT + clevels::INT + cpoints::INT + cnnz::INT + stat::INT + getrf_info::INT + iterations::INT + residual::T +end + +function mi20_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.mi20_default_control_s(control::Ref{Mi20Control{Float32, Int32}})::Cvoid +end + +function mi20_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.mi20_default_control_d(control::Ref{Mi20Control{Float64, Int32}})::Cvoid +end + +function mi20_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.mi20_default_control_q(control::Ref{Mi20Control{Float128, Int32}})::Cvoid +end + +function mi20_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi20_default_control_s_64(control::Ref{Mi20Control{Float32, Int64}})::Cvoid +end + +function mi20_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi20_default_control_d_64(control::Ref{Mi20Control{Float64, Int64}})::Cvoid +end + +function mi20_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi20_default_control_q_64(control::Ref{Mi20Control{Float128, Int64}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float32}, ::Type{Int32}, solve_control) + @ccall libhsl_subset.mi20_default_solve_control_s(solve_control::Ref{Mi20SolveControl{Float32, + Int32}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float64}, ::Type{Int32}, solve_control) + @ccall libhsl_subset.mi20_default_solve_control_d(solve_control::Ref{Mi20SolveControl{Float64, + Int32}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float128}, ::Type{Int32}, solve_control) + @ccall libhsl_subset.mi20_default_solve_control_q(solve_control::Ref{Mi20SolveControl{Float128, + Int32}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float32}, ::Type{Int64}, solve_control) + @ccall libhsl_subset_64.mi20_default_solve_control_s_64(solve_control::Ref{Mi20SolveControl{Float32, + Int64}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float64}, ::Type{Int64}, solve_control) + @ccall libhsl_subset_64.mi20_default_solve_control_d_64(solve_control::Ref{Mi20SolveControl{Float64, + Int64}})::Cvoid +end + +function mi20_default_solve_control(::Type{Float128}, ::Type{Int64}, solve_control) + @ccall libhsl_subset_64.mi20_default_solve_control_q_64(solve_control::Ref{Mi20SolveControl{Float128, + Int64}})::Cvoid +end + +function mi20_setup(::Type{Float32}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_s(n::Cint, ptr::Ptr{Int32}, col::Ptr{Int32}, val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_setup(::Type{Float64}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_d(n::Cint, ptr::Ptr{Int32}, col::Ptr{Int32}, val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_setup(::Type{Float128}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_q(n::Cint, ptr::Ptr{Int32}, col::Ptr{Int32}, val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_setup(::Type{Float32}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_s_64(n::Cint, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_setup(::Type{Float64}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_d_64(n::Cint, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_setup(::Type{Float128}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_q_64(n::Cint, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_setup_csr(::Type{Float32}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csr_s(n::Int32, ptr::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_setup_csr(::Type{Float64}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csr_d(n::Int32, ptr::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_setup_csr(::Type{Float128}, ::Type{Int32}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csr_q(n::Int32, ptr::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_setup_csr(::Type{Float32}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csr_s_64(n::Int64, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_setup_csr(::Type{Float64}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csr_d_64(n::Int64, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_setup_csr(::Type{Float128}, ::Type{Int64}, n, ptr, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csr_q_64(n::Int64, ptr::Ptr{Int64}, col::Ptr{Int64}, + val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_setup_csc(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csc_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_setup_csc(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csc_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_setup_csc(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_csc_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_setup_csc(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csc_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_setup_csc(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csc_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_setup_csc(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_csc_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_setup_coord(::Type{Float32}, ::Type{Int32}, n, ne, row, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_coord_s(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_setup_coord(::Type{Float64}, ::Type{Int32}, n, ne, row, col, val, keep, control, info) + @ccall libhsl_subset.mi20_setup_coord_d(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_setup_coord(::Type{Float128}, ::Type{Int32}, n, ne, row, col, val, keep, control, + info) + @ccall libhsl_subset.mi20_setup_coord_q(n::Int32, ne::Int32, row::Ptr{Int32}, col::Ptr{Int32}, + val::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_setup_coord(::Type{Float32}, ::Type{Int64}, n, ne, row, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_coord_s_64(n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float32}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_setup_coord(::Type{Float64}, ::Type{Int64}, n, ne, row, col, val, keep, control, info) + @ccall libhsl_subset_64.mi20_setup_coord_d_64(n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float64}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_setup_coord(::Type{Float128}, ::Type{Int64}, n, ne, row, col, val, keep, control, + info) + @ccall libhsl_subset_64.mi20_setup_coord_q_64(n::Int64, ne::Int64, row::Ptr{Int64}, + col::Ptr{Int64}, + val::Ptr{Float128}, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_finalize(::Type{Float32}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.mi20_finalize_s(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_finalize(::Type{Float64}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.mi20_finalize_d(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_finalize(::Type{Float128}, ::Type{Int32}, keep, control, info) + @ccall libhsl_subset.mi20_finalize_q(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_finalize(::Type{Float32}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.mi20_finalize_s_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_finalize(::Type{Float64}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.mi20_finalize_d_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_finalize(::Type{Float128}, ::Type{Int64}, keep, control, info) + @ccall libhsl_subset_64.mi20_finalize_q_64(keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_precondition(::Type{Float32}, ::Type{Int32}, rhs, solution, keep, control, info) + @ccall libhsl_subset.mi20_precondition_s(rhs::Ptr{Float32}, solution::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_precondition(::Type{Float64}, ::Type{Int32}, rhs, solution, keep, control, info) + @ccall libhsl_subset.mi20_precondition_d(rhs::Ptr{Float64}, solution::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_precondition(::Type{Float128}, ::Type{Int32}, rhs, solution, keep, control, info) + @ccall libhsl_subset.mi20_precondition_q(rhs::Ptr{Float128}, solution::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_precondition(::Type{Float32}, ::Type{Int64}, rhs, solution, keep, control, info) + @ccall libhsl_subset_64.mi20_precondition_s_64(rhs::Ptr{Float32}, solution::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_precondition(::Type{Float64}, ::Type{Int64}, rhs, solution, keep, control, info) + @ccall libhsl_subset_64.mi20_precondition_d_64(rhs::Ptr{Float64}, solution::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_precondition(::Type{Float128}, ::Type{Int64}, rhs, solution, keep, control, info) + @ccall libhsl_subset_64.mi20_precondition_q_64(rhs::Ptr{Float128}, solution::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end + +function mi20_solve(::Type{Float32}, ::Type{Int32}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset.mi20_solve_s(rhs::Ptr{Float32}, solution::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int32}}, + solve_control::Ref{Mi20SolveControl{Float32, Int32}}, + info::Ref{Mi20Info{Float32, Int32}})::Cvoid +end + +function mi20_solve(::Type{Float64}, ::Type{Int32}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset.mi20_solve_d(rhs::Ptr{Float64}, solution::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int32}}, + solve_control::Ref{Mi20SolveControl{Float64, Int32}}, + info::Ref{Mi20Info{Float64, Int32}})::Cvoid +end + +function mi20_solve(::Type{Float128}, ::Type{Int32}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset.mi20_solve_q(rhs::Ptr{Float128}, solution::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int32}}, + solve_control::Ref{Mi20SolveControl{Float128, Int32}}, + info::Ref{Mi20Info{Float128, Int32}})::Cvoid +end + +function mi20_solve(::Type{Float32}, ::Type{Int64}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset_64.mi20_solve_s_64(rhs::Ptr{Float32}, solution::Ptr{Float32}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float32, Int64}}, + solve_control::Ref{Mi20SolveControl{Float32, Int64}}, + info::Ref{Mi20Info{Float32, Int64}})::Cvoid +end + +function mi20_solve(::Type{Float64}, ::Type{Int64}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset_64.mi20_solve_d_64(rhs::Ptr{Float64}, solution::Ptr{Float64}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float64, Int64}}, + solve_control::Ref{Mi20SolveControl{Float64, Int64}}, + info::Ref{Mi20Info{Float64, Int64}})::Cvoid +end + +function mi20_solve(::Type{Float128}, ::Type{Int64}, rhs, solution, keep, control, solve_control, + info) + @ccall libhsl_subset_64.mi20_solve_q_64(rhs::Ptr{Float128}, solution::Ptr{Float128}, + keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi20Control{Float128, Int64}}, + solve_control::Ref{Mi20SolveControl{Float128, Int64}}, + info::Ref{Mi20Info{Float128, Int64}})::Cvoid +end diff --git a/src/C/hsl_subset/hsl_mi28.jl b/src/C/hsl_subset/hsl_mi28.jl new file mode 100644 index 0000000..746b293 --- /dev/null +++ b/src/C/hsl_subset/hsl_mi28.jl @@ -0,0 +1,222 @@ +mutable struct Mi28Control{T, INT} + f_arrays::INT + alpha::T + check::Bool + iorder::INT + iscale::INT + lowalpha::T + maxshift::INT + rrt::Bool + shift_factor::T + shift_factor2::T + small::T + tau1::T + tau2::T + unit_error::INT + unit_warning::INT +end + +mutable struct Mi28Info{T, INT} + band_after::INT + band_before::INT + dup::INT + flag::INT + flag61::INT + flag64::INT + flag68::INT + flag77::INT + nrestart::INT + nshift::INT + oor::INT + profile_before::T + profile_after::T + size_r::Int64 + stat::INT + alpha::T +end + +function mi28_default_control(::Type{Float32}, ::Type{Int32}, control) + @ccall libhsl_subset.mi28_default_control_s(control::Ref{Mi28Control{Float32, Int32}})::Cvoid +end + +function mi28_default_control(::Type{Float64}, ::Type{Int32}, control) + @ccall libhsl_subset.mi28_default_control_d(control::Ref{Mi28Control{Float64, Int32}})::Cvoid +end + +function mi28_default_control(::Type{Float128}, ::Type{Int32}, control) + @ccall libhsl_subset.mi28_default_control_q(control::Ref{Mi28Control{Float128, Int32}})::Cvoid +end + +function mi28_default_control(::Type{Float32}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi28_default_control_s_64(control::Ref{Mi28Control{Float32, Int64}})::Cvoid +end + +function mi28_default_control(::Type{Float64}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi28_default_control_d_64(control::Ref{Mi28Control{Float64, Int64}})::Cvoid +end + +function mi28_default_control(::Type{Float128}, ::Type{Int64}, control) + @ccall libhsl_subset_64.mi28_default_control_q_64(control::Ref{Mi28Control{Float128, Int64}})::Cvoid +end + +function mi28_factorize(::Type{Float32}, ::Type{Int32}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset.mi28_factorize_s(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float32}, + lsize::Int32, rsize::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float32, Int32}}, + info::Ref{Mi28Info{Float32, Int32}}, + scale::Ptr{Float32}, perm::Ptr{Int32})::Cvoid +end + +function mi28_factorize(::Type{Float64}, ::Type{Int32}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset.mi28_factorize_d(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float64}, + lsize::Int32, rsize::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float64, Int32}}, + info::Ref{Mi28Info{Float64, Int32}}, + scale::Ptr{Float64}, perm::Ptr{Int32})::Cvoid +end + +function mi28_factorize(::Type{Float128}, ::Type{Int32}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset.mi28_factorize_q(n::Int32, ptr::Ptr{Int32}, row::Ptr{Int32}, + val::Ptr{Float128}, + lsize::Int32, rsize::Int32, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float128, Int32}}, + info::Ref{Mi28Info{Float128, Int32}}, + scale::Ptr{Float128}, perm::Ptr{Int32})::Cvoid +end + +function mi28_factorize(::Type{Float32}, ::Type{Int64}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset_64.mi28_factorize_s_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float32}, + lsize::Int64, rsize::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float32, Int64}}, + info::Ref{Mi28Info{Float32, Int64}}, + scale::Ptr{Float32}, perm::Ptr{Int64})::Cvoid +end + +function mi28_factorize(::Type{Float64}, ::Type{Int64}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset_64.mi28_factorize_d_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float64}, + lsize::Int64, rsize::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float64, Int64}}, + info::Ref{Mi28Info{Float64, Int64}}, + scale::Ptr{Float64}, perm::Ptr{Int64})::Cvoid +end + +function mi28_factorize(::Type{Float128}, ::Type{Int64}, n, ptr, row, val, lsize, rsize, keep, + control, info, scale, perm) + @ccall libhsl_subset_64.mi28_factorize_q_64(n::Int64, ptr::Ptr{Int64}, row::Ptr{Int64}, + val::Ptr{Float128}, + lsize::Int64, rsize::Int64, keep::Ptr{Ptr{Cvoid}}, + control::Ref{Mi28Control{Float128, Int64}}, + info::Ref{Mi28Info{Float128, Int64}}, + scale::Ptr{Float128}, perm::Ptr{Int64})::Cvoid +end + +function mi28_precondition(::Type{Float32}, ::Type{Int32}, n, keep, z, y, info) + @ccall libhsl_subset.mi28_precondition_s(n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float32}, + y::Ptr{Float32}, + info::Ref{Mi28Info{Float32, Int32}})::Cvoid +end + +function mi28_precondition(::Type{Float64}, ::Type{Int32}, n, keep, z, y, info) + @ccall libhsl_subset.mi28_precondition_d(n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float64}, + y::Ptr{Float64}, + info::Ref{Mi28Info{Float64, Int32}})::Cvoid +end + +function mi28_precondition(::Type{Float128}, ::Type{Int32}, n, keep, z, y, info) + @ccall libhsl_subset.mi28_precondition_q(n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float128}, + y::Ptr{Float128}, + info::Ref{Mi28Info{Float128, Int32}})::Cvoid +end + +function mi28_precondition(::Type{Float32}, ::Type{Int64}, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_precondition_s_64(n::Int64, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float32}, + y::Ptr{Float32}, + info::Ref{Mi28Info{Float32, Int64}})::Cvoid +end + +function mi28_precondition(::Type{Float64}, ::Type{Int64}, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_precondition_d_64(n::Int64, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float64}, + y::Ptr{Float64}, + info::Ref{Mi28Info{Float64, Int64}})::Cvoid +end + +function mi28_precondition(::Type{Float128}, ::Type{Int64}, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_precondition_q_64(n::Int64, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float128}, + y::Ptr{Float128}, + info::Ref{Mi28Info{Float128, Int64}})::Cvoid +end + +function mi28_solve(::Type{Float32}, ::Type{Int32}, trans, n, keep, z, y, info) + @ccall libhsl_subset.mi28_solve_s(trans::Bool, n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float32}, + y::Ptr{Float32}, info::Ref{Mi28Info{Float32, Int32}})::Cvoid +end + +function mi28_solve(::Type{Float64}, ::Type{Int32}, trans, n, keep, z, y, info) + @ccall libhsl_subset.mi28_solve_d(trans::Bool, n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float64}, + y::Ptr{Float64}, info::Ref{Mi28Info{Float64, Int32}})::Cvoid +end + +function mi28_solve(::Type{Float128}, ::Type{Int32}, trans, n, keep, z, y, info) + @ccall libhsl_subset.mi28_solve_q(trans::Bool, n::Int32, keep::Ptr{Ptr{Cvoid}}, z::Ptr{Float128}, + y::Ptr{Float128}, info::Ref{Mi28Info{Float128, Int32}})::Cvoid +end + +function mi28_solve(::Type{Float32}, ::Type{Int64}, trans, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_solve_s_64(trans::Bool, n::Int64, keep::Ptr{Ptr{Cvoid}}, + z::Ptr{Float32}, + y::Ptr{Float32}, + info::Ref{Mi28Info{Float32, Int64}})::Cvoid +end + +function mi28_solve(::Type{Float64}, ::Type{Int64}, trans, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_solve_d_64(trans::Bool, n::Int64, keep::Ptr{Ptr{Cvoid}}, + z::Ptr{Float64}, + y::Ptr{Float64}, + info::Ref{Mi28Info{Float64, Int64}})::Cvoid +end + +function mi28_solve(::Type{Float128}, ::Type{Int64}, trans, n, keep, z, y, info) + @ccall libhsl_subset_64.mi28_solve_q_64(trans::Bool, n::Int64, keep::Ptr{Ptr{Cvoid}}, + z::Ptr{Float128}, + y::Ptr{Float128}, + info::Ref{Mi28Info{Float128, Int64}})::Cvoid +end + +function mi28_finalise(::Type{Float32}, ::Type{Int32}, keep, info) + @ccall libhsl_subset.mi28_finalise_s(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float32, Int32}})::Cvoid +end + +function mi28_finalise(::Type{Float64}, ::Type{Int32}, keep, info) + @ccall libhsl_subset.mi28_finalise_d(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float64, Int32}})::Cvoid +end + +function mi28_finalise(::Type{Float128}, ::Type{Int32}, keep, info) + @ccall libhsl_subset.mi28_finalise_q(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float128, Int32}})::Cvoid +end + +function mi28_finalise(::Type{Float32}, ::Type{Int64}, keep, info) + @ccall libhsl_subset_64.mi28_finalise_s_64(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float32, Int64}})::Cvoid +end + +function mi28_finalise(::Type{Float64}, ::Type{Int64}, keep, info) + @ccall libhsl_subset_64.mi28_finalise_d_64(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float64, Int64}})::Cvoid +end + +function mi28_finalise(::Type{Float128}, ::Type{Int64}, keep, info) + @ccall libhsl_subset_64.mi28_finalise_q_64(keep::Ptr{Ptr{Cvoid}}, + info::Ref{Mi28Info{Float128, Int64}})::Cvoid +end diff --git a/src/wrappers.jl b/src/wrappers.jl index 4dc6e35..3bfb800 100644 --- a/src/wrappers.jl +++ b/src/wrappers.jl @@ -19,6 +19,17 @@ include("C/libhsl/hsl_mc79.jl") include("C/libhsl/hsl_mi20.jl") include("C/libhsl/hsl_mi28.jl") +include("C/hsl_subset/hsl_ma48.jl") +include("C/hsl_subset/hsl_ma57.jl") +include("C/hsl_subset/hsl_ma77.jl") +include("C/hsl_subset/hsl_ma86.jl") +include("C/hsl_subset/hsl_ma87.jl") +include("C/hsl_subset/hsl_ma97.jl") +include("C/hsl_subset/hsl_mc64.jl") +include("C/hsl_subset/hsl_mc68.jl") +include("C/hsl_subset/hsl_mi20.jl") +include("C/hsl_subset/hsl_mi28.jl") + # Wrappers for HSL packages written in Fortran 77 include("Fortran/libhsl/btf.jl") include("Fortran/libhsl/ea16.jl")