Mercurial > hg > Members > kono > Cerium
changeset 828:da49d9e458dc
example fix 30% done.
author | tkaito |
---|---|
date | Tue, 25 May 2010 03:40:11 +0900 |
parents | 865508d81299 |
children | 4c292ff3558d |
files | example/MemList/Makefile.def example/mainMem/ppe/Hello.cc example/mainMem/spe/Hello.cc example/task_queue/spe/spe-main.cc |
diffstat | 4 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/example/MemList/Makefile.def Mon May 24 23:53:06 2010 +0900 +++ b/example/MemList/Makefile.def Tue May 25 03:40:11 2010 +0900 @@ -8,7 +8,7 @@ ABIBIT=32 CC = g++ -m$(ABIBIT) -CFLAGS = -g -Wall -O9 +CFLAGS = -g -Wall #-O9 INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. LIBS = -L${CERIUM}/TaskManager
--- a/example/mainMem/ppe/Hello.cc Mon May 24 23:53:06 2010 +0900 +++ b/example/mainMem/ppe/Hello.cc Tue May 25 03:40:11 2010 +0900 @@ -35,8 +35,10 @@ #endif - smanager->fprintf(smanager->stderr_,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); - smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0lx len %d\n", task_id, (unsigned long)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 %0lx len %d\n", task_id, (unsigned long)next,(int)SIZE); + smanager->printf("sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + smanager->printf("[%d] Main Mem %0lx len %d\n", task_id, (unsigned long)next,(int)SIZE); return 0; }
--- a/example/mainMem/spe/Hello.cc Mon May 24 23:53:06 2010 +0900 +++ b/example/mainMem/spe/Hello.cc Tue May 25 03:40:11 2010 +0900 @@ -35,8 +35,11 @@ #endif - 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); + //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); + smanager->printf("sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + smanager->printf("[%d] Main Mem %0x len %d\n", task_id, (unsigned int)next,(int)SIZE); + smanager->free_(ptr); return 0;
--- a/example/task_queue/spe/spe-main.cc Mon May 24 23:53:06 2010 +0900 +++ b/example/task_queue/spe/spe-main.cc Tue May 25 03:40:11 2010 +0900 @@ -13,8 +13,8 @@ { SchedRegisterTask(HELLO_TASK, Hello); - QueuePtr q = (QueuePtr) s->allocate(sizeof(Queues)); - + //QueuePtr q = (QueuePtr) s->allocate(sizeof(Queues)); + QueuePtr q = (QueuePtr) s->global_alloc(0, sizeof(Queues)); s->global_set(0, (void *)q); q->i = 0;