Mercurial > hg > Game > Cerium
annotate example/dependency_task/ppe/Exec.cc @ 298:768452fab95e draft
from EUC to UTF-8
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Jun 2009 15:17:41 +0900 |
parents | 028ffc9c0375 |
children | 839e34d0cc3c |
rev | line source |
---|---|
109 | 1 #include <stdio.h> |
2 #include "Exec.h" | |
3 #include "Func.h" | |
4 | |
298 | 5 /* これは必須 */ |
109 | 6 SchedDefineTask(Exec); |
7 | |
8 int | |
9 Exec::run(void *rbuf, void *wbuf) | |
10 { | |
11 int *idata = (int*)get_input(rbuf, 0); | |
12 int *odata = (int*)get_output(wbuf, 0); | |
13 int length = get_param(0); | |
14 int calnum = get_param(1); | |
15 | |
16 for (int i = 0; i < length; i++) { | |
17 odata[i] = idata[i] + calnum; | |
18 } | |
19 | |
20 return 0; | |
21 } |