Mercurial > hg > Members > kono > Cerium
diff example/mainMem/spe/Hello.cc @ 467:44c0bce54dcf
fix all examples. test_render is not working now.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Oct 2009 19:25:25 +0900 |
parents | 2ddf79a7c5fb |
children | ab866bc8a624 |
line wrap: on
line diff
--- a/example/mainMem/spe/Hello.cc Thu Oct 01 17:33:58 2009 +0900 +++ b/example/mainMem/spe/Hello.cc Thu Oct 01 19:25:25 2009 +0900 @@ -8,10 +8,10 @@ #define PP_STORE 3 #define SIZE (4096*sizeof(int)) -int -Hello::run(void *rbuf, void *wbuf) +static int +run(SchedTask *smanager, void *rbuf, void *wbuf) { - int task_id = get_param(0); + int task_id = smanager->get_param(0); int *ptr = 0; #if 1 ptr = (int*)smanager->allocate(SIZE); @@ -35,9 +35,9 @@ #endif - fprintf(stderr,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); - fprintf(stderr,"[%d] Main Mem %0x len %d\n", task_id, (unsigned int)next,(int)SIZE); + smanager->fprintf(smanager->stderr_,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0x len %d\n", task_id, (unsigned int)next,(int)SIZE); - free(ptr); + smanager->free_(ptr); return 0; }