changeset 1445:ef6933a92fff draft

debug GpuTaskManagerImpl
author Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
date Mon, 23 Apr 2012 22:01:08 +0900
parents dff9b3f388e2
children ed1e38e82985
files TaskManager/Gpu/GpuScheduler.cc TaskManager/Gpu/GpuTaskManagerImpl.cc TaskManager/Gpu/GpuTaskManagerImpl.h TaskManager/Gpu/GpuThreads.h TaskManager/kernel/ppe/TaskManagerImpl.h
diffstat 5 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }
 
 
--- 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<TaskList>
-    taskListInfo = new QueueInfo<TaskList>
+    gpuTaskList = new QueueInfo<TaskList>;
+    taskListInfo = new QueueInfo<TaskList>;
 
     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
--- 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<TaskList> *gpuTaskList;
     QueueInfo<TaskList> *taskListInfo;
 
     FifoTaskManagerImpl *ppeManager;
 
-    GpuThreads *gpuThreads;
-    FifoTaskManagerImpl *ppeManager;
+    Threads *gpuThreads;
 
 };
 
--- 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 <pthread.h>
 #include "Threads.h"
+#include "GpuScheduler.h"
 
 #ifdef __APPLE__
 #include <OpenCL/opencl.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;