|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.linear.blas.SmpBLAS1
Parallel implementation of the BLAS1 for Java. 'BLAS1' operates on Java arrays and supports sub-vectors which allows it to work with both '0' and '1' based indexing. 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 to the complex methods specify the logical index of the complex element, these are multiplied by two internally to obtain the offset into the array.
DenseVector
,
RowMajorMatrix
,
ColumnMajorMatrix
,
RowArrayMatrix
,
ColumnArrayMatrix
,
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 | |
SmpBLAS1()
Construct a default underlying serial BLAS implementation. |
|
SmpBLAS1(BLAS1I blas1)
Construct an explicit underlying serial BLAS implementation. |
Method Summary | |
void |
caxpy(int n,
ComplexI alpha,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Constant times a vector plus a vector: y = y + alpha * x. |
void |
ccopy(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Copies vector x to vector y: y = x. |
Complex |
cdotc(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy,
Complex results)
Computes the dot product of two vectors: alpha = x (.) y. |
Complex |
cdotu(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy,
Complex results)
Computes the dot product of two vectors: alpha = x (.) y. |
void |
cscal(int n,
ComplexI alpha,
float[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
void |
csscal(int n,
float alpha,
float[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
void |
cswap(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Interchange two vectors: x <-> y. |
double |
dasum(int n,
double[] x,
int begx,
int incx)
Computes the sum of the absolute values. |
void |
daxpy(int n,
double alpha,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Constant times a vector plus a vector: y = y + alpha * x. |
void |
dcopy(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Copies vector x to vector y: y = x. |
double |
ddot(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Computes the dot product of two vectors: alpha = x (.) y. |
double |
dnrm2(int n,
double[] x,
int begx,
int incx)
Computes the euclidean norm of the vector: sqrt(sum(xi^2)) |
void |
drot(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy,
double cos,
double sin)
Applies a plane rotation: x = cos*x + sin*y & y = cos*y + sin*x |
void |
drotg(Real a,
Real b,
Real cos,
Real sin)
Generates the parmseters cos and sin for a plane rotation. |
void |
dscal(int n,
double alpha,
double[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
double |
dsdot(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Computes the dot product of two vectors: alpha = x (.) y. |
void |
dswap(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Interchange two vectors: x <-> y. |
double |
dzasum(int n,
double[] x,
int begx,
int incx)
Computes the sum of the absolute values. |
double |
dznrm2(int n,
double[] x,
int begx,
int incx)
Computes the euclidean norm of the vector: sqrt(sum(xi^2)) |
Smp |
getSmp()
Get the underlying Smp object. |
int |
icamax(int n,
float[] x,
int begx,
int incx)
Finds the index of the element with the maximum absolute value. |
int |
idamax(int n,
double[] x,
int begx,
int incx)
Finds the index of the element with the maximum absolute value. |
int |
isamax(int n,
float[] x,
int begx,
int incx)
Finds the index of the element with the maximum absolute value. |
int |
izamax(int n,
double[] x,
int begx,
int incx)
Finds the index of the element with the maximum absolute value. |
float |
sasum(int n,
float[] x,
int begx,
int incx)
Computes the sum of the absolute values. |
void |
saxpy(int n,
float alpha,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Constant times a vector plus a vector: y = y + alpha * x. |
float |
scasum(int n,
float[] x,
int begx,
int incx)
Computes the sum of the absolute values. |
float |
scnrm2(int n,
float[] x,
int begx,
int incx)
Computes the euclidean norm of the vector: sqrt(sum(xi^2)) |
void |
scopy(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Copies vector x to vector y: y = x. |
float |
sdot(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Computes the dot product of two vectors: alpha = x (.) y. |
float |
sdsdot(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Computes the dot product of two vectors: alpha = x (.) y. |
void |
setSmp(Smp smp)
Set the underlying Smp object. |
float |
snrm2(int n,
float[] x,
int begx,
int incx)
Computes the euclidean norm of the vector: sqrt(sum(xi^2)) |
void |
srot(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy,
float cos,
float sin)
Applies a plane rotation: x = cos*x + sin*y & y = cos*y + sin*x |
void |
srotg(Real a,
Real b,
Real cos,
Real sin)
Generates the parmseters cos and sin for a plane rotation. |
void |
sscal(int n,
float alpha,
float[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
void |
sswap(int n,
float[] x,
int begx,
int incx,
float[] y,
int begy,
int incy)
Interchange two vectors: x <-> y. |
void |
zaxpy(int n,
ComplexI alpha,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Constant times a vector plus a vector: y = y + alpha * x. |
void |
zcopy(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Copies vector x to vector y: y = x. |
Complex |
zdotc(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy,
Complex results)
Computes the dot product of two vectors: alpha = x (.) y. |
Complex |
zdotu(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy,
Complex results)
Computes the dot product of two vectors: alpha = x (.) y. |
void |
zdscal(int n,
double alpha,
double[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
void |
zscal(int n,
ComplexI alpha,
double[] x,
int begx,
int incx)
Scale a vector by a constant: x = alpha * x. |
void |
zswap(int n,
double[] x,
int begx,
int incx,
double[] y,
int begy,
int incy)
Interchange two vectors: x <-> y. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SmpBLAS1()
public SmpBLAS1(BLAS1I blas1)
Method Detail |
public Smp getSmp()
public void setSmp(Smp smp)
public double dasum(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic int idamax(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic int izamax(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic int isamax(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic int icamax(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic double dzasum(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void daxpy(int n, double alpha, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsalpha
- constant multiplier of 'x'.x
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void dcopy(int n, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void drotg(Real a, Real b, Real cos, Real sin) throws BlasException
da
- db
- cos
- cosine return valuesin
- sine return valuepublic void srotg(Real a, Real b, Real cos, Real sin) throws BlasException
da
- db
- cos
- cosine return valuesin
- sine return valuepublic double ddot(int n, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void drot(int n, double[] x, int begx, int incx, double[] y, int begy, int incy, double cos, double sin) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementsalpha
- constantbeta
- constantpublic void dscal(int n, double alpha, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void zdscal(int n, double alpha, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void dswap(int n, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic double dnrm2(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic double dznrm2(int n, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic float sasum(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic float scasum(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void saxpy(int n, float alpha, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsalpha
- constant multiplier of 'x'.x
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void scopy(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic float sdot(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic double dsdot(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic float sdsdot(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void srot(int n, float[] x, int begx, int incx, float[] y, int begy, int incy, float cos, float sin) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementsalpha
- constantbeta
- constantpublic void sscal(int n, float alpha, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void csscal(int n, float alpha, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void sswap(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic float snrm2(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic float scnrm2(int n, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void zaxpy(int n, ComplexI alpha, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsalpha
- constant multiplier of 'x'.x
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void zcopy(int n, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic Complex zdotu(int n, double[] x, int begx, int incx, double[] y, int begy, int incy, Complex results) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic Complex zdotc(int n, double[] x, int begx, int incx, double[] y, int begy, int incy, Complex results) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void zscal(int n, ComplexI alpha, double[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void zswap(int n, double[] x, int begx, int incx, double[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void caxpy(int n, ComplexI alpha, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsalpha
- constant multiplier of 'x'.x
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void ccopy(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic Complex cdotu(int n, float[] x, int begx, int incx, float[] y, int begy, int incy, Complex results) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic Complex cdotc(int n, float[] x, int begx, int incx, float[] y, int begy, int incy, Complex results) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elementspublic void cscal(int n, ComplexI alpha, float[] x, int begx, int incx) throws BlasException
n
- number of vector elementsalpha
- scale factorx
- array containing the vector elementsbegx
- offset of the first vector elementincx
- the distance between vector elementspublic void cswap(int n, float[] x, int begx, int incx, float[] y, int begy, int incy) throws BlasException
n
- number of vector elementsx
- array containing the 'x' vector elementsbegx
- offset of the first 'x' vector elementincx
- the distance between 'x' vector elementsy
- array containing the 'y' vector elementsbegy
- offset of the first 'y' vector elementincy
- the distance between 'y' vector elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |