Skip to content

Handle isbits wrapper eltypes in DiffCache#178

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:general-isbits-diffcache-eltype
Jul 8, 2026
Merged

Handle isbits wrapper eltypes in DiffCache#178
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:general-isbits-diffcache-eltype

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

This PR should be ignored until reviewed by @ChrisRackauckas.

Summary

  • Preserve isbits wrapper eltypes for DiffCache when the active ForwardDiff input is a dual type, e.g. Complex{Float64} now maps to Complex{Dual} instead of a plain Dual array.
  • Generalize the behavior through recursive type-parameter replacement, including promoted numeric parameters like ComplexF32 with a Float64 dual.
  • Add regression coverage for the issue MWE, a custom isbits wrapper, and ComplexF32.

Closes #47.

Local verification

  • timeout 3600 /home/crackauc/.juliaup/bin/julia +1.10 --project=. -e 'using Runic; exit(Runic.main(ARGS))' -- --check .
  • timeout 3600 /home/crackauc/.juliaup/bin/julia +1.10 --project=. -e 'using Pkg; Pkg.test()'
  • timeout 3600 env GROUP=QA /home/crackauc/.juliaup/bin/julia +1.10 --project=. -e 'using Pkg; Pkg.test()'

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review July 8, 2026 13:28
@ChrisRackauckas ChrisRackauckas merged commit 8c65bb9 into SciML:master Jul 8, 2026
17 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.

Complex + dualcache

2 participants