ParentFull threadAthas·Certainly, it reduces to reverse-mode AD on fairly arbitrary (although usual scalar) code. You definitely need a compiler or preprocessor to do that for you.View on HN