drasys.or.linear.blas
Class SmpBLAS3

java.lang.Object
  |
  +--drasys.or.linear.blas.SmpBLAS3

public class SmpBLAS3
extends java.lang.Object
implements BLAS3I

Parallel implementation of the BLAS3 for Java. Blas3 operates on matrices stored contiguously in one-dimensional arrays. It also supports sub-matrices which allow it to work with both '0' and '1' based indexing. The increment arguments 'inci' and 'incj' allow this method to operate directly on both row-major and column-major structures.
The arrays containing complex elements store each complex element in two adjacent array positions. The real component has the even index and the imaginary component has the next higher index. The 'beg*' and 'inc*' arguments specify the logical index of the complex element, these are multiplied by two internally to obtain the offset into the array.

See Also:
RowMajorMatrix, ColumnMajorMatrix, RowMajorMatrix,

References:

Parallel Algorithms for Matrix Computations
    K.A. Gallivan / Paperback / Published 1990
Linear Algebra and Its Applications
    Gilbert Strang / Hardcover / Published 1988
Matrix Computations (Johns Hopkins Studies in the Mathematical Sciences)
    Gene H. Golub, Charles F. Van Loan (Contributor) / Paperback / Published 1996


Constructor Summary
SmpBLAS3()
          Construct a default underlying serial BLAS implementation.
SmpBLAS3(BLAS3I blas3)
          Construct an explicit underlying serial BLAS implementation.
 
Method Summary
 void cgemm(int m, int n, int k, ComplexI alpha, float[] A, int begA, int incAi, int incAj, float[] B, int begB, int incBi, int incBj, ComplexI beta, float[] C, int begC, int incCi, int incCj)
          Computes: C = alpha*A*B + beta*C.
 void dgemm(int m, int n, int k, double alpha, double[] A, int begA, int incAi, int incAj, double[] B, int begB, int incBi, int incBj, double beta, double[] C, int begC, int incCi, int incCj)
          Computes: C = alpha*A*B + beta*C.
 Smp getSmp()
          Get the underlying Smp object.
 void setSmp(Smp smp)
          Set the underlying Smp object.
 void sgemm(int m, int n, int k, float alpha, float[] A, int begA, int incAi, int incAj, float[] B, int begB, int incBi, int incBj, float beta, float[] C, int begC, int incCi, int incCj)
          Computes: C = alpha*A*B + beta*C.
 void zgemm(int m, int n, int k, ComplexI alpha, double[] A, int begA, int incAi, int incAj, double[] B, int begB, int incBi, int incBj, ComplexI beta, double[] C, int begC, int incCi, int incCj)
          Computes: C = alpha*A*B + beta*C.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmpBLAS3

public SmpBLAS3()
Construct a default underlying serial BLAS implementation. The default minimum operations per thread is '100'.

SmpBLAS3

public SmpBLAS3(BLAS3I blas3)
Construct an explicit underlying serial BLAS implementation. The default minimum operations per thread is '100'.
Method Detail

getSmp

public Smp getSmp()
Get the underlying Smp object.

setSmp

public void setSmp(Smp smp)
Set the underlying Smp object.

dgemm

public void dgemm(int m,
                  int n,
                  int k,
                  double alpha,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  double[] B,
                  int begB,
                  int incBi,
                  int incBj,
                  double beta,
                  double[] C,
                  int begC,
                  int incCi,
                  int incCj)
           throws BlasException
Computes: C = alpha*A*B + beta*C. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'. The transpose of 'B' can be used by swapping 'incBi' and 'incBj'.
Specified by:
dgemm in interface BLAS3I
Parameters:
m - number of rows in 'A' and 'C'
n - number of columns in 'B' and 'C'
k - number of columns in 'A' and rows in 'B'
alpha - constant scaler
A - the matrix 'A' in contiguous format
begA - offset of the first element of 'A'
incAi - row increment for matrix 'A'
incAj - column increment for matrix 'A'
B - the matrix 'B' in contiguous format
begB - offset of the first element of 'B'
incBi - row increment for matrix 'B'
incBj - column increment for matrix 'B'
beta - constant scaler
C - the matrix 'C' in contiguous format
begC - offset of the first element of 'B'
incCi - row increment for matrix 'B'
incCj - column increment for matrix 'B'

sgemm

public void sgemm(int m,
                  int n,
                  int k,
                  float alpha,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  float[] B,
                  int begB,
                  int incBi,
                  int incBj,
                  float beta,
                  float[] C,
                  int begC,
                  int incCi,
                  int incCj)
           throws BlasException
Computes: C = alpha*A*B + beta*C. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'. The transpose of 'B' can be used by swapping 'incBi' and 'incBj'.
Specified by:
sgemm in interface BLAS3I
Parameters:
m - number of rows in 'A' and 'C'
n - number of columns in 'B' and 'C'
k - number of columns in 'A' and rows in 'B'
alpha - constant scaler
A - the matrix 'A' in contiguous format
begA - offset of the first element of 'A'
incAi - row increment for matrix 'A'
incAj - column increment for matrix 'A'
B - the matrix 'B' in contiguous format
begB - offset of the first element of 'B'
incBi - row increment for matrix 'B'
incBj - column increment for matrix 'B'
beta - constant scaler
C - the matrix 'C' in contiguous format
begC - offset of the first element of 'B'
incCi - row increment for matrix 'B'
incCj - column increment for matrix 'B'

zgemm

public void zgemm(int m,
                  int n,
                  int k,
                  ComplexI alpha,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  double[] B,
                  int begB,
                  int incBi,
                  int incBj,
                  ComplexI beta,
                  double[] C,
                  int begC,
                  int incCi,
                  int incCj)
           throws BlasException
Computes: C = alpha*A*B + beta*C. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'. The transpose of 'B' can be used by swapping 'incBi' and 'incBj'.
Specified by:
zgemm in interface BLAS3I
Parameters:
m - number of rows in 'A' and 'C'
n - number of columns in 'B' and 'C'
k - number of columns in 'A' and rows in 'B'
alpha - constant scaler
A - the matrix 'A' in contiguous format
begA - offset of the first element of 'A'
incAi - row increment for matrix 'A'
incAj - column increment for matrix 'A'
B - the matrix 'B' in contiguous format
begB - offset of the first element of 'B'
incBi - row increment for matrix 'B'
incBj - column increment for matrix 'B'
beta - constant scaler
C - the matrix 'C' in contiguous format
begC - offset of the first element of 'B'
incCi - row increment for matrix 'B'
incCj - column increment for matrix 'B'

cgemm

public void cgemm(int m,
                  int n,
                  int k,
                  ComplexI alpha,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  float[] B,
                  int begB,
                  int incBi,
                  int incBj,
                  ComplexI beta,
                  float[] C,
                  int begC,
                  int incCi,
                  int incCj)
           throws BlasException
Computes: C = alpha*A*B + beta*C. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'. The transpose of 'B' can be used by swapping 'incBi' and 'incBj'.
Specified by:
cgemm in interface BLAS3I
Parameters:
m - number of rows in 'A' and 'C'
n - number of columns in 'B' and 'C'
k - number of columns in 'A' and rows in 'B'
alpha - constant scaler
A - the matrix 'A' in contiguous format
begA - offset of the first element of 'A'
incAi - row increment for matrix 'A'
incAj - column increment for matrix 'A'
B - the matrix 'B' in contiguous format
begB - offset of the first element of 'B'
incBi - row increment for matrix 'B'
incBj - column increment for matrix 'B'
beta - constant scaler
C - the matrix 'C' in contiguous format
begC - offset of the first element of 'B'
incCi - row increment for matrix 'B'
incCj - column increment for matrix 'B'


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com