Mercurial > hg > Members > kono > Cerium
view TaskManager/Cell/spe/main.cc @ 200:10ad99550ee8
fix run_draw
author | gongo@localhost.localdomain |
---|---|
date | Mon, 26 Jan 2009 14:27:45 +0900 |
parents | 72dcf908ec52 |
children | fe2cc32cd94d |
line wrap: on
line source
#include <stdio.h> #include "CellScheduler.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); manager = new CellScheduler(); manager->init(); manager->id = (int)argc; 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; }