Class MatrixMultMPI

java.lang.Object
  extended by MatrixMultMPI

public class MatrixMultMPI
extends java.lang.Object

Matrix Multiplication. sequential and parallel using MPI.

Author:
Akitoshi Yoshida, Heinz Kredel.

Constructor Summary
MatrixMultMPI()
           
 
Method Summary
 void dotmult(double[][] C, double[][] A, double[][] B, int i, int j)
           
static void main(java.lang.String[] args)
           
 boolean matcheck0(double[][] A)
           
 double[][] matgen(int n, int m)
           
 double[][] matgen0(int n, int m)
           
 double[][] matgen1(int n, int m)
           
 void matprint(double[][] A)
           
 void parmult(double[][] C, double[][] A, double[][] B)
           
 void seq2mult(double[][] C, double[][] A, double[][] B)
           
 void seqdiff(double[][] C, double[][] A, double[][] B)
           
 void seqmult(double[][] C, double[][] A, double[][] B)
           
 void vecprint(int[] V)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixMultMPI

public MatrixMultMPI()
Method Detail

seqmult

public void seqmult(double[][] C,
                    double[][] A,
                    double[][] B)
Parameters:
C - two-dimensional double array.
A - two-dimensional double array.
B - two-dimensional double array.

parmult

public void parmult(double[][] C,
                    double[][] A,
                    double[][] B)
             throws mpi.MPIException
Parameters:
C - two-dimensional double array.
A - two-dimensional double array.
B - two-dimensional double array.
Throws:
MPIException.
mpi.MPIException

seqdiff

public void seqdiff(double[][] C,
                    double[][] A,
                    double[][] B)
Parameters:
C - two-dimensional double array.
A - two-dimensional double array.
B - two-dimensional double array.

dotmult

public void dotmult(double[][] C,
                    double[][] A,
                    double[][] B,
                    int i,
                    int j)
Parameters:
C - two-dimensional double array.
A - two-dimensional double array.
B - two-dimensional double array.
i - row of A.
j - column of B.

seq2mult

public void seq2mult(double[][] C,
                     double[][] A,
                     double[][] B)
Parameters:
C - two-dimensional double array.
A - two-dimensional double array.
B - two-dimensional double array.

matgen

public double[][] matgen(int n,
                         int m)
Parameters:
n - rows of result.
m - columns of result.
Returns:
A.

matgen0

public double[][] matgen0(int n,
                          int m)
Parameters:
n - rows of result.
m - columns of result.
Returns:
A.

matgen1

public double[][] matgen1(int n,
                          int m)
Parameters:
n - rows of result.
m - columns of result.
Returns:
A.

matprint

public void matprint(double[][] A)
Parameters:
A - two-dimensional double array.

vecprint

public void vecprint(int[] V)
Parameters:
V - vector.

matcheck0

public boolean matcheck0(double[][] A)
Parameters:
A - two-dimensional double array.
Returns:
true if A is approximately zero.

main

public static void main(java.lang.String[] args)
                 throws mpi.MPIException
Throws:
mpi.MPIException