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/wavefront.cpp | |
| 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/wavefront.cpp')
| -rw-r--r-- | src/intersim/wavefront.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/intersim/wavefront.cpp b/src/intersim/wavefront.cpp deleted file mode 100644 index c9fab7a..0000000 --- a/src/intersim/wavefront.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "booksim.hpp"
-#include <iostream>
-
-#include "wavefront.hpp"
-#include "random_utils.hpp"
-
-Wavefront::Wavefront( const Configuration &config,
- Module *parent, const string& name,
- int inputs, int outputs ) :
-DenseAllocator( config, parent, name, inputs, outputs )
-{
- // We need a square wavefront allocator, so take the max dimension
- _square = ( _inputs > _outputs ) ? _inputs : _outputs;
-
- // The diagonal with priority
- _pri = 0;
-}
-
-Wavefront::~Wavefront( )
-{
-}
-
-void Wavefront::Allocate( )
-{
- int input;
- int output;
-
- // Clear matching
-
- for ( int i = 0; i < _inputs; ++i ) {
- _inmatch[i] = -1;
- }
- for ( int j = 0; j < _outputs; ++j ) {
- _outmatch[j] = -1;
- }
-
- // Loop through diagonals of request matrix
-
- for ( int p = 0; p < _square; ++p ) {
- output = ( _pri + p ) % _square;
-
- // Step through the current diagonal
- for ( input = 0; input < _inputs; ++input ) {
- if ( ( output < _outputs ) &&
- ( _inmatch[input] == -1 ) &&
- ( _outmatch[output] == -1 ) &&
- ( _request[input][output].label != -1 ) ) {
- // Grant!
- _inmatch[input] = output;
- _outmatch[output] = input;
- }
-
- output = ( output + 1 ) % _square;
- }
- }
-
- // Round-robin the priority diagonal
- _pri = ( _pri + 1 ) % _square;
-}
-
-
|
