File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ if(BFFT_BUILD_EXAMPLES)
8787 target_link_libraries (benchmark PRIVATE ${CMAKE_DL_LIBS } )
8888 endif ()
8989
90+ bfft_add_cpp_executable (locality_probe examples/locality_probe.cpp )
9091 bfft_add_cpp_executable (cpp_api_demo examples/cpp_api_demo.cpp )
9192 bfft_add_c_executable (c_api_demo examples/c_api_demo.c )
9293
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ STATIC_LIB := $(BUILD_DIR)/lib$(LIB_NAME).a
4040SHARED_LIB := $(BUILD_DIR ) /lib$(LIB_NAME ) .so
4141PC_FILE := $(BUILD_DIR ) /$(LIB_NAME ) .pc
4242BENCH := $(BUILD_DIR ) /examples/benchmark
43+ LOCALITY_PROBE := $(BUILD_DIR ) /examples/locality_probe
4344C_DEMO := $(BUILD_DIR ) /examples/c_api_demo
4445CPP_DEMO := $(BUILD_DIR ) /examples/cpp_api_demo
4546CORRECTNESS_TEST := $(BUILD_DIR ) /tests/correctness
@@ -73,11 +74,14 @@ $(PC_FILE): pkgconfig/bfft.pc.in | $(BUILD_DIR)
7374 -e ' s|@PROJECT_VERSION@|$(VERSION)|g' \
7475 $< > $@
7576
76- examples : $(BENCH ) $(C_DEMO ) $(CPP_DEMO )
77+ examples : $(BENCH ) $(LOCALITY_PROBE ) $( C_DEMO ) $(CPP_DEMO )
7778
7879$(BENCH ) : examples/benchmark.cpp include/bfft/bfft.hpp $(STATIC_LIB ) | $(BUILD_DIR )
7980 $(CXX ) $(CPPFLAGS ) $(INCLUDES ) $(CXXFLAGS ) $< $(STATIC_LIB ) $(LDLIBS ) $(DL_LIBS ) -o $@
8081
82+ $(LOCALITY_PROBE ) : examples/locality_probe.cpp include/bfft/bfft.hpp $(STATIC_LIB ) | $(BUILD_DIR )
83+ $(CXX ) $(CPPFLAGS ) $(INCLUDES ) $(CXXFLAGS ) $< $(STATIC_LIB ) $(LDLIBS ) -o $@
84+
8185$(C_DEMO ) : examples/c_api_demo.c include/bfft/bfft.h $(STATIC_LIB ) | $(BUILD_DIR )
8286 $(CC ) $(CPPFLAGS ) $(INCLUDES ) $(CFLAGS ) $< $(STATIC_LIB ) $(LDLIBS ) -lstdc++ -o $@
8387
Original file line number Diff line number Diff line change 5555
5656build/examples/benchmark --intel-mkl
5757build/examples/benchmark --intel-mkl 1024 1000
58+
59+ Locality probe:
60+
61+ The ordinary make examples target also builds build/examples/locality_probe.
62+ It compares hot-cache timing with a rotating working set sized by ring_mib.
63+
64+ build/examples/locality_probe
65+ build/examples/locality_probe 65536 240 64
You can’t perform that action at this time.
0 commit comments