annotate TaskManager/kernel/memory/MemIterator.h @ 1546:61164c687b29 draft

fix GpuScheduler flip
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 05 Feb 2013 13:15:46 +0900
parents d7486d6a5e37
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1173
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
1 #ifndef INCLUDED_MEMORY_ITERATOR
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
2 #define INCLUDED_MEMORY_ITERATOR
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
3
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
4 #include "MemList.h"
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
5 #include "MemorySegment.h"
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
6 #include "AddrList.h"
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
7 #include "SchedTask.h"
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
8
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
9 enum {
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
10
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
11 READ_WRITE,
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
12 READ,
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
13 WRITE,
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
14
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
15 };
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
16
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
17 class MemIterator {
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
18 public:
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
19
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
20 // 走査する アドレスリスト
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
21 AddrListPtr addr_list;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
22
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
23 // 扱う MemorySegment のリスト
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
24 MemList *mem_list;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
25
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
26 // ms の stage
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
27 MemorySegmentPtr read_ms;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
28 MemorySegmentPtr exec_ms;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
29 MemorySegmentPtr write_ms;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
30 MemorySegmentPtr free_ms;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
31
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
32 SchedTask *smanager;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
33
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
34 MemIterator(AddrListPtr add_list, MemList *mem_list, int cmd, SchedTask *smanager);
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
35 ~MemIterator();
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
36
1175
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
37
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
38 MemorySegmentPtr (MemIterator::*get_ms)(void);
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
39
1173
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
40 int hasNext(void);
1175
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
41
1173
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
42 MemorySegmentPtr get_read_write_ms(void);
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
43 MemorySegmentPtr get_read_ms(void);
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
44 MemorySegmentPtr get_write_ms(void);
1175
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
45
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
46 void collect_ms(void);
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
47 void overwrite_list(AddrListPtr list);
d7486d6a5e37 minor change
Yutaka_Kinjyo
parents: 1173
diff changeset
48
1173
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
49 };
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
50
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
51 typedef MemIterator *MemIteratorPtr;
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
52
cce350bed940 add MemIterator. (no test)
Yutaka_Kinjyo
parents:
diff changeset
53 #endif