libigl 🤝 enzyme
Enzyme requires matching to its version of llvm. On Mac its not obvious how to use the built in clang/llvm, so instead we'll assume you have installed llvm and enzyme via homebrew:
brew install llvm enzyme
Then you can build with the usual
mkdir build
cd build
cmake ../
make
From within the build
directory just issue:
./example
A glfw app should launch displaying a knight with white lines indicating the computed gradients.
At the moment, Enzyme will crash at compile time differentiating
programs that contain calls to
std::cerr<<
.
Libigl as of
fe65ecb
(e.g., pulled by this repos build) avoids std::cerr
but some functions will
still do it (e.g., when a solver or meshIO fails).