This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ocl/particlefilter] measure the time of single and double filters
- Loading branch information
Showing
6 changed files
with
353 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,54 @@ | ||
include ../../common/make.config | ||
#OPENCL_DIR = /af21/den4gr/NVIDIA_GPU_Computing_SDK/ | ||
|
||
#Can be changed by `make TYPE=CPU` | ||
TYPE = GPU | ||
|
||
#Library | ||
ifeq ($(TYPE),GPU) | ||
OPENCL_INC = $(NV_OPENCL_INC) | ||
OPENCL_LIB = $(NV_OPENCL_LIB) | ||
else | ||
OPENCL_INC = $(INTEL_OPENCL_INC) | ||
OPENCL_LIB = $(INTEL_OPENCL_LIB) | ||
endif | ||
|
||
# C compiler | ||
CC = g++ | ||
CC_FLAGS = -O2 | ||
#INCLUDES = -I$(OPENCL_DIR)/OpenCL/common/inc -I$(OPENCL_DIR)/shared/inc/ | ||
INCLUDES = -I$(OPENCL_INC) | ||
INCLUDES = -I$(OPENCL_INC) -I../util | ||
|
||
ALL: OCL_particlefilter_naive OCL_particlefilter_double OCL_particlefilter_single | ||
|
||
OCL_particlefilter_naive: ex_particle_OCL_naive_seq.o | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_naive_seq.o $(INCLUDES) -L$(OPENCL_LIB) -lOpenCL -o OCL_particlefilter_naive | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_naive_seq.o \ | ||
$(INCLUDES) -L$(OPENCL_LIB) -lOpenCL \ | ||
-o OCL_particlefilter_naive.out | ||
|
||
OCL_particlefilter_double: ex_particle_OCL_double_seq.o | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_double_seq.o $(INCLUDES) -L$(OPENCL_LIB) -lOpenCL -o OCL_particlefilter_double | ||
OCL_particlefilter_double: ex_particle_OCL_double_seq.o timing.o | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_double_seq.o timing.o \ | ||
$(INCLUDES) -L$(OPENCL_LIB) -lOpenCL \ | ||
-o OCL_particlefilter_double.out | ||
|
||
OCL_particlefilter_single: ex_particle_OCL_single_seq.o | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_single_seq.o $(INCLUDES) -L$(OPENCL_LIB) -lOpenCL -o OCL_particlefilter_single | ||
OCL_particlefilter_single: ex_particle_OCL_single_seq.o timing.o | ||
$(CC) $(CC_FLAGS) ex_particle_OCL_single_seq.o timing.o \ | ||
$(INCLUDES) -L$(OPENCL_LIB) -lOpenCL \ | ||
-o OCL_particlefilter_single.out | ||
|
||
|
||
%.o: %.[ch] | ||
$(CC) $(CC_FLAGS) $< -c | ||
|
||
timing.o: ../util/timing.c | ||
$(CC) $(CC_FLAGS) -I../util ../util/timing.c -c | ||
|
||
ex_particle_OCL_naive_seq.o: ex_particle_OCL_naive_seq.cpp | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_naive_seq.cpp -c | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_naive_seq.cpp -c -Wno-unused-result | ||
|
||
ex_particle_OCL_double_seq.o: ex_particle_OCL_double_seq.cpp | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_double_seq.cpp -c | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_double_seq.cpp -DTIMING -c -Wno-unused-result | ||
|
||
ex_particle_OCL_single_seq.o: ex_particle_OCL_single_seq.cpp | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_single_seq.cpp -c | ||
$(CC) $(CC_FLAGS) $(INCLUDES) ex_particle_OCL_single_seq.cpp -DTIMING -c -Wno-unused-result | ||
|
||
clean: | ||
rm -f *.o *~ OCL_particlefilter_naive OCL_particlefilter_double OCL_particlefilter_single *.linkinfo | ||
rm -f *.o *~ OCL_particlefilter_*.out *.linkinfo |
Oops, something went wrong.