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

Clad breaks when using some std::vector constructors in the reverse mode #1067

Open
gojakuch opened this issue Aug 29, 2024 · 4 comments
Open

Comments

@gojakuch
Copy link
Collaborator

reproducer:

#include "clad/Differentiator/Differentiator.h"
#include "clad/Differentiator/STLBuiltins.h"
#include <iostream>
#include <vector>

#define show(x) std::cout << #x << ": " << x << "\n";

double fn(double u, double v) {
    std::vector<double> vec(3);
    return 0;
}

int main() {
    auto d_fn = clad::gradient(fn);
    double u = 3, v = 5;
    double du, dv;
    du = dv = 0;
    show(fn(u, v));
    d_fn.execute(u, v, &du, &dv);
    show(du);
    show(dv);
}
@gojakuch gojakuch changed the title Clad breaks when using some std::vector constructors Clad breaks when using some std::vector constructors in the reverse mode Aug 29, 2024
@SreeSharvesh
Copy link

SreeSharvesh commented Aug 30, 2024

Hi! I would like to solve this issue...Can you assign it to me??

@vgvassilev
Copy link
Owner

Hi! I would like to solve this issue...Can you assign it to me??

Please submit a pull request.

@gojakuch
Copy link
Collaborator Author

Hi! I would like to solve this issue...Can you assign it to me??

Hi @SreeSharvesh, as Vassil has said just submit a pull request solving this issue and mark it appropriately as described here. feel free to ask any questions about the issue here.

@gojakuch
Copy link
Collaborator Author

depends on #1118 (likely not on all systems though)

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