JuliaSmoothOptimizers / LinearOperators.jl

Linear Operators for Julia
Other
149 stars 31 forks source link

Add S kwarg to `opRestriction` #324

Closed nHackel closed 3 months ago

nHackel commented 3 months ago

This PR adds the S keyword to the opRestriction constructor. This fixes #323.

Since the operator has no type information of the storage type for a default cause of S = Vector{T} as other operators ahve, I've opted to give him a default of nothing. If S is nothing the normal operator is called, which will have a storage type of Vector{Int64}.

I did not add a opRestriction(...; kwargs...) for the constructors which fall back on other operators, since at a quick glance I didn't see such a pattern used in this package.

github-actions[bot] commented 3 months ago
Package name latest stable
CaNNOLeS.jl
DCISolver.jl
FletcherPenaltySolver.jl
JSOSolvers.jl
Krylov.jl
NLPModels.jl
NLPModelsModifiers.jl
PROPACK.jl
Percival.jl
QuadraticModels.jl
SolverTools.jl
nHackel commented 2 months ago

@dpo in that case it should have been a CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}. The last parameter seems to describe the "memory"-type of the array and it might change in future version of CUDA if I understood their Docs/plans correctly