diff options
| author | Dongdong Li <[email protected]> | 2013-11-22 15:38:36 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:59 -0700 |
| commit | ef8a5521e440baa2f86d468cdc9078f54ec7c0c0 (patch) | |
| tree | c1627660cc01983067eb5d9b09fb82b4e06d9983 /src/intersim/allocator.hpp | |
| parent | bdc0e550448f04c7c8f030b7421209bae37e651d (diff) | |
Delete Intersim
Code Review Issue: 113001
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 17414]
Diffstat (limited to 'src/intersim/allocator.hpp')
| -rw-r--r-- | src/intersim/allocator.hpp | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/src/intersim/allocator.hpp b/src/intersim/allocator.hpp deleted file mode 100644 index 8d92933..0000000 --- a/src/intersim/allocator.hpp +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _ALLOCATOR_HPP_
-#define _ALLOCATOR_HPP_
-
-#include <string>
-#include <list>
-
-#include "module.hpp"
-#include "config_utils.hpp"
-
-class Allocator : public Module {
-protected:
- const int _inputs;
- const int _outputs;
-
- int *_inmatch;
- int *_outmatch;
-
- int *_outmask;
-
- void _ClearMatching( );
-public:
-
- struct sRequest {
- int port;
- int label;
- int in_pri;
- int out_pri;
- };
-
- Allocator( const Configuration &config,
- Module *parent, const string& name,
- int inputs, int outputs );
- virtual ~Allocator( );
-
- virtual void Clear( ) = 0;
-
- virtual int ReadRequest( int in, int out ) const = 0;
- virtual bool ReadRequest( sRequest &req, int in, int out ) const = 0;
-
- virtual void AddRequest( int in, int out, int label = 1,
- int in_pri = 0, int out_pri = 0 ) = 0;
- virtual void RemoveRequest( int in, int out, int label = 1 ) = 0;
-
- virtual void Allocate( ) = 0;
-
- void MaskOutput( int out, int mask = 1 );
-
- int OutputAssigned( int in ) const;
- int InputAssigned( int out ) const;
-
- virtual void PrintRequests( ) const = 0;
-
- static Allocator *NewAllocator( const Configuration &config,
- Module *parent, const string& name,
- const string &alloc_type,
- int inputs, int input_speedup,
- int outputs, int output_speedup );
-};
-
-//==================================================
-// A dense allocator stores the entire request
-// matrix.
-//==================================================
-
-class DenseAllocator : public Allocator {
-protected:
- sRequest **_request;
-
-public:
- DenseAllocator( const Configuration &config,
- Module *parent, const string& name,
- int inputs, int outputs );
- virtual ~DenseAllocator( );
-
- void Clear( );
-
- int ReadRequest( int in, int out ) const;
- bool ReadRequest( sRequest &req, int in, int out ) const;
-
- void AddRequest( int in, int out, int label = 1,
- int in_pri = 0, int out_pri = 0 );
- void RemoveRequest( int in, int out, int label = 1 );
-
- virtual void Allocate( ) = 0;
-
- void PrintRequests( ) const;
-};
-
-//==================================================
-// A sparse allocator only stores the requests
-// (allows for a more efficient implementation).
-//==================================================
-
-class SparseAllocator : public Allocator {
-protected:
- list<int> *_in_occ;
- list<int> *_out_occ;
-
- list<sRequest> *_in_req;
- list<sRequest> *_out_req;
-
-public:
- SparseAllocator( const Configuration &config,
- Module *parent, const string& name,
- int inputs, int outputs );
- virtual ~SparseAllocator( );
-
- void Clear( );
-
- int ReadRequest( int in, int out ) const;
- bool ReadRequest( sRequest &req, int in, int out ) const;
-
- void AddRequest( int in, int out, int label = 1,
- int in_pri = 0, int out_pri = 0 );
- void RemoveRequest( int in, int out, int label = 1 );
-
- virtual void Allocate( ) = 0;
-
- void PrintRequests( ) const;
-};
-
-#endif
|
