drasys.or.linear.blas
Class SmpBLAS2

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

public class SmpBLAS2
extends java.lang.Object
implements BLAS2I

Parallel implementation of the BLAS2 for Java. Blas2 operates on vectors and matrices stored contiguously in one-dimensional arrays. It also supports sub-matrices and sub-vectors 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:
DenseVector, RowMajorMatrix, ColumnMajorMatrix, DenseVector, 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
SmpBLAS2()
          Construct a default underlying serial BLAS implementation.
SmpBLAS2(BLAS2I blas2)
          Construct an explicit underlying serial BLAS implementation.
 
Method Summary
 void cgemv(int m, int n, ComplexI alpha, float[] A, int begA, int incAi, int incAj, float[] x, int begx, int incx, ComplexI beta, float[] y, int begy, int incy)
          Computes: y = alpha*A*x + beta*y.
 void cgerc(int m, int n, ComplexI alpha, float[] x, int begx, int incx, float[] y, int begy, int incy, float[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 void cgeru(int m, int n, ComplexI alpha, float[] x, int begx, int incx, float[] y, int begy, int incy, float[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 void dgemv(int m, int n, double alpha, double[] A, int begA, int incAi, int incAj, double[] x, int begx, int incx, double beta, double[] y, int begy, int incy)
          Computes: y = alpha*A*x + beta*y.
 void dger(int m, int n, double alpha, double[] x, int begx, int incx, double[] y, int begy, int incy, double[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 Smp getSmp()
          Get the underlying Smp object.
 void setSmp(Smp smp)
          Set the underlying Smp object.
 void sgemv(int m, int n, float alpha, float[] A, int begA, int incAi, int incAj, float[] x, int begx, int incx, float beta, float[] y, int begy, int incy)
          Computes: y = alpha*A*x + beta*y.
 void sger(int m, int n, float alpha, float[] x, int begx, int incx, float[] y, int begy, int incy, float[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 void zgemv(int m, int n, ComplexI alpha, double[] A, int begA, int incAi, int incAj, double[] x, int begx, int incx, ComplexI beta, double[] y, int begy, int incy)
          Computes: y = alpha*A*x + beta*y.
 void zgerc(int m, int n, ComplexI alpha, double[] x, int begx, int incx, double[] y, int begy, int incy, double[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 void zgeru(int m, int n, ComplexI alpha, double[] x, int begx, int incx, double[] y, int begy, int incy, double[] A, int begA, int incAi, int incAj)
          Computes: A = alpha*x*y' + A.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmpBLAS2

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

SmpBLAS2

public SmpBLAS2(BLAS2I blas2)
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.

dgemv

public void dgemv(int m,
                  int n,
                  double alpha,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  double[] x,
                  int begx,
                  int incx,
                  double beta,
                  double[] y,
                  int begy,
                  int incy)
           throws BlasException
Computes: y = alpha*A*x + beta*y. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
dgemv in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
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'
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
beta - constant scaler
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements

dger

public void dger(int m,
                 int n,
                 double alpha,
                 double[] x,
                 int begx,
                 int incx,
                 double[] y,
                 int begy,
                 int incy,
                 double[] A,
                 int begA,
                 int incAi,
                 int incAj)
          throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
dger in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'

sgemv

public void sgemv(int m,
                  int n,
                  float alpha,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  float[] x,
                  int begx,
                  int incx,
                  float beta,
                  float[] y,
                  int begy,
                  int incy)
           throws BlasException
Computes: y = alpha*A*x + beta*y. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
sgemv in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
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'
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
beta - constant scaler
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements

sger

public void sger(int m,
                 int n,
                 float alpha,
                 float[] x,
                 int begx,
                 int incx,
                 float[] y,
                 int begy,
                 int incy,
                 float[] A,
                 int begA,
                 int incAi,
                 int incAj)
          throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
sger in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'

zgemv

public void zgemv(int m,
                  int n,
                  ComplexI alpha,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  double[] x,
                  int begx,
                  int incx,
                  ComplexI beta,
                  double[] y,
                  int begy,
                  int incy)
           throws BlasException
Computes: y = alpha*A*x + beta*y. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
zgemv in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
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'
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
beta - constant scaler
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements

zgerc

public void zgerc(int m,
                  int n,
                  ComplexI alpha,
                  double[] x,
                  int begx,
                  int incx,
                  double[] y,
                  int begy,
                  int incy,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj)
           throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
zgerc in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'

zgeru

public void zgeru(int m,
                  int n,
                  ComplexI alpha,
                  double[] x,
                  int begx,
                  int incx,
                  double[] y,
                  int begy,
                  int incy,
                  double[] A,
                  int begA,
                  int incAi,
                  int incAj)
           throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
zgeru in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'

cgemv

public void cgemv(int m,
                  int n,
                  ComplexI alpha,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj,
                  float[] x,
                  int begx,
                  int incx,
                  ComplexI beta,
                  float[] y,
                  int begy,
                  int incy)
           throws BlasException
Computes: y = alpha*A*x + beta*y. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
cgemv in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
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'
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
beta - constant scaler
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements

cgerc

public void cgerc(int m,
                  int n,
                  ComplexI alpha,
                  float[] x,
                  int begx,
                  int incx,
                  float[] y,
                  int begy,
                  int incy,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj)
           throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
cgerc in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'

cgeru

public void cgeru(int m,
                  int n,
                  ComplexI alpha,
                  float[] x,
                  int begx,
                  int incx,
                  float[] y,
                  int begy,
                  int incy,
                  float[] A,
                  int begA,
                  int incAi,
                  int incAj)
           throws BlasException
Computes: A = alpha*x*y' + A. The transpose of 'A' can be used by swapping 'incAi' and 'incAj'.
Specified by:
cgeru in interface BLAS2I
Parameters:
m - number of rows in 'A'
n - number of columns in 'A'
alpha - constant scaler
x - array containing the 'x' vector elements
begx - offset of the first 'x' vector element
incx - the distance between 'x' vector elements
y - array containing the 'y' vector elements
begy - offset of the first 'y' vector element
incy - the distance between 'y' vector elements
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'


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