comparison example/mainMem/ppe/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 57530cb7f7d1
children 60aa3f241b10
comparison
equal deleted inserted replaced
466:4fa8760e18c2 467:44c0bce54dcf
6 SchedDefineTask(Hello); 6 SchedDefineTask(Hello);
7 7
8 #define PP_STORE 3 8 #define PP_STORE 3
9 #define SIZE (4096*sizeof(int)) 9 #define SIZE (4096*sizeof(int))
10 10
11 int 11 static int
12 Hello::run(void *rbuf, void *wbuf) 12 run(SchedTask *smanager, void *rbuf, void *wbuf)
13 { 13 {
14 int task_id = get_param(0); 14 int task_id = smanager->get_param(0);
15 int *ptr = 0; 15 int *ptr = 0;
16 #if 1 16 #if 1
17 ptr = (int*)smanager->allocate(SIZE); 17 ptr = (int*)smanager->allocate(SIZE);
18 18
19 smanager->mainMem_alloc(0, SIZE); 19 smanager->mainMem_alloc(0, SIZE);
33 smanager->dma_store(ptr, (uint32)next, 33 smanager->dma_store(ptr, (uint32)next,
34 SIZE, PP_STORE); 34 SIZE, PP_STORE);
35 #endif 35 #endif
36 36
37 37
38 fprintf(stderr,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); 38 smanager->fprintf(smanager->stderr_,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*));
39 fprintf(stderr,"[%d] Main Mem %0x len %d\n", task_id, (unsigned int)next,(int)SIZE); 39 smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0x len %d\n", task_id, (unsigned int)next,(int)SIZE);
40 40
41 return 0; 41 return 0;
42 } 42 }