We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#include "clad/Differentiator/Differentiator.h" #include <iostream> #define show(x) std::cout << #x << ": " << x << "\n"; class Identity { public: double operator()(double u) { return u; } }; template<class F> double algo(F f, double x) { double val = f(x); return val * val; } int main() { auto grad = clad::gradient(algo<Identity>); double x=3, dx=0; Identity di; grad.execute(Identity(), x, &di, &dx); show(dx); // This prints: x: 6 }
See #637 (comment)
The text was updated successfully, but these errors were encountered:
Hi! Sorry, I think I got something wrong when I made my comment, and this is actually the problem that was fixed by: #645
Sorry, something went wrong.
@guitargeek so we can close this one?
Yes. Sorry, I confused something here!
No branches or pull requests
See #637 (comment)
The text was updated successfully, but these errors were encountered: