Mercurial > hg > Members > kono > Cerium
annotate example/renew_task/spe/Renew1.cc @ 639:70c5c2d2eb24
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2009 18:45:24 +0900 |
parents | ab866bc8a624 |
children |
rev | line source |
---|---|
192 | 1 #include <stdio.h> |
2 #include "Renew1.h" | |
3 #include "SpeProfile.h" | |
4 #include "Func.h" | |
5 | |
298 | 6 /* これは必須 */ |
192 | 7 SchedDefineTask(Renew1); |
8 | |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
9 static int |
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
10 run(SchedTask *s, void *rbuf, void *wbuf) |
192 | 11 { |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
12 SpeProfile *profile = (SpeProfile*)s->global_get(0); |
192 | 13 profile->ProfStop(); |
14 profile->ProfPrint(); | |
15 | |
502
36b323130b1b
Renew Task addInData (not yet worked).
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
488
diff
changeset
|
16 int *test_num = (int *)s->get_input(rbuf,0); |
506 | 17 int *local_num = (int *)s->get_param(0); |
18 | |
19 s->printf("[SPE] Renew1 test_num = %d\n", *test_num); | |
20 s->printf("[SPE] Renew1 local_num = %d\n", *local_num); | |
488 | 21 |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
22 s->printf("[SPE] ** running Renew1\n"); |
192 | 23 |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
24 s->printf("[SPE] Create Task : Renew2\n"); |
626
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
506
diff
changeset
|
25 HTaskPtr nextTask = s->create_task(RENEW2); |
ab866bc8a624
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
506
diff
changeset
|
26 nextTask->spawn(); |
192 | 27 |
467
44c0bce54dcf
fix all examples. test_render is not working now.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
356
diff
changeset
|
28 s->printf("[SPE] ** finish Renew1\n\n"); |
192 | 29 |
30 return 0; | |
31 } |