Mercurial > hg > Members > kono > Cerium
annotate example/share_task/spe/Exec.cc @ 1048:40cde8c1a6cd default tip
add ScaleXY (not for allExecute...)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 06:22:15 +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 { |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
11 int *idata = (int*)s->global_get(DATA_ID); |
626
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
467
diff
changeset
|
12 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
|
13 int number = (long)s->get_param(1); |
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
467
diff
changeset
|
14 int calnum = (long)s->get_param(2); |
109 | 15 |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
16 s->printf("[TASK_EXEC %02d] ", number); |
109 | 17 for (int i = 0; i < length; i++) { |
18 idata[i] += calnum; | |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
19 s->printf("%03d ", idata[i]); |
109 | 20 } |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
21 s->printf("\n"); |
109 | 22 |
23 return 0; | |
24 } |