Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add S kwarg to opRestriction #324

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

nHackel
Copy link
Contributor

@nHackel nHackel commented Apr 11, 2024

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.

Copy link
Contributor

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

Copy link
Member

@geoffroyleconte geoffroyleconte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

@dpo dpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thank you!

For my own information, what should S be in your example in #323?

@dpo dpo merged commit ee2af5b into JuliaSmoothOptimizers:main Apr 20, 2024
33 of 35 checks passed
@nHackel
Copy link
Contributor Author

nHackel commented Apr 30, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing S keyword for opRestriction
3 participants