annotate TaskManager/Cell/spe/main.cc @ 685:b386522827ae

Bulk task on going.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Dec 2009 00:32:34 +0900
parents 3b6290c05f9f
children e4d2b823903c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
81
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
1 #include <stdio.h>
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
2 #include "CellScheduler.h"
621
5b178db5988a Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
3 #include "SpeTaskManagerImpl.h"
194
gongo@localhost.localdomain
parents: 193
diff changeset
4 #include "spu_mfcio.h"
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 94
diff changeset
5 #include "error.h"
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
6 #include "SysFunc.h"
685
b386522827ae Bulk task on going.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
7 #include "SchedNop.h"
b386522827ae Bulk task on going.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
8
81
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
9
94
588ab5f0e659 *** empty log message ***
gongo
parents: 81
diff changeset
10 extern unsigned char _end[];
588ab5f0e659 *** empty log message ***
gongo
parents: 81
diff changeset
11
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
12 SchedExternTask(ShowTime);
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
13 SchedExternTask(StartProfile);
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
14
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
15
81
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
16 int
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
17 main(unsigned long long speid,
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
18 unsigned long long argc, unsigned long long argv)
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
19 {
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
20 CellScheduler *manager;
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
21
242
8382f0f8c0b4 dma_wait
e065746@localhost.localdomain
parents: 212
diff changeset
22 //const unsigned ls_size = (unsigned)&argc;
8382f0f8c0b4 dma_wait
e065746@localhost.localdomain
parents: 212
diff changeset
23 //unsigned code_size = (unsigned)&_end;
8382f0f8c0b4 dma_wait
e065746@localhost.localdomain
parents: 212
diff changeset
24 //unsigned heap_size = ls_size - code_size;
94
588ab5f0e659 *** empty log message ***
gongo
parents: 81
diff changeset
25
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 94
diff changeset
26 __debug(" ls_size:%10d bytes\n", ls_size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 94
diff changeset
27 __debug("code_size:%10d bytes\n", code_size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 94
diff changeset
28 __debug("heap_size:%10d bytes\n", heap_size);
94
588ab5f0e659 *** empty log message ***
gongo
parents: 81
diff changeset
29
637
5530fa36d42e not yet worked...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 636
diff changeset
30 TaskManagerImpl *tm = new SpeTaskManagerImpl();
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
31
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
32 SchedRegister(ShowTime);
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
33 SchedRegister(StartProfile);
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 637
diff changeset
34
81
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
35 manager = new CellScheduler();
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
36 manager->init(tm);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 94
diff changeset
37 manager->id = (int)argc;
94
588ab5f0e659 *** empty log message ***
gongo
parents: 81
diff changeset
38
636
d433fc37587d Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
39 tm->set_scheduler(manager);
619
0decff4e867b RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 242
diff changeset
40
685
b386522827ae Bulk task on going.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 672
diff changeset
41 manager->run(new ScedNop());
200
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 194
diff changeset
42
81
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
43 manager->finish();
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
44
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
45 return 0;
b03a4d3565c0 *** empty log message ***
gongo
parents:
diff changeset
46 }