Mercurial > hg > Game > Cerium
annotate example/dependency_task/ppe/Print.cc @ 1130:5addc6c1d5c4 draft
fix.
author | root@dolphins.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sun, 13 Feb 2011 22:34:44 +0900 |
parents | 94d82f2c842f |
children |
rev | line source |
---|---|
109 | 1 #include <stdio.h> |
2 #include <string.h> | |
3 #include "Print.h" | |
4 #include "Func.h" | |
5 | |
298 | 6 /* これは必須 */ |
109 | 7 SchedDefineTask(Print); |
8 | |
467
839e34d0cc3c
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
9 static int |
839e34d0cc3c
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
10 run(SchedTask *s, void *rbuf, void *wbuf) |
109 | 11 { |
467
839e34d0cc3c
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); |
625
94d82f2c842f
64bit mode worked on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
467
diff
changeset
|
13 long length = (long)s->get_param(0); |
109 | 14 |
467
839e34d0cc3c
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
15 s->printf("[TASK_PRINT]\n"); |
109 | 16 for (int i = 0; i < length; i++) { |
467
839e34d0cc3c
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
17 s->printf("%2d ", idata[i]); |
109 | 18 } |
467
839e34d0cc3c
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
19 s->printf("\n"); |
109 | 20 |
21 return 0; | |
22 } |