summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.cc')
-rw-r--r--src/gpgpu-sim/gpu-cache.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gpgpu-sim/gpu-cache.cc b/src/gpgpu-sim/gpu-cache.cc
index 594e683..202511d 100644
--- a/src/gpgpu-sim/gpu-cache.cc
+++ b/src/gpgpu-sim/gpu-cache.cc
@@ -241,3 +241,21 @@ void tag_array::print( FILE *stream, unsigned &total_access, unsigned &total_mis
total_misses+=m_miss;
total_access+=m_access;
}
+
+bool was_write_sent( const std::list<cache_event> &events )
+{
+ for( std::list<cache_event>::const_iterator e=events.begin(); e!=events.end(); e++ ) {
+ if( *e == WRITE_REQUEST_SENT )
+ return true;
+ }
+ return false;
+}
+
+bool was_read_sent( const std::list<cache_event> &events )
+{
+ for( std::list<cache_event>::const_iterator e=events.begin(); e!=events.end(); e++ ) {
+ if( *e == READ_REQUEST_SENT )
+ return true;
+ }
+ return false;
+}