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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #include <stdio.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #include <string.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #include "Print.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #include "Func.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
298
768452fab95e from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
6 /* これは必須 */
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 SchedDefineTask(Print);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 return 0;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 }