From 6f8637f120670157230074d3b3f847f00d3e3e2c Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Fri, 28 Sep 2012 12:11:35 -0800 Subject: Updating comment in l1/l2 access functions [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14199] --- src/gpgpu-sim/gpu-cache.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gpgpu-sim/gpu-cache.cc b/src/gpgpu-sim/gpu-cache.cc index 634ad61..63b5fc9 100644 --- a/src/gpgpu-sim/gpu-cache.cc +++ b/src/gpgpu-sim/gpu-cache.cc @@ -561,7 +561,8 @@ enum cache_request_status l1_cache::access( new_addr_type addr, mem_fetch *mf, u enum cache_request_status status = m_tag_array.probe(block_addr,cache_index); - // Each function pointer (m_rd/wr_hit/miss) is set in the data_cache constructor to reflect the corresponding cache configuration options + // Each function pointer ( m_[rd/wr]_[hit/miss] ) is set in the data_cache constructor to reflect the corresponding cache configuration options. + // Function pointers were used to avoid many long conditional branches resulting from many cache configuration options. if(wr){ // Write if(status == HIT){ return (this->*m_wr_hit)(addr, cache_index, mf, time, events); @@ -587,7 +588,8 @@ enum cache_request_status l2_cache::access( new_addr_type addr, mem_fetch *mf, u unsigned cache_index = (unsigned)-1; enum cache_request_status status = m_tag_array.probe(block_addr,cache_index); - // Each function pointer (m_rd/wr_hit/miss) is set in the data_cache constructor to reflect the corresponding cache configuration options + // Each function pointer ( m_[rd/wr]_[hit/miss] ) is set in the data_cache constructor to reflect the corresponding cache configuration options. + // Function pointers were used to avoid many long conditional branches resulting from many cache configuration options. if(wr){ // Write if(status == HIT){ return (this->*m_wr_hit)(addr, cache_index, mf, time, events); -- cgit v1.3