# HG changeset patch # User Daichi TOMA # Date 1335186068 -32400 # Node ID ef6933a92fff6aafa1252cda4b448f5bf71be3e6 # Parent dff9b3f388e23af796913ce4378fed921a584a2b debug GpuTaskManagerImpl diff -r dff9b3f388e2 -r ef6933a92fff TaskManager/Gpu/GpuScheduler.cc --- a/TaskManager/Gpu/GpuScheduler.cc Mon Apr 23 21:38:42 2012 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Mon Apr 23 22:01:08 2012 +0900 @@ -48,6 +48,7 @@ } } // TaskArrayの処理 + return 0; } diff -r dff9b3f388e2 -r ef6933a92fff TaskManager/Gpu/GpuTaskManagerImpl.cc --- a/TaskManager/Gpu/GpuTaskManagerImpl.cc Mon Apr 23 21:38:42 2012 +0900 +++ b/TaskManager/Gpu/GpuTaskManagerImpl.cc Mon Apr 23 22:01:08 2012 +0900 @@ -7,10 +7,10 @@ } -void GpuTaskManagerImpl::init() { +void GpuTaskManagerImpl::init(int spuIdle,int useRefDma) { - gpuTaskList = new QueueInfo - taskListInfo = new QueueInfo + gpuTaskList = new QueueInfo; + taskListInfo = new QueueInfo; ppeManager = new FifoTaskManagerImpl(machineNum); MainScheduler *mscheduler = new MainScheduler; @@ -43,14 +43,14 @@ } void GpuTaskManagerImpl::set_runTaskList() { - HtaskPtr htask = activeTaskQueue->getFirst(); + HTaskPtr htask = activeTaskQueue->getFirst(); while (htask != NULL) { if (htask->cpu_type == CPU_PPE) { htask = activeTaskQueue->getNext(htask); } else { set_taskList(htask, taskListInfo); - HtaskPtr next = activeTaskQueue->getNext(htask); + HTaskPtr next = activeTaskQueue->getNext(htask); activeTaskQueue->remove(htask); htask = next; } @@ -60,7 +60,6 @@ void GpuTaskManagerImpl::sendTaskList() { mail_check(); if (!gpuTaskList->empty()) { - continue; } if (!taskListInfo->empty()) { send_taskList(); @@ -77,12 +76,12 @@ TaskListPtr p = gpuTaskList->getFirst(); // send taskList - gpuThreads->send_mail((memaddr *) &p); + gpuThreads->send_mail(0, 0, (memaddr *) &p); } void GpuTaskManagerImpl::mail_check() { memaddr data; - while (gpuThreads->has_mail(&data)) { + while (gpuThreads->has_mail(0, 0, &data)) { //どのメールが必要かよく考える //check_task_finish diff -r dff9b3f388e2 -r ef6933a92fff TaskManager/Gpu/GpuTaskManagerImpl.h --- a/TaskManager/Gpu/GpuTaskManagerImpl.h Mon Apr 23 21:38:42 2012 +0900 +++ b/TaskManager/Gpu/GpuTaskManagerImpl.h Mon Apr 23 22:01:08 2012 +0900 @@ -19,14 +19,18 @@ void send_taskList(); void mail_check(); + void start_profile(){} + void show_profile(){} + void polling(){} + void print_arch(){} + public: QueueInfo *gpuTaskList; QueueInfo *taskListInfo; FifoTaskManagerImpl *ppeManager; - GpuThreads *gpuThreads; - FifoTaskManagerImpl *ppeManager; + Threads *gpuThreads; }; diff -r dff9b3f388e2 -r ef6933a92fff TaskManager/Gpu/GpuThreads.h --- a/TaskManager/Gpu/GpuThreads.h Mon Apr 23 21:38:42 2012 +0900 +++ b/TaskManager/Gpu/GpuThreads.h Mon Apr 23 22:01:08 2012 +0900 @@ -3,6 +3,7 @@ #include #include "Threads.h" +#include "GpuScheduler.h" #ifdef __APPLE__ #include diff -r dff9b3f388e2 -r ef6933a92fff TaskManager/kernel/ppe/TaskManagerImpl.h --- a/TaskManager/kernel/ppe/TaskManagerImpl.h Mon Apr 23 21:38:42 2012 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Mon Apr 23 22:01:08 2012 +0900 @@ -43,7 +43,7 @@ virtual void run() = 0; virtual void start_profile() = 0; virtual void show_profile() = 0; - virtual void export_task_log() = 0; + virtual void export_task_log(); virtual void append_activeTask(HTaskPtr); virtual void append_waitTask(HTaskPtr); virtual void polling() = 0;