You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix allocation issue with accepted_kwargs by using Val types
This commit resolves issue SciML#312 by converting accepted_kwargs tuples
to Val types for compile-time kwarg filtering, eliminating runtime
allocations.
Changes:
- Modified preprocess_update_func to automatically convert tuple
accepted_kwargs to Val types
- Updated get_filtered_kwargs to handle missing keys gracefully
when using Val types
This follows the same pattern introduced in PR SciML#255 for FunctionOperator
but extends it to all operators (MatrixOperator, AffineOperator, etc.)
by fixing it at the preprocess_update_func level.
Before: 9 allocations (272 bytes) when using accepted_kwargs
After: 0 allocations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments