From e20c2fcc43510bf762e3a681221ad08bf5551d59 Mon Sep 17 00:00:00 2001 From: Stephan Hilb <stephan@ecshi.net> Date: Thu, 5 Nov 2020 11:09:12 +0100 Subject: [PATCH] make chambolle create views in `step!()` --- src/chambolle.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chambolle.jl b/src/chambolle.jl index 882462e..7b89486 100644 --- a/src/chambolle.jl +++ b/src/chambolle.jl @@ -93,17 +93,17 @@ function LinearAlgebra.mul!(Y::AbstractVector{<:SVector}, A, B::AbstractVector{< end function step!(ctx::ChambolleState) - display(ctx.p) alg = ctx.algorithm + + sv = vec(parent(ctx.s)) + rv = vec(ctx.r) + # r = div(p) + g map!(ctx.k1, ctx.r, ctx.p) # s = B * r - mul!(ctx.sv, alg.problem.B, ctx.rv) - #display(ctx.algorithm.problem.g) - display(ctx.r) + mul!(sv, alg.problem.B, rv) # p = (p + τ*grad(s)) / (1 + τ/λ|grad(s)|) - ctx.p .= deepcopy(map!(ctx.k2, ctx.p, ctx.s)) - ctx.p .+= 1 + map!(ctx.k2, ctx.p, ctx.s) return ctx end -- GitLab