# HG changeset patch # User one@zeus.cr.ie.u-ryukyu.ac.jp # Date 1292637898 -32400 # Node ID 7823233584da4a4967f636c6f6b0da813023b601 # Parent 6dabcd1a9ccfb110c67187877ad3d51cf15a2018 single cpu run on Mac OS X diff -r 6dabcd1a9ccf -r 7823233584da TaskManager/Fifo/FifoTaskManagerImpl.cc --- a/TaskManager/Fifo/FifoTaskManagerImpl.cc Sat Dec 18 09:43:08 2010 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc Sat Dec 18 11:04:58 2010 +0900 @@ -86,6 +86,7 @@ * * ActiveTaskQueue (依存条件は満たし済み) のタスクを * 実行タスクリストに入れる + * CPU_PPE */ void FifoTaskManagerImpl::set_runTaskList(QueueInfo *activeTaskQueue) @@ -104,10 +105,27 @@ } } +/** + * exec all cpu type as simulation + */ +void +FifoTaskManagerImpl::set_runTaskList1(QueueInfo *activeTaskQueue) +{ + // printf("active task queue length = %d\n",activeTaskQueue->length()); + HTaskPtr htask = activeTaskQueue->getFirst(); + while (htask != NULL) { + set_taskList(htask, taskListInfo ); + HTaskPtr next = activeTaskQueue->getNext(htask); + activeTaskQueue->remove(htask); + htask = next; + } +} + + void FifoTaskManagerImpl::poll() { - set_runTaskList(activeTaskQueue); + set_runTaskList1(activeTaskQueue); // list を実行する sendTaskList(); // ppe scheduler からの mail を調べる diff -r 6dabcd1a9ccf -r 7823233584da TaskManager/Fifo/FifoTaskManagerImpl.h --- a/TaskManager/Fifo/FifoTaskManagerImpl.h Sat Dec 18 09:43:08 2010 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.h Sat Dec 18 11:04:58 2010 +0900 @@ -39,6 +39,8 @@ void print_arch(); // call by user +private: + void set_runTaskList1(QueueInfo* activeTaskQueue); }; diff -r 6dabcd1a9ccf -r 7823233584da TaskManager/Makefile.def --- a/TaskManager/Makefile.def Sat Dec 18 09:43:08 2010 +0900 +++ b/TaskManager/Makefile.def Sat Dec 18 11:04:58 2010 +0900 @@ -27,9 +27,9 @@ IMPL_CELL_SRCS = $(IMPL_FIFO_SRCS) $(wildcard $(IMPL_CELL_DIR)/*.cc) IMPL_CELL_OBJS = $(IMPL_CELL_SRCS:.cc=.o) -ABIBIT = 32 +ABIBIT = 64 -OPT = -g -O9 -DMAIL_QUEUE +OPT = -g -DMAIL_QUEUE # -DEARLY_TOUCH # -g -DTASK_LIST_MAIL -O9 diff -r 6dabcd1a9ccf -r 7823233584da example/many_task/Makefile.def --- a/example/many_task/Makefile.def Sat Dec 18 09:43:08 2010 +0900 +++ b/example/many_task/Makefile.def Sat Dec 18 11:04:58 2010 +0900 @@ -14,3 +14,6 @@ INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. LIBS = -L${CERIUM}/TaskManager + +ABIBIT = 64 +ABI = -m$(ABIBIT) diff -r 6dabcd1a9ccf -r 7823233584da example/many_task/Makefile.macosx --- a/example/many_task/Makefile.macosx Sat Dec 18 09:43:08 2010 +0900 +++ b/example/many_task/Makefile.macosx Sat Dec 18 11:04:58 2010 +0900 @@ -13,7 +13,7 @@ TASK_OBJS = $(TASK_SRCS:.cc=.o) CC = g++ -CC += -m32 +CC += $(ABI) # CFLAGS = -g -Wall# -O9 #-DDEBUG INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. diff -r 6dabcd1a9ccf -r 7823233584da example/many_task/main.cc --- a/example/many_task/main.cc Sat Dec 18 09:43:08 2010 +0900 +++ b/example/many_task/main.cc Sat Dec 18 11:04:58 2010 +0900 @@ -94,8 +94,8 @@ static void sort_init(SchedTask *manager, void *a, void *b) { - sorter.cpuNum = (int)a; - int length = (int)b; + sorter.cpuNum = (long)a; + long length = (long)b; sorter.data = (DataPtr)manager->allocate(sizeof(Data)*length); sorter.data_length = length; diff -r 6dabcd1a9ccf -r 7823233584da example/many_task/ppe/QuickSort.cc --- a/example/many_task/ppe/QuickSort.cc Sat Dec 18 09:43:08 2010 +0900 +++ b/example/many_task/ppe/QuickSort.cc Sat Dec 18 11:04:58 2010 +0900 @@ -35,7 +35,7 @@ #endif // printf("[PPE] Quick: length:%d addr->%x \n",end, (int)rbuff); - //printf("[PPE] Quick: data[0]: %d addr->%x\n",sizeof(r_data),r_data); + printf("[PPE] Quick: data[0]: %ld addr->%lx\n",sizeof(r_data),(long)r_data); //show_data(r_data, end); quick_sort(r_data, begin, end-1); diff -r 6dabcd1a9ccf -r 7823233584da example/many_task/sort.h --- a/example/many_task/sort.h Sat Dec 18 09:43:08 2010 +0900 +++ b/example/many_task/sort.h Sat Dec 18 11:04:58 2010 +0900 @@ -8,8 +8,8 @@ typedef struct sort { int data_length; - int cpuNum; int split_num; + long cpuNum; HTaskPtr *fsort; HTaskPtr *bsort; DataPtr data;