annotate TaskManager/Cell/spe/SpeTaskManagerImpl.cc @ 636:aba1600e8f83 draft

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 64e05530e333
children 20665e4060ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
621
64e05530e333 Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
1 #include "SpeTaskManagerImpl.h"
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "Scheduler.h"
636
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
3 #include <stdlib.h>
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
621
64e05530e333 Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
7 HTaskPtr TaskManagerImpl::create_task(int cmd) {return 0;}
636
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
8 HTaskPtr TaskManagerImpl::create_task(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws) { return 0; }
621
64e05530e333 Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
9 void TaskManagerImpl::set_task_depend(HTaskPtr master, HTaskPtr slave) {}
64e05530e333 Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
10 void TaskManagerImpl::spawn_task(HTaskPtr) {}
64e05530e333 Cell fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 619
diff changeset
11 void TaskManagerImpl::set_task_cpu(HTaskPtr, CPU_TYPE) {}
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
636
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
13 void*
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
14 TaskManagerImpl::allocate(int size, int alignment)
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
15 {
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
16 if (size==0) return 0;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
17 #if defined(__SPU__)
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
18 return malloc(size);
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
19 #else
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
20 void *buff;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
21 posix_memalign(&buff, alignment, size);
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
22 return buff;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
23 #endif
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
24 }
619
278db3ca751d RenewTask removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
636
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
26 void*
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
27 TaskManagerImpl::allocate(int size)
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
28 {
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
29 if (size==0) return 0;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
30 #if defined(__SPU__)
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
31 return malloc(size);
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
32 #else
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
33 void *buff;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
34 posix_memalign(&buff, DEFAULT_ALIGNMENT, size);
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
35 return buff;
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
36 #endif
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
37 }
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
38
aba1600e8f83 Cell Simple Task compiled. but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 621
diff changeset
39