Mercurial > hg > Members > kono > Cerium
annotate example/dependency_task/spe/Exec.cc @ 1015:80b18af207c2
debug mail timing.
author | yutaka@localhost.localdomain |
---|---|
date | Fri, 05 Nov 2010 22:25:33 +0900 |
parents | ab866bc8a624 |
children |
rev | line source |
---|---|
109 | 1 #include <stdio.h> |
2 #include "Exec.h" | |
3 #include "Func.h" | |
4 | |
298 | 5 /* これは必須 */ |
109 | 6 SchedDefineTask(Exec); |
7 | |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
8 static int |
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
9 run(SchedTask *s, void *rbuf, void *wbuf) |
109 | 10 { |
1015 | 11 |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
12 int *idata = (int*)s->get_input(rbuf, 0); |
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
13 int *odata = (int*)s->get_output(wbuf, 0); |
626
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
467
diff
changeset
|
14 int length = (long)s->get_param(0); |
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
467
diff
changeset
|
15 int calnum = (long)s->get_param(1); |
109 | 16 |
17 for (int i = 0; i < length; i++) { | |
18 odata[i] = idata[i] + calnum; | |
19 } | |
20 | |
21 return 0; | |
22 } |