# HG changeset patch # User Yuhi TOMARI # Date 1360748217 -32400 # Node ID 2983e9e93d24344f765cae164cd308636ffde633 # Parent 61164c687b298ea313efec9cd5c378d99b9c25e1 remove minor warning. diff -r 61164c687b29 -r 2983e9e93d24 TaskManager/Gpu/GpuScheduler.cc --- a/TaskManager/Gpu/GpuScheduler.cc Tue Feb 05 13:15:46 2013 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Wed Feb 13 18:36:57 2013 +0900 @@ -71,7 +71,7 @@ int cur = 0; memaddr reply[2]; HTask::htask_flag flag; - memset(reply, NULL, sizeof(memaddr)*2); + memset(reply, 0, sizeof(memaddr)*2); memset(&flag, 0, sizeof(HTask::htask_flag)); for (;;) { diff -r 61164c687b29 -r 2983e9e93d24 TaskManager/Gpu/GpuThreads.h --- a/TaskManager/Gpu/GpuThreads.h Tue Feb 05 13:15:46 2013 +0900 +++ b/TaskManager/Gpu/GpuThreads.h Wed Feb 13 18:36:57 2013 +0900 @@ -43,7 +43,6 @@ void set_wait(SemPtr); private: - SemPtr wait; gpu_thread_arg_t *args; pthread_t *threads; int use_refdma; diff -r 61164c687b29 -r 2983e9e93d24 example/OpenCL/Makefile --- a/example/OpenCL/Makefile Tue Feb 05 13:15:46 2013 +0900 +++ b/example/OpenCL/Makefile Wed Feb 13 18:36:57 2013 +0900 @@ -1,11 +1,33 @@ -CFLAGS = -g -Wall -framework opencl -CC = g++ -OPT = -g +include ./Makefile.def +SRCS_TMP = $(wildcard *.cc) +SRCS_EXCLUDE = # 除外するファイルを書く +SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) +OBJS = $(SRCS:.cc=.o) + +TASK_SRCS_TMP = $(wildcard $(TASK_DIR2)/*.cc $(TASK_DIR1)/*.cc) +TASK_SRCS = $(filter-out $(TASK_DIR1)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) +TASK_OBJS = $(TASK_SRCS:.cc=.o) + +CC += $(ABI) + +LIBS = -framework opencl -g -TARGET=twice +.SUFFIXES: .cc .o + +.cc.o: + $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ + +all: $(TARGET) -twice : twice.o - $(CC) $(OPT) $(CFLAGS) -o $@ $? +$(TARGET): $(OBJS) $(TASK_OBJS) + $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS) + +link: + $(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS) + +debug: $(TARGET) + sudo gdb ./$(TARGET) clean: - rm -rf *.o $(TARGET) + rm -f $(TARGET) $(OBJS) $(TASK_OBJS) + rm -f *~ \#* diff -r 61164c687b29 -r 2983e9e93d24 example/OpenCL/Makefile.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/OpenCL/Makefile.def Wed Feb 13 18:36:57 2013 +0900 @@ -0,0 +1,13 @@ +TARGET = twice + +# include/library path +# ex macosx +#CERIUM = /Users/gongo/Source/Cerium +ABIBIT=64 + +# ex linux/ps3 + +OPT = -g -O0 + +CC = clang++ +CFLAGS = -Wall $(OPT) diff -r 61164c687b29 -r 2983e9e93d24 example/OpenCL/twice.cc --- a/example/OpenCL/twice.cc Tue Feb 05 13:15:46 2013 +0900 +++ b/example/OpenCL/twice.cc Wed Feb 13 18:36:57 2013 +0900 @@ -27,9 +27,9 @@ } cl_platform_id platform_id = NULL; - cl_uint ret_num_platforms = NULL; + cl_uint ret_num_platforms = 0; cl_device_id device_id = NULL; - cl_uint ret_num_devices = NULL; + cl_uint ret_num_devices = 0L; cl_int ret; clGetPlatformIDs(1, &platform_id, &ret_num_platforms);