Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/memory/MemHash.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 | 1ede991d6da3 |
children |
rev | line source |
---|---|
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
1 #ifndef INCLUDED_MEM_HASH |
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
2 #define INCLUDED_MEM_HASH |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
3 |
387
b6fce69839b5
no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
383
diff
changeset
|
4 #include "MemorySegment.h" |
b6fce69839b5
no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
383
diff
changeset
|
5 |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
6 class MemHash { |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
7 public: |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
8 MemHash(void); |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
9 |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
10 private: |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
11 MemorySegmentPtr *table; |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
12 |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
13 public: |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
14 void clear(void); |
874 | 15 unsigned int hash(memaddr data); |
387
b6fce69839b5
no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
383
diff
changeset
|
16 int put(memaddr addr, MemorySegmentPtr ms); |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
17 MemorySegmentPtr get(memaddr addr); |
380 | 18 void remove(memaddr addr); |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
19 }; |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
20 |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
21 typedef MemHash* MemHashPtr; |
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
22 |
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
380
diff
changeset
|
23 const int hashSize = 263; |
1154 | 24 //const int hashSize = 1; |
1123 | 25 |
387
b6fce69839b5
no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
383
diff
changeset
|
26 const int tableSize = sizeof(MemorySegmentPtr)*hashSize; |
167
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
27 |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
28 #endif |
508beb59e0eb
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
diff
changeset
|
29 |
352 | 30 |
31 |