Mercurial > hg > Game > Cerium
comparison example/dependency_task/ppe/Exec.cc @ 467:839e34d0cc3c draft
fix all examples. test_render is not working now.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Oct 2009 19:25:25 +0900 |
parents | 768452fab95e |
children | 94d82f2c842f |
comparison
equal
deleted
inserted
replaced
466:c73aff02db67 | 467:839e34d0cc3c |
---|---|
3 #include "Func.h" | 3 #include "Func.h" |
4 | 4 |
5 /* これは必須 */ | 5 /* これは必須 */ |
6 SchedDefineTask(Exec); | 6 SchedDefineTask(Exec); |
7 | 7 |
8 int | 8 static int |
9 Exec::run(void *rbuf, void *wbuf) | 9 run(SchedTask *s, void *rbuf, void *wbuf) |
10 { | 10 { |
11 int *idata = (int*)get_input(rbuf, 0); | 11 int *idata = (int*)s->get_input(rbuf, 0); |
12 int *odata = (int*)get_output(wbuf, 0); | 12 int *odata = (int*)s->get_output(wbuf, 0); |
13 int length = get_param(0); | 13 int length = s->get_param(0); |
14 int calnum = get_param(1); | 14 int calnum = s->get_param(1); |
15 | 15 |
16 for (int i = 0; i < length; i++) { | 16 for (int i = 0; i < length; i++) { |
17 odata[i] = idata[i] + calnum; | 17 odata[i] = idata[i] + calnum; |
18 } | 18 } |
19 | 19 |