Mercurial > hg > Members > kono > Cerium
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 |
rev | line source |
---|---|
81 | 1 #include <stdio.h> |
2 #include "CellScheduler.h" | |
621 | 3 #include "SpeTaskManagerImpl.h" |
194 | 4 #include "spu_mfcio.h" |
109 | 5 #include "error.h" |
672 | 6 #include "SysFunc.h" |
685 | 7 #include "SchedNop.h" |
8 | |
81 | 9 |
94 | 10 extern unsigned char _end[]; |
11 | |
672 | 12 SchedExternTask(ShowTime); |
13 SchedExternTask(StartProfile); | |
14 | |
15 | |
81 | 16 int |
17 main(unsigned long long speid, | |
18 unsigned long long argc, unsigned long long argv) | |
19 { | |
20 CellScheduler *manager; | |
21 | |
242 | 22 //const unsigned ls_size = (unsigned)&argc; |
23 //unsigned code_size = (unsigned)&_end; | |
24 //unsigned heap_size = ls_size - code_size; | |
94 | 25 |
109 | 26 __debug(" ls_size:%10d bytes\n", ls_size); |
27 __debug("code_size:%10d bytes\n", code_size); | |
28 __debug("heap_size:%10d bytes\n", heap_size); | |
94 | 29 |
637 | 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 | 32 SchedRegister(ShowTime); |
33 SchedRegister(StartProfile); | |
34 | |
81 | 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 | 37 manager->id = (int)argc; |
94 | 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 | 40 |
685 | 41 manager->run(new ScedNop()); |
200 | 42 |
81 | 43 manager->finish(); |
44 | |
45 return 0; | |
46 } |