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

When a nested function call is being differentiated, and Clad fails to differentiate it, it emits a warning: _"function 'g' was not differentiated because clad failed to differentiate it and...

At the moment, calls in the forward mode work correctly only if called function has one input. If a function `f` is called with args `a1, a2, ...`, its derivative...

The idea is to replace each type `RealT` with the type `dual`, where `dual` has overloaded operators such that the first element is the same as the original value and...

Currently, if we Visit unsupported statement (e.g. try-catch, range for loop), it is simply cloned without changes and a warning is emitted. Should we instead emit a hard error and...

Currently, if differentiation process meets a function which has no defined derivative in `custom_derivatives` namespace, its derivative is set to be `0`. Example: ``` double f(double x) { printf("%d", x);...

https://github.com/vgvassilev/clad/blob/953fe26d5ca3d19adbcb0a0f40369d90bd136d0b/lib/Differentiator/DerivativeBuilder.cpp#L487 This is inefficient if no derivative for the callee exist. It can potentially lead to errors since it is likely that nondifferentiable function call has nondifferentiable arguments as well.

Now we pass the output `_result` array to gradient functions as a last parameter. This causes some problems, e.g., default parameter values cannot be used as the `_result` parameter is...

https://github.com/vgvassilev/clad/blob/11777b84b1c54221a7860e54e73ec3dc8329549b/lib/Differentiator/ConstantFolder.h#L28 m_Enable is set to false, so folding has no effect. Why?