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
Start to try Enzyme in Enzyme explorer. I found it does not compile when a runtime size container is involved, e.g. std::vector, as in the following example,
double dprod(const std::vector& v) {
double r = 1;
for (int i = 0; i < v.size(); i++) {
r *= v[i];
}
return r;
}
int main() {
double x = 3;
double d_x = __enzyme_autodiff((void*)g, enzyme_out, x);
printf("d_x = %g\n", d_x);
}
This is critical for us, because we need to use Eigen::MatrixXd and Eigen::VectorXd with their sizes determined at runtime. Their elements are functions of some physical design variables.