Main Page | Class List | File List | Class Members

CS_Triplet.hpp

00001 
00002 #include "CACHE.hpp"
00003 
00004 #ifndef _H_CS_TRIPLET
00005 #define _H_CS_TRIPLET
00006 
00008 template< typename T >
00009 class CS_Triplet {
00010 
00011    protected:
00012 
00014         unsigned long int row;
00015 
00017         unsigned long int column;
00018 
00019    public:
00020         
00022         const unsigned long int i() {
00023                 CACHE::getInstance()->access( &row, sizeof( unsigned long int ) );
00024                 return row;
00025         }
00026 
00028         const unsigned long int j() {
00029                 CACHE::getInstance()->access( &column, sizeof( unsigned long int ) );
00030                 return column;
00031         }
00032 
00034         T value;
00035 
00037         T& getValue() {
00038                 CACHE::getInstance()->access( &value, sizeof( T ) );
00039                 return value;
00040         }
00041 
00043         CS_Triplet( unsigned long int i, unsigned long int j, T val ): row( i ), column( j ), value( val ) {}
00044 
00046         CS_Triplet(): row( 0 ), column( 0 ), value( 0 ) {}
00047 
00048 };
00049 
00050 #endif
00051 

Generated on Fri Aug 15 18:12:22 2008 for Run-timeCacheSimulator by  doxygen 1.3.9.1