annotate example/renew_task/spe/Renew1.cc @ 626:ab866bc8a624

64bit mode compatibility on Cell
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 16 Nov 2009 11:37:26 +0900
parents 1d4a8a86f26b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
192
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
1 #include <stdio.h>
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
2 #include "Renew1.h"
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
3 #include "SpeProfile.h"
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
4 #include "Func.h"
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
5
298
58fd16298954 from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 192
diff changeset
6 /* これは必須 */
192
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
7 SchedDefineTask(Renew1);
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
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
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
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
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
13 profile->ProfStop();
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
14 profile->ProfPrint();
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
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
1d4a8a86f26b code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
17 int *local_num = (int *)s->get_param(0);
1d4a8a86f26b code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
18
1d4a8a86f26b code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
19 s->printf("[SPE] Renew1 test_num = %d\n", *test_num);
1d4a8a86f26b code_load in read()
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 502
diff changeset
20 s->printf("[SPE] Renew1 local_num = %d\n", *local_num);
488
63741e2dc6cb change viewer
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents: 467
diff changeset
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
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
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
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
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
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
29
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
30 return 0;
4f5c64e713c7 add example/renew_task
gongo@localhost.localdomain
parents:
diff changeset
31 }