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
it doesn't matter if the argument;s default value is overwritten with another value or not -- Clad crashes anyway. it's important to prevent Clad from crashing in this case even if we don't support the default arguments in general yet (#1028), since some STL (#1067) and Kokkos functionality depends on this.
reproducer:
#include"clad/Differentiator/Differentiator.h"
#include"clad/Differentiator/STLBuiltins.h"
#include<iostream>
#include<string>
#defineshow(x) std::cout << #x << ": " << x << "\n";
doubleg(double x, const std::string &s = "default string") {
return x;
}
doublefn(double u, double v) {
double x = g(u);
return x;
}
intmain() {
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);
}
The text was updated successfully, but these errors were encountered:
it doesn't matter if the argument;s default value is overwritten with another value or not -- Clad crashes anyway. it's important to prevent Clad from crashing in this case even if we don't support the default arguments in general yet (#1028), since some STL (#1067) and Kokkos functionality depends on this.
reproducer:
The text was updated successfully, but these errors were encountered: