changeset 1881:392c1a2d699d draft

dim_count
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 02 Jan 2014 22:13:00 +0900
parents a865ba7acb08
children 33c03287ff81
files TaskManager/Cell/SpeThreads.cc TaskManager/kernel/ppe/CpuThreads.cc
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Cell/SpeThreads.cc	Thu Jan 02 21:46:22 2014 +0900
+++ b/TaskManager/Cell/SpeThreads.cc	Thu Jan 02 22:13:00 2014 +0900
@@ -106,6 +106,12 @@
 int
 SpeThreads::spawn_task(int id, TaskListPtr p) {
     p->cpu = id;
+    if (p->dim>0 && id >= SPE_0) {
+        int dim_count = (p->x)*(p->y)*(p->z);
+        if (cpu_num < dim_count)
+            dim_count = cpu_num;
+        p->self->flag.dim_count = dim_count;
+    }
     send_mail(id ,1,(memaddr*)p);
     return 1;
 }
--- a/TaskManager/kernel/ppe/CpuThreads.cc	Thu Jan 02 21:46:22 2014 +0900
+++ b/TaskManager/kernel/ppe/CpuThreads.cc	Thu Jan 02 22:13:00 2014 +0900
@@ -122,6 +122,12 @@
 int
 CpuThreads::spawn_task(int id, TaskListPtr p) {
     p->cpu = id - id_offset;
+    if (p->dim>0 && id >= SPE_0) {  // should check IO
+        int dim_count = (p->x)*(p->y)*(p->z);
+        if (cpu_num < dim_count)
+            dim_count = cpu_num;
+        p->self->flag.dim_count = dim_count;
+    }
     send_mail(id, 1, (memaddr*)&p);
     return 1;
 }