Skip to content

Commit

Permalink
Merge pull request #27 from nathanemac/modify_tv
Browse files Browse the repository at this point in the history
bump to version 1.0.0
  • Loading branch information
nathanemac authored Dec 6, 2024
2 parents 8cb706c + 367b622 commit 9a2b0be
Show file tree
Hide file tree
Showing 6 changed files with 539 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"
ShiftedProximalOperators = "d4fd37fa-580c-4e43-9b30-361c21aae263"
proxTV_jll = "700117f8-5dbb-54dd-9908-6f3eb0e21f87"

[compat]
JuliaFormatter = "1"
LAPACK_jll = "3.12.0"
LinearAlgebra = "1"
OpenBLAS32_jll = "0.3.21"
ShiftedProximalOperators = "0.2.1"
julia = "1.9"
proxTV_jll = "3.5.0"

Expand Down
3 changes: 3 additions & 0 deletions src/ProxTV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module ProxTV
using OpenBLAS32_jll
using LAPACK_jll
using LinearAlgebra
using ShiftedProximalOperators

function __init__()
config = LinearAlgebra.BLAS.lbt_get_config()
Expand All @@ -13,5 +14,7 @@ end

# main library functions
include("libproxtv.jl")
include("proxtv_utils.jl")


end
8 changes: 6 additions & 2 deletions src/libproxtv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function PN_LPinf(y, lambda, x, info, n, ws)
end

# original PN_LPp function
function PN_LPp(y, lambda, x, info, n, p, ws, positive, objGap, ctx, callback)
function PN_LPp(y, lambda, x, info, n, p, ws, positive, ctx, callback)
context = unsafe_pointer_to_objref(ctx)::AlgorithmContextCallback
objGap = context.dualGap
@ccall libproxtv.PN_LPp(
y::Ptr{Float64},
lambda::Float64,
Expand Down Expand Up @@ -136,7 +138,9 @@ function solveLinearLP(z, n, p, lambda, s)
end

# original TV function
function TV(y, lambda, x, info, n, p, ws, ctx, callback; objGap = 1e-5)
function TV(y, lambda, x, info, n, p, ws, ctx, callback)
context = unsafe_pointer_to_objref(ctx)::AlgorithmContextCallback
objGap = context.dualGap
@ccall libproxtv.TV(
y::Ptr{Float64},
lambda::Float64,
Expand Down
Loading

0 comments on commit 9a2b0be

Please sign in to comment.