-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·38 lines (25 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
CXX = g++
NVCXX = nvc++
NVARCH = cc70
#note -O2 option led to a substantial performance degradation for (gnu) x86 backend
CXXCOPT_SKL = -O3 -mavx512f -std=c++17 -fopenmp
CXXCOPT_HSW = -O3 -mavx2 -mfma -std=c++17 -fopenmp
LDFLAG = -lm -fopenmp -L/opt/intel/tbb-gnu9.3/lib -ltbb
NVCXXOPT = -O2 -std=c++17 -stdpar -gpu=$(NVARCH) -I.
INC = -I./include
all: pstl_stencil_test.avx512 pstl_stencil_test.avx2 pstl_stencil_test.$(NVARCH)
pstl_stencil_test.avx512: hk_pstl_reference_avx512.o
$(CXX) -o $@ $^ $(LDFLAG)
hk_pstl_reference_avx512.o : hk_pstl_reference.cpp
$(CXX) $(CXXCOPT_SKL) -c -o $@ $? $(INC)
pstl_stencil_test.avx2: hk_pstl_reference_avx2.o
$(CXX) -o $@ $^ $(LDFLAG)
hk_pstl_reference_avx2.o : hk_pstl_reference.cpp
$(CXX) $(CXXCOPT_HSW) -c -o $@ $? $(INC)
pstl_stencil_test.$(NVARCH): hk_pstl_reference_$(NVARCH).o
$(NVCXX) -o $@ $^
hk_pstl_reference_$(NVARCH).o : hk_pstl_reference.cpp
$(NVCXX) $(NVCXXOPT) -c -o $@ $? $(INC)
clean:
rm *.o *.avx512 *.avx2 *.$(NVARCH)
.PHONY: clean