Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Cell/spe/main.cc @ 878:6f0797d596bb
hash bug fixed(?)
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 06 Jul 2010 10:39:41 +0900 |
parents | f2497e0ecd7c |
children | e015a4e5e4b0 |
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 { | |
792 | 20 CellScheduler *c_scheduler; |
81 | 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 |
792 | 30 TaskManagerImpl *manager = 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 | |
792 | 35 c_scheduler = new CellScheduler(); |
36 c_scheduler->init(manager); | |
37 c_scheduler->id = (int)argc; | |
94 | 38 |
792 | 39 manager->set_scheduler(c_scheduler); |
619 | 40 |
792 | 41 c_scheduler->run(new SchedNop()); |
200 | 42 |
792 | 43 c_scheduler->finish(); |
81 | 44 |
45 return 0; | |
46 } |