annotate TaskManager/test/SetCpuTest/Makefile.gpu @ 2069:26aa08c9a1de draft default tip

cuda example fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 12 Feb 2017 10:04:55 +0900
parents 6c0b6947c231
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1628
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
1 include ./Makefile.def
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
2
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
3 SRCS_TMP = $(wildcard *.cc)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
4 SRCS_EXCLUDE = # 除外するファイルを書く
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
5 SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
6 OBJS = $(SRCS:.cc=.o)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
7
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
8 TASK_DIR = gpu
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
9 TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
10 TASK_SRCS_EXCLUDE =
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
11 TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
12 TASK_OBJS = $(TASK_SRCS:.cc=.o)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
13
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
14 LIBS += `sdl-config --libs` -lGpuManager -framework opencl
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
15
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
16 .SUFFIXES: .cc .o
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
17
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
18 .cc.o:
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
19 $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
20
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
21 all: $(TARGET)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
22
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
23 $(TARGET): $(OBJS) $(TASK_OBJS)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
24 $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
25
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
26 link:
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
27 $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
28
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
29 test:
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
30 cpus=0;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
31 cpus=1;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
32 cpus=2;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
33 cpus=4;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
34 cpus=8;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
35 cpus=16;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
36 cpus=24;./$(TARGET) -cpu $$cpus
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
37
1643
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
38 cpus=0;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
39 cpus=1;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
40 cpus=2;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
41 cpus=4;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
42 cpus=8;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
43 cpus=16;./$(TARGET) -cpu $$cpus -gpu $$cpus
6c0b6947c231 fix fft
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1628
diff changeset
44 cpus=24;./$(TARGET) -cpu $$cpus -gpu $$cpus
1628
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
45
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
46 debug: $(TARGET)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
47 sudo ppu-gdb ./$(TARGET)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
48
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
49 clean:
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
50 rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
51 rm -f *~ \#*
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
52 rm -f ppe/*~ ppe/\#*
b3edf26734f5 add SetCpuTest
shohei kokubo
parents:
diff changeset
53 cd spe; $(MAKE) clean