summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-cache.h
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2013-02-09 08:00:44 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:04 -0700
commite8b9773363a5543374d0951877f345fc4e7f917c (patch)
tree6c73f403aa8d0cff28cd9610559a1db4c3d726ff /src/gpgpu-sim/gpu-cache.h
parent335cfe1bf2af2626d9c09847b194122d5d0b0399 (diff)
Addin in a protected constructor that can be used by derived classes of the tag_array so they can allocate their own type of lines
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15214]
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.h')
-rw-r--r--src/gpgpu-sim/gpu-cache.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h
index 2d50e67..dabcc18 100644
--- a/src/gpgpu-sim/gpu-cache.h
+++ b/src/gpgpu-sim/gpu-cache.h
@@ -278,6 +278,7 @@ private:
class tag_array {
public:
+ // Use this constructor
tag_array( const cache_config &config, int core_id, int type_id );
~tag_array();
@@ -299,6 +300,16 @@ public:
void get_stats(unsigned &total_access, unsigned &total_misses) const;
protected:
+ // This constructor is intended for use only from derived classes that wish to
+ // avoid unnecessary memory allocation that takes place in the
+ // other tag_array constructor
+ tag_array( const cache_config &config,
+ int core_id,
+ int type_id,
+ cache_block_t* new_lines );
+ void init( int core_id, int type_id );
+
+protected:
const cache_config &m_config;