-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
31 lines (22 loc) · 938 Bytes
/
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
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
CC = gcc-8
endif
EXEC = native_parallel_multiplication strassens_parallel_multiplication transpose_native_parallel_multiplication transpose_strassens_parallel_multiplication
CC ?= gcc
CFLAGS = -mavx2
SRCS_common = main.c
all: $(EXEC)
native_parallel_multiplication: $(SRCS_common)
$(CC) $(CFLAGS) -fopenmp -DNATIVE_PARALLEL -o $@ $(SRCS_common)
strassens_parallel_multiplication: $(SRCS_common)
$(CC) $(CFLAGS) -fopenmp -DSTRASSENS_PARALLEL -o $@ $(SRCS_common)
transpose_native_parallel_multiplication: $(SRCS_common)
$(CC) $(CFLAGS) -fopenmp -DTRAN_NATIVE_PARALLEL -o $@ $(SRCS_common)
transpose_strassens_parallel_multiplication: $(SRCS_common)
$(CC) $(CFLAGS) -fopenmp -DSTRASSENS_PARALLEL -DSTRASSENS_TRANSPOSE -o $@ $(SRCS_common)
clean:
@rm $(EXEC) *.output
check:
@./$(EXEC) < test_data/input > test_data/output
@diff test_data/output test_data/expected_output