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
I've been working on the array segfaults (PR #1691) and the Elliptic Integrals (PR #1674) recently. Digging into those issues made me realize there's still a pretty big gap in how Clad handles standard C++ types and modern math functions.
I’ve put together a GSoC proposal to tackle this properly.
The Core Idea
I want to focus on "Interoperability." Right now, passing a basic C-array crashes Clad, and we're missing most of the C++17 <cmath> headers. My plan is to fix the plumbing so users can just pass their standard data structures and get derivatives without fighting the tool.
Dynamic Containers: Extend the code generator to support std::vector and std::span. This implies synthesizing loops in the derivative code rather than unrolling them, which is critical for variable-length inputs.
Full Math Support: Implement the missing 18 special functions (Bessel, Legendre, Zeta, etc.) to hit 100% coverage of C++17 <cmath>.
I’ve drafted the full technical approach and timeline here: [Link]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @vgvassilev,
I've been working on the array segfaults (PR #1691) and the Elliptic Integrals (PR #1674) recently. Digging into those issues made me realize there's still a pretty big gap in how Clad handles standard C++ types and modern math functions.
I’ve put together a GSoC proposal to tackle this properly.
The Core Idea
I want to focus on "Interoperability." Right now, passing a basic C-array crashes Clad, and we're missing most of the C++17
<cmath>headers. My plan is to fix the plumbing so users can just pass their standard data structures and get derivatives without fighting the tool.The Plan
T[N]andstd::array. This builds directly on the fix I added in Fix: Add static_assert to prevent segfault in execute() with array arguments (#1690) #1691 to permanently stop the runtime crashes.std::vectorandstd::span. This implies synthesizing loops in the derivative code rather than unrolling them, which is critical for variable-length inputs.<cmath>.I’ve drafted the full technical approach and timeline here:
[Link]
Let me know if this scope feels right to you.
Best,
Ayush
Beta Was this translation helpful? Give feedback.
All reactions