This repository was archived by the owner on Jul 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Make SplineGrid evaluation 'less in-place' #97
Copy link
Copy link
Open
Labels
RefactorRewrite existing functionality in a better wayRewrite existing functionality in a better way
Description
The in-place nature of the SplineGrid evaluation makes defining custom AD rules quite a hassle if not impossible in certain cases. Therefore I propose:
- Make a method
evaluate!(eval::AbstractArray{Tv}, control_points::AbstractControlPointArray{Tv}, weights::AbstractWeightArray{Tv}, spline_grid::SplineGrid{Tv}; kwargs...) where {Tv}which contains the actual computation (and analogous forevaluate_adjoint!); - Make convenience methods of the methods above where the weights do not have to be specified;
- Make a convenience
evaluate!method forSplineGridwith the signature that already exists, calling the above - Specify in the docs that for use with AD these more explicit methods should be used
where const AbstractWeightArray{Tv} = Union{Nothing, AbstractArray{Tv}} where {Tv}
Something similar is also convenient for evaluation of locally refined control points. This should probably be a follow-up issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RefactorRewrite existing functionality in a better wayRewrite existing functionality in a better way