Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Add a new section "In-place Evaluation (Allocation-free)" to the interface documentation
  • Document the interp(out, t) API for allocation-free interpolation
  • Include code examples for both 1D and multi-dimensional data

Motivation

This PR addresses feedback from #478 where a user discovered the in-place interpolation API by reading the source code. The API was functional but undocumented, making it difficult for users to discover this performance-critical feature.

Changes

Added documentation covering:

  • When to use in-place evaluation (ODE solvers, tight loops, performance-critical code)
  • Code example for 1D vector data with pre-allocated output
  • Code example for multi-dimensional data (matrices)
  • A performance tip explaining the allocation benefits

Test plan

  • Documentation builds successfully
  • All package tests pass (Core, Methods, Extensions, Misc)

Closes #478

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits November 26, 2025 12:52
Add a new section "In-place Evaluation (Allocation-free)" to the
interface documentation that explains how to use the in-place
interpolation API `interp(out, t)` to avoid memory allocations.

This addresses user feedback from issue SciML#478 where the in-place
interface was discovered but found to be underdocumented. The new
section includes:
- Explanation of when to use in-place evaluation (ODE solvers, tight loops)
- Code examples for 1D data with pre-allocated output arrays
- Code examples for multi-dimensional data
- Performance tip highlighting the allocation benefits

Closes SciML#478

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add documentation for in-place interpolation with vector-of-arrays data
(Vector{Vector}, Vector{Matrix}), showing how to pre-allocate the output
as a vector of arrays with the same structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 9ec2c5f into SciML:master Nov 28, 2025
2 of 3 checks passed
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.

Reducing allocations with inplace interpolation outputs

2 participants