INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Defines | Functions
C:/cygwin/home/Javier/insee/src/pattern.c File Reference

Definition of all synthetic traffic patterns in use by FSIN. More...

#include "pattern.h"
#include <math.h>
Include dependency graph for pattern.c:

Defines

#define i_esimo(b, i)   (((b) & (1 << (i))) ? 1:0)
 Gets the bit in position i of a given number.

Functions

long transpose (long node, long nnodes)
long complement (long node, long nnodes)
long butterfly (long node, long nnodes)
long shuffle (long node, long nnodes)
long reversal (long node, long nnodes)

Detailed Description

Definition of all synthetic traffic patterns in use by FSIN.

FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, A. Gonzalez, J. Navaridas

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Function Documentation

long butterfly ( long  node,
long  nnodes 
)

Calculates the destination using butterfly permutation.

Parameters:
nodeThe source node.
nnodesTotal number of Nodes.
Returns:
The destination node.
long complement ( long  node,
long  nnodes 
)

Calculates the destination complementing the source.

Parameters:
nodeThe source node.
nnodesTotal number of Nodes.
Returns:
The destination node.
long reversal ( long  node,
long  nnodes 
)

Calculates the destination reversing the source node.

Parameters:
nodeThe source node.
nnodesTotal number of Nodes.
Returns:
The destination node.
long shuffle ( long  node,
long  nnodes 
)

Calculates the destination using the perfect shuffle permutation.

Parameters:
nodeThe source node.
nnodesTotal number of Nodes.
Returns:
The destination node.
long transpose ( long  node,
long  nnodes 
)

Calculates the destination using transpose permutation.

Parameters:
nodeThe source node.
nnodesTotal number of Nodes.
Returns:
The destination node.