Mercurial > hg > Game > Cerium
changeset 1607:5deb318564ec draft
init dim_param
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 16 Apr 2013 14:43:25 +0900 |
parents | b09f44c7c052 |
children | 5d0b20373d95 |
files | TaskManager/kernel/ppe/CpuThreads.cc TaskManager/kernel/ppe/HTask.cc |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/CpuThreads.cc Tue Apr 16 12:12:27 2013 +0900 +++ b/TaskManager/kernel/ppe/CpuThreads.cc Tue Apr 16 14:43:25 2013 +0900 @@ -104,7 +104,7 @@ void CpuThreads::spawn_task(int cpu_num, TaskListPtr p) { if (p->dim>0) { - int dim_count = (p->x+1)*(p->y+1)*(p->z+1); + int dim_count = (p->x)*(p->y)*(p->z); if (cpu_num < dim_count) p->self->flag.dim_count = cpu_num; for (int i = 0; i < cpu_num; i++) {
--- a/TaskManager/kernel/ppe/HTask.cc Tue Apr 16 12:12:27 2013 +0900 +++ b/TaskManager/kernel/ppe/HTask.cc Tue Apr 16 14:43:25 2013 +0900 @@ -31,10 +31,12 @@ HTask::iterate(long x) { this->flag.dim_count = 0; TaskList *tl = (TaskList*)rbuf; + tl->self = this; + tl->set_last(last); tl->dim=1; tl->x=x; - tl->self = this; - tl->set_last(last); + tl->y=1; + tl->z=1; mimpl->spawn_task(this); } @@ -42,11 +44,13 @@ HTask::iterate(long x, long y) { this->flag.dim_count = 0; TaskList *tl = (TaskList*)rbuf; + tl->self = this; + tl->set_last(last); + tl->dim=2; tl->x=x; tl->y=y; - tl->self = this; - tl->set_last(last); + tl->z=1; mimpl->spawn_task(this); } @@ -54,12 +58,13 @@ HTask::iterate(long x, long y, long z) { this->flag.dim_count = 0; TaskList *tl = (TaskList*)rbuf; + tl->self = this; + tl->set_last(last); + tl->dim=3; tl->x=x; tl->y=y; tl->z=z; - tl->self = this; - tl->set_last(last); mimpl->spawn_task(this); }