clad icon indicating copy to clipboard operation
clad copied to clipboard

clad -- automatic differentiation for C/C++

Results 301 clad issues
Sort by recently updated
recently updated
newest added

Reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" #include #define show(x) std::cout

good first issue

Some of the RooFit tests are still failing with Clad `master`, because of code that hits very specific conditions. To reproduce the underlying problem, first create a library with any...

Gradient function contains variable redefinition error when different loops have the same counter variable name. Reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" double fn(double u, double v) { double res = 0;...

good first issue

Clad crashes when differentiating a call to an empty function that has reference arguments. It's a very specific case :'). Reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" void emptyFn(double &u, double v)...

Clad crashes when passing class objects as values in function calls. Clad works well if class objects are passed as references in function calls. Reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" class...

Minimal reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" struct T { double x; }; double f1(T t) { return t.x; } double f2(T& t) { return t.x; } int main() { clad::differentiate(f1,...

good first issue

In RooFit, we were recently dealing with code like this: ```c++ #include "clad/Differentiator/Differentiator.h" #include #define show(x) std::cout

It would be very useful if passing around constant booleans around would work, or at least not result in a cryptic crash: ```c++ #include "clad/Differentiator/Differentiator.h" inline double foo(double x, bool...

Reproducer: ```c++ // Compile with clang++ -std=c++20 -fplugin=/usr/lib/clad.so missing_warning.cxx -o missing_warning #include "clad/Differentiator/Differentiator.h" #include inline double innerWrapper(double x) { return std::lgamma(x); // call any function that needs num. diff. }...

Clad generates invalid and uncompilable gradient when non-array and array declarations are mixed in one declaration statement. Reproducible example: ```cpp #include "clad/Differentiator/Differentiator.h" double fn(double u, double v) { double w,...