Mercurial > hg > Members > kono > Cerium
view TaskManager/Cell/spe/main.cc @ 636:d433fc37587d
Cell Simple Task compiled. but not worked.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 19:09:40 +0900 |
parents | 5b178db5988a |
children | 5530fa36d42e |
line wrap: on
line source
#include <stdio.h> #include "CellScheduler.h" #include "SpeTaskManagerImpl.h" #include "spu_mfcio.h" #include "error.h" extern unsigned char _end[]; int main(unsigned long long speid, unsigned long long argc, unsigned long long argv) { CellScheduler *manager; //const unsigned ls_size = (unsigned)&argc; //unsigned code_size = (unsigned)&_end; //unsigned heap_size = ls_size - code_size; __debug(" ls_size:%10d bytes\n", ls_size); __debug("code_size:%10d bytes\n", code_size); __debug("heap_size:%10d bytes\n", heap_size); TaskManagerImpl *tm = new TaskManagerImpl(); manager = new CellScheduler(); manager->init(tm); manager->id = (int)argc; tm->set_scheduler(manager); spu_write_decrementer(0x7FFFFFFFU); unsigned int prof = spu_read_decrementer(); manager->run(); prof -= spu_read_decrementer(); //printf("%f\n", prof/79800000.0f*1000.0f); manager->finish(); return 0; }