Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested function calls in the forward mode #116

Closed
efremale opened this issue Mar 29, 2019 · 2 comments
Closed

Fix nested function calls in the forward mode #116

efremale opened this issue Mar 29, 2019 · 2 comments

Comments

@efremale
Copy link
Contributor

At the moment, calls in the forward mode work correctly only if called function has one input.
If a function f is called with args a1, a2, ..., its derivative should be a dot product of gradient(f)(a1, a2, ...) and a vector of derivatives of args: { da1, da2, ...}.

This dot product can be efficiently computed by differentiating f in the forward mode and providing values of da1, da2, ... as seeds. See issue #100.

@vaithak
Copy link
Collaborator

vaithak commented Dec 22, 2023

Similar to #100, this was fixed in #565 and many subsequent PRs which added the vector forward mode support.

We also have many test cases present with the vector mode interface: https://github.com/vgvassilev/clad/blob/master/test/ForwardMode/VectorMode.C.
Demo example: https://github.com/vgvassilev/clad/blob/master/demos/VectorForwardMode.cpp

@vgvassilev
Copy link
Owner

Thanks @vaithak, let's close the issue now.

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

No branches or pull requests

3 participants