Mercurial > hg > Game > Cerium
changeset 1547:2983e9e93d24 draft
remove minor warning.
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 13 Feb 2013 18:36:57 +0900 |
parents | 61164c687b29 |
children | 614a3f62c881 |
files | TaskManager/Gpu/GpuScheduler.cc TaskManager/Gpu/GpuThreads.h example/OpenCL/Makefile example/OpenCL/Makefile.def example/OpenCL/twice.cc |
diffstat | 5 files changed, 45 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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 (;;) {
--- 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;
--- 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 *~ \#*
--- /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)
--- 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);