# HG changeset patch # User Shinji KONO # Date 1385144777 -32400 # Node ID 8bf0a27f5dff935aae7312524b67b7efccc95cbd # Parent bb7f5ae152c73cd1eef610df65ccfea7c65263ce fix missing task diff -r bb7f5ae152c7 -r 8bf0a27f5dff TaskManager/kernel/schedule/SchedTask.cc --- a/TaskManager/kernel/schedule/SchedTask.cc Sat Nov 23 03:05:43 2013 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Sat Nov 23 03:26:17 2013 +0900 @@ -187,9 +187,6 @@ __debug("[SchedTask:%s]\n", __FUNCTION__); if (cur_index == 0) { // 最初の一つ - while (nextList && !nextList->dim && nextList->cpu != scheduler->id) - nextList=nextList->next; // avoid duplicate sent task - if (nextList == 0) return new SchedNop2Ready(scheduler); SchedTask *nextSched = new SchedTask(); nextSched->init(nextList, &nextList->tasks[0], scheduler, this->tag^1); return nextSched; @@ -205,8 +202,6 @@ return nextSched; } else { nextList = list->next; - while (nextList && !nextList->dim && nextList->cpu != scheduler->id) - nextList=nextList->next; if (nextList == 0) { // もう何もする必要がない return new SchedNop2Ready(scheduler); diff -r bb7f5ae152c7 -r 8bf0a27f5dff example/many_task/Makefile.macosx --- a/example/many_task/Makefile.macosx Sat Nov 23 03:05:43 2013 +0900 +++ b/example/many_task/Makefile.macosx Sat Nov 23 03:26:17 2013 +0900 @@ -17,7 +17,7 @@ # CFLAGS = -g -Wall# -O9 #-DDEBUG INCLUDE = -I. -I.. -I${CERIUM}/include/TaskManager -LIBS = -L${CERIUM}/TaskManager -lFifoManager `sdl-config --libs` +LIBS = -L${CERIUM}/TaskManager -lGpuManager `sdl-config --libs` -framework opencl .SUFFIXES: .cc .o diff -r bb7f5ae152c7 -r 8bf0a27f5dff example/many_task/main.cc --- a/example/many_task/main.cc Sat Nov 23 03:05:43 2013 +0900 +++ b/example/many_task/main.cc Sat Nov 23 03:26:17 2013 +0900 @@ -25,7 +25,7 @@ static double st_time; static double ed_time; -static int length = 1200; +static long length = 1200; CPU_TYPE spe_cpu = SPE_ANY; int use_task_array=0; // prototype @@ -50,7 +50,7 @@ { for (int i = 1; argv[i]; ++i) { if (strcmp(argv[i], "--length") == 0 || strcmp(argv[i], "-l") == 0) { - length = atoi(argv[++i]); + length = (int)atoi(argv[++i]); } if (strcmp(argv[i], "-a") == 0 ) { all = 1; @@ -152,7 +152,7 @@ task_init(); gpu_task_init(); - int cpu = manager->get_cpuNum(); + long cpu = manager->get_cpuNum(); // in case of -cpu 0 if (cpu==0) cpu = 1; if (1) { diff -r bb7f5ae152c7 -r 8bf0a27f5dff example/many_task/sort.cc --- a/example/many_task/sort.cc Sat Nov 23 03:05:43 2013 +0900 +++ b/example/many_task/sort.cc Sat Nov 23 03:26:17 2013 +0900 @@ -44,15 +44,15 @@ sort_start(SchedTask *manager, void *d, void *e) { Sort *s = (Sort*)manager->get_param(0); - int half_num = s->split_num-1; - static int sort_count = s->split_num; // sort 完了に必要な回数 + long half_num = s->split_num-1; + static long sort_count = s->split_num; // sort 完了に必要な回数 // 一つのタスクで sort する data 数 - int block_num = (s->data_length + s->split_num -1)/s->split_num; - int half_block_num = block_num/2; + long block_num = (s->data_length + s->split_num -1)/s->split_num; + long half_block_num = block_num/2; - int last_block_num = s->data_length - (s->split_num-1)*block_num; - int last_half_block_num = half_block_num+(last_block_num/2); + long last_block_num = s->data_length - (s->split_num-1)*block_num; + long last_half_block_num = half_block_num+(last_block_num/2); if (--sort_count < 0) { return 0;