matbesancon/MathOptSetDistances.jl

Add inplace versions

matbesancon opened this issue · 3 comments

Inplace versions for projection_on_set, projection_gradient_on_set

This is likely not gonna be AD-friendly, which will be problematic for projection_on_set more than projection_gradient_on_set

What do we want as the interface for this? Would be very helpful for a solver I'm working on right now, so I can make these changes easily

I'm already implementing these for the projections
https://github.com/tjdiamandis/GeNIOS.jl/blob/4c26b2dfdc5fa94839de7a50b4e387d7f5ae9e1c/src/cones.jl#L103

I think somethnig close to what you have in there, with an additional argument for the distance and we are good, so

projection_on_set!(y, ::DefaultDistance, v::AbstractVector{T}, ::MOI.Zeros)