From 69f2911e04ffb1b19eef1fafb8c040af271f656e Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 15 Jul 2010 18:09:46 -0800 Subject: creating branch for adding support for CUDA 3.x and Fermi [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829] --- src/intersim/outputset.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/intersim/outputset.hpp (limited to 'src/intersim/outputset.hpp') diff --git a/src/intersim/outputset.hpp b/src/intersim/outputset.hpp new file mode 100644 index 0000000..ad8d2ad --- /dev/null +++ b/src/intersim/outputset.hpp @@ -0,0 +1,36 @@ +#ifndef _OUTPUTSET_HPP_ +#define _OUTPUTSET_HPP_ + +#include +#include + +class OutputSet { + int _num_outputs; + + struct sSetElement { + int vc_start; + int vc_end; + int pri; + }; + + list *_outputs; + +public: + OutputSet( int num_outputs ); + ~OutputSet( ); + + void Clear( ); + void Add( int output_port, int vc, int pri = 0 ); + void AddRange( int output_port, int vc_start, int vc_end, int pri = 0 ); + + int Size( ) const; + bool OutputEmpty( int output_port ) const; + int NumVCs( int output_port ) const; + + int GetVC( int output_port, int vc_index, int *pri = 0 ) const; + bool GetPortVC( int *out_port, int *out_vc ) const; +}; + +#endif + + -- cgit v1.3