forked from nmeyer-ur/GridBench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.grid
50 lines (39 loc) · 2 KB
/
Makefile.grid
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
39
40
41
42
43
44
45
46
47
48
49
50
# Use this utility to perform a make from the command-line using mpicc
GRIDBASE =${HOME}/Grid/install
AVX512_CFG=$(GRIDBASE)-avx512/bin/grid-config
AVX_CFG =$(GRIDBASE)-avx/bin/grid-config
SSE_CFG =$(GRIDBASE)-sse/bin/grid-config
GEN_CFG =$(GRIDBASE)-gen64/bin/grid-config
AVX512_CXX := $(shell ${AVX512_CFG} --cxx)
AVX512_CXXFLAGS := $(shell ${AVX512_CFG} --cxxflags) -I$(GRIDBASE)-avx512/include -DAVX512
AVX512_LIBS := $(shell ${AVX512_CFG} --libs) -lGrid
AVX512_LDFLAGS := $(shell ${AVX512_CFG} --ldflags) -L$(GRIDBASE)-avx512/lib
AVX_CXX := $(shell ${AVX_CFG} --cxx)
AVX_CXXFLAGS := $(shell ${AVX_CFG} --cxxflags) -I$(GRIDBASE)-avx/include -DAVX2
AVX_LIBS := $(shell ${AVX_CFG} --libs) -lGrid
AVX_LDFLAGS := $(shell ${AVX_CFG} --ldflags) -L$(GRIDBASE)-avx/lib
SSE_CXX := $(shell ${SSE_CFG} --cxx)
SSE_CXXFLAGS := $(shell ${SSE_CFG} --cxxflags) -I$(GRIDBASE)-sse/include -DSSE4
SSE_LIBS := $(shell ${SSE_CFG} --libs) -lGrid
SSE_LDFLAGS := $(shell ${SSE_CFG} --ldflags) -L$(GRIDBASE)-sse/lib
GEN_CXX := $(shell ${GEN_CFG} --cxx)
GEN_CXXFLAGS := $(shell ${GEN_CFG} --cxxflags) -I$(GRIDBASE)-gen64/include -DGEN -DGEN_SIMD_WIDTH=64
GEN_LIBS := $(shell ${GEN_CFG} --libs) -lGrid
GEN_LDFLAGS := $(shell ${GEN_CFG} --ldflags) -L$(GRIDBASE)-gen64/lib
all: avx512 avx sse gen
avx512:
$(AVX512_CXX) TableGenerate.cc $(AVX512_CXXFLAGS) $(AVX512_LIBS) $(AVX512_LDFLAGS) -o TableGenerate
sde -skx -- ./TableGenerate
mv static_data.h static_data.cc arch/avx512/
gen:
$(GEN_CXX) TableGenerate.cc $(GEN_CXXFLAGS) $(GEN_LIBS) $(GEN_LDFLAGS) -o TableGenerate
./TableGenerate
mv static_data.h static_data.cc arch/gen64/
avx:
$(AVX_CXX) TableGenerate.cc $(AVX_CXXFLAGS) $(AVX_LIBS) $(AVX_LDFLAGS) -o TableGenerate
sde -hsw -- ./TableGenerate
mv static_data.h static_data.cc arch/avx/
sse:
$(SSE_CXX) TableGenerate.cc $(SSE_CXXFLAGS) $(SSE_LIBS) $(SSE_LDFLAGS) -o TableGenerate
sde -ivb -- ./TableGenerate
mv static_data.h static_data.cc arch/sse/