Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ $ make execute_all


# Benchmark build optimization flags
- `dgemm` と `dgemv` はデフォルトで `-O3` を使用します
- 学習目的で最適化を無効化する場合は `OPT_LEVEL=-O0` を明示してください
- すべての実験ディレクトリの `Makefile` で、GCC最適化オプションはデフォルトで `-O3` です
- 環境変数 `OPT_LEVEL` で上書きできます(例: `-O0`, `-O2`, `-Ofast`)

```sh
$ make -C dgemm clean execute_all OPT_LEVEL=-O0
$ make -C dgemv clean execute_all OPT_LEVEL=-O0
$ make -C mandelbrot_simd clean run OPT_LEVEL=-O2
$ make -C kdtree_nearest_neighbor clean run OPT_LEVEL=-Ofast
```
5 changes: 3 additions & 2 deletions distance_computation_simd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CC=gcc
CFLAGS=-O3 -std=c11 -Wall -Wextra -march=native -mavx2 -mfma
CC ?= gcc
OPT_LEVEL ?= -O3
CFLAGS ?= $(OPT_LEVEL) -std=c11 -Wall -Wextra -march=native -mavx2 -mfma

.PHONY: all run clean

Expand Down
3 changes: 2 additions & 1 deletion gemm_cache_optimization/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CC ?= cc
CFLAGS ?= -O3 -march=native -std=c11
OPT_LEVEL ?= -O3
CFLAGS ?= $(OPT_LEVEL) -march=native -std=c11
LDFLAGS ?=

all: naive optimized
Expand Down
5 changes: 3 additions & 2 deletions image_processing_simd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CC=gcc
CFLAGS=-O3 -std=c11 -Wall -Wextra -march=native -mavx2
CC ?= gcc
OPT_LEVEL ?= -O3
CFLAGS ?= $(OPT_LEVEL) -std=c11 -Wall -Wextra -march=native -mavx2

.PHONY: all run clean

Expand Down
7 changes: 4 additions & 3 deletions kdtree_nearest_neighbor/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC := gcc
CFLAGS := -O3 -march=native -std=c11 -Wall -Wextra -Wpedantic
LDFLAGS := -lm
CC ?= gcc
OPT_LEVEL ?= -O3
CFLAGS ?= $(OPT_LEVEL) -march=native -std=c11 -Wall -Wextra -Wpedantic
LDFLAGS ?= -lm

TARGET := benchmark
SRC := benchmark.c
Expand Down
5 changes: 3 additions & 2 deletions mandelbrot_simd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CC=gcc
CFLAGS=-O3 -std=c11 -Wall -Wextra -march=native -mavx2 -mfma
CC ?= gcc
OPT_LEVEL ?= -O3
CFLAGS ?= $(OPT_LEVEL) -std=c11 -Wall -Wextra -march=native -mavx2 -mfma

.PHONY: all run clean

Expand Down