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
Gradient function contains variable redefinition error when different loops have the same counter variable name.
Reproducible example:
#include"clad/Differentiator/Differentiator.h"doublefn(double u, double v) {
double res = 0;
for (int i = 0; i < 5; ++i) {
res += i;
}
for (int i = 0; i < 5; ++i) {
res += i;
}
return res;
}
intmain() {
auto fn_grad = clad::gradient(fn);
}
_d_i is defined two times in the gradient function fn_grad.
The text was updated successfully, but these errors were encountered:
Gradient function contains variable redefinition error when different loops have the same counter variable name.
Reproducible example:
_d_i
is defined two times in the gradient functionfn_grad
.The text was updated successfully, but these errors were encountered: