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
std::vector
reproducer:
#include "clad/Differentiator/Differentiator.h" #include "clad/Differentiator/STLBuiltins.h" #include <vector> #include <iostream> double fn(double x, double y) { std::vector<double> a; a.push_back(0); // the problem is with pushing literal values for some reason a[1] = x*x; return a[1]; } int main(int argc, char* argv[]) { double dx=0, dy=0; auto df = clad::gradient(fn, "x, y"); std::cout << fn(3, 4) << '\n'; df.execute(3, 4, &dx, &dy); std::cout << dx << ' ' << dy << '\n'; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
reproducer:
The text was updated successfully, but these errors were encountered: