Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrantq committed Oct 15, 2024
1 parent c88be1f commit 07b5b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ ENZYME_PATH ?= /home/brant/sync/Enzyme/build/Enzyme/ClangEnzyme-15.so
LLVM_PATH ?= /home/brant/llvms/llvm15/build/bin
CXX = $(LLVM_PATH)/clang++

CXXFLAGS = -I/home/brant/include \
CXXFLAGS = -O3 -Wall \
-I/home/brant/include \
-L/home/brant/lib \
-I /usr/include/c++/11 \
-I /usr/include/x86_64-linux-gnu/c++/11 \
Expand Down Expand Up @@ -41,13 +42,13 @@ example-logged.cpp: $(SRC)
python3 fpopt-logged-driver-generator.py $(SRC) example

example.exe: example.cpp
$(CXX) -Wall -O3 example.cpp $(CXXFLAGS) -o $@
$(CXX) example.cpp $(CXXFLAGS) -o $@

example-golden.exe: example-golden.cpp
$(CXX) -Wall -O3 example-golden.cpp $(CXXFLAGS) -lmpfr -o $@
$(CXX) example-golden.cpp $(CXXFLAGS) -lmpfr -o $@

example-logged.exe: example-logged.cpp $(LOGGER)
$(CXX) -Wall -O3 $(LOGGER) example-logged.cpp $(CXXFLAGS) -o $@
$(CXX) $(LOGGER) example-logged.cpp $(CXXFLAGS) -mllvm --enzyme-inline=0 -o $@

example.txt: example-logged.exe
./example-logged.exe > $@
Expand Down
1 change: 1 addition & 0 deletions example/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ## PRE c: 1, 9
// ## PRE a: 1, 9
// ## PRE b: 1, 9
__attribute__((noinline))
double example(double a, double b, double c) {
double tmp;
if (a < b) {
Expand Down

0 comments on commit 07b5b45

Please sign in to comment.