Mercurial > hg > Game > Cerium
changeset 1622:4401690b4513 draft
fix multi_dimension
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 May 2013 17:50:12 +0900 |
parents | f907bbac14f2 |
children | f82467ce38f3 |
files | TaskManager/kernel/schedule/SchedTask.cc example/add/main.cc example/basic/main.cc |
diffstat | 3 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/SchedTask.cc Tue May 21 17:03:53 2013 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Tue May 21 17:50:12 2013 +0900 @@ -140,11 +140,11 @@ if (list->dim>2) atask->set_param(2,(memaddr)z); run(this, read,write); } - if (++x>list->x) { + if (++x>=list->x) { x=0; - if (++y>list->y) { + if (++y>=list->y) { y=0; - if (++z>list->z) { + if (++z>=list->z) { break; } }
--- a/example/add/main.cc Tue May 21 17:03:53 2013 +0900 +++ b/example/add/main.cc Tue May 21 17:50:12 2013 +0900 @@ -13,7 +13,7 @@ float A,B,C; static void -print_result() +print_result(SchedTask* s,void* a,void* b) { printf("---\n"); printf("%f + %f = %f \n",A,B,C); @@ -52,6 +52,7 @@ */ // add Active Queue + add->set_post(print_result,0,0); add->spawn(); } @@ -67,13 +68,13 @@ add_init(manager); } - manager->set_TMend(TMend); + // manager->set_TMend(TMend); return 0; } -void -TMend(TaskManager *manager) -{ - print_result(); -} +// void +// TMend(TaskManager *manager) +// { +// print_result(); +// }