Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

  • Added detailed docstrings for key cache management functions
  • Improved documentation for automatic differentiation support
  • Enhanced clarity on internal resizing behavior

Changes

  • Added comprehensive docstring for get_tmp(::FixedSizeDiffCache, ...) explaining:
    • Dual number handling for ForwardDiff.jl integration
    • Type promotion and cache selection logic
    • Seamless AD switching behavior
  • Added docstring for enlargediffcache! explaining:
    • When and why the function is called
    • Performance implications
    • Warning behavior and optimization suggestions

Test Plan

  • Documentation builds correctly
  • Docstrings display properly in REPL help
  • No functional changes, only documentation improvements

This PR improves the documentation consistency in PreallocationTools.jl by ensuring internal functions that users might encounter (via warnings or when debugging) have proper documentation.

ChrisRackauckas and others added 2 commits August 16, 2025 18:23
- Added detailed docstring for get_tmp explaining dual number handling
- Added docstring for enlargediffcache! explaining resizing behavior
- Improved documentation for automatic differentiation support
- Created internals.md documenting internal functions
- Added internal functions to documentation navigation
- Documented get_tmp overloads and enlargediffcache!
- Added warning that these are internal implementation details
@ChrisRackauckas-Claude
Copy link
Author

I've added an internals documentation section as requested:

  • Created docs/src/internals.md with documentation for internal functions
  • Added the internals page to the documentation navigation in docs/pages.jl
  • Included warnings that these are internal implementation details subject to change
  • The internal functions are now properly documented in a dedicated section separate from the public API

This keeps the main API documentation clean while still providing documentation for users who might encounter these functions during debugging or when the enlargement warning appears.

@ChrisRackauckas ChrisRackauckas merged commit 07e3a76 into SciML:master Aug 17, 2025
10 of 15 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.

3 participants