summaryrefslogtreecommitdiff
path: root/GEMV/baselines/cpu/Makefile
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2025-01-10 15:52:02 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2025-01-10 15:52:02 +0100
commite749fafbe527ff8a6ea15bd945cc3e8d4800e7ef (patch)
tree0c0c7e60cdbc382fc5c60aaedfc8a6f99a48d554 /GEMV/baselines/cpu/Makefile
parent871ab174f5edc761adc0e21bf8fb9ce82b898d26 (diff)
GEMV baseline: Add optional native=0 flag
Diffstat (limited to 'GEMV/baselines/cpu/Makefile')
-rw-r--r--GEMV/baselines/cpu/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/GEMV/baselines/cpu/Makefile b/GEMV/baselines/cpu/Makefile
index 016d561..60c662c 100644
--- a/GEMV/baselines/cpu/Makefile
+++ b/GEMV/baselines/cpu/Makefile
@@ -1,17 +1,24 @@
-NUMA ?= 0
-NUMA_MEMCPY ?= 0
-FLAGS =
+native ?= 1
+numa ?= 0
+numa_memcpy ?= 0
+
+CFLAGS =
+LDFLAGS =
TYPE ?= double
-ifeq (${NUMA}, 1)
- FLAGS += -lnuma
+ifeq (${native}, 1)
+ CFLAGS += -march=native
+endif
+
+ifeq (${numa}, 1)
+ LDFLAGS += -lnuma
endif
.PHONY: all
all: gemv
gemv: gemv_openmp.c
- gcc -ggdb -Wall -Wextra -pedantic -march=native -O2 -o gemv -fopenmp -DNUMA=${NUMA} -DNUMA_MEMCPY=${NUMA_MEMCPY} -DT=${TYPE} -DTYPE_${TYPE} gemv_openmp.c ${FLAGS}
+ gcc -ggdb -Wall -Wextra -pedantic ${CFLAGS} -O3 -o gemv -fopenmp -DNUMA=${numa} -DNUMA_MEMCPY=${numa_memcpy} -DT=${TYPE} -DTYPE_${TYPE} gemv_openmp.c ${LDFLAGS}
gemv_O0: gemv_openmp.c
gcc -o gemv_O0 -fopenmp gemv_openmp.c