Skip to content

Commit

Permalink
make examples work for clang-19 (#28)
Browse files Browse the repository at this point in the history
* make examples work for clang-19

* follow conventions
  • Loading branch information
ZuseZ4 authored Nov 29, 2024
1 parent 3b1cb7b commit 88a7ffa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ int main() {
// Evaluates to 2 * x = 6.28
double grad_x = __enzyme_autodiff((void*)square, x);
printf("square'(%f) = %f\n", x, grad_x);
return 0;
}
```
Expand Down
2 changes: 2 additions & 0 deletions content/getting_started/CallingConvention.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ double __enzyme_autodiffDouble(double (*)(double), double);
int main() {
printf("float d/dx %f\n", __enzyme_autodiffFloat(square<float>, 1.0f));
printf("double d/dx %f\n", __enzyme_autodiffDouble(square<double>, 1.0));
return 0;
}
```
Expand Down Expand Up @@ -84,6 +85,7 @@ int main() {
enzyme_dup , array, d_array,
enzyme_const, size,
enzyme_out , mul);
return 0;
}
```

Expand Down
1 change: 1 addition & 0 deletions content/getting_started/UsingEnzyme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ double dsquare(double x) {
int main() {
for(double i=1; i<5; i++)
printf("square(%f)=%f, dsquare(%f)=%f", i, square(i), i, dsquare(i));
return 0;
}
```
Expand Down

0 comments on commit 88a7ffa

Please sign in to comment.