--- a/LibDBlas.def
+++ b/LibDBlas.def
@@ -31,6 +31,7 @@
(* idamax : index of vector element with largest absolute value *)
(* idamin : index of vector element with smallest absolute value *)
(* dasum : sum of vector elements *)
+ (* *)
(* dgemv : matrix vector operations *)
(* dgemm : matrix matrix operations *)
(* dger : dyadic product of two vectors *)
@@ -38,11 +39,14 @@
(* complex procedures *)
(* *)
(* zswap : swap two vectors *)
+ (* zcopy : copy vectors to vector *)
(* zdotc : dot product of two vectors *)
(* dznrm2 : euklidian norm of a vector *)
(* zscal : scale vector by a constant *)
(* zaxpy : constant times a vector plus a vector *)
- (* zrotg : construct givens rotation *)
+ (* zdrot : applies a plane rotation *)
+ (* *)
+ (* zgemv : matrix matrix operations (complex) *)
(* zgemm : matrix matrix operations (complex) *)
(* *)
(*------------------------------------------------------------------------*)
@@ -58,7 +62,7 @@
(* Licence : GNU Lesser General Public License (LGPL) *)
(*------------------------------------------------------------------------*)
- (* $Id: LibDBlas.def,v 1.4 2017/10/29 09:54:50 mriedl Exp mriedl $ *)
+ (* $Id: LibDBlas.def,v 1.7 2018/09/12 13:20:49 mriedl Exp mriedl $ *)
FROM Deklera IMPORT FLOAT,CFLOAT; (* REAL & COMPLEX type *)
IMPORT LibDBlasM2; (* dgemv,dgemm,zgemm,dger *)
@@ -232,14 +236,14 @@
(* matrix A. *)
(* N must be at least zero. *)
(* Alpha : On entry, Alpha specifies the scalar alpha. *)
- (* A : DOUBLE PRECISION array of DIMENSION ( LDA, n ). *)
+ (* A : Real array of dimension ( LDA, n ). *)
(* Before entry, the leading m by n part of the array A *)
(* must contain the matrix of coefficients. *)
(* Unchanged on exit. *)
(* LDA : On entry, LDA specifies the first dimension of A as *)
(* declared in the calling (sub) program. LDA must be at *)
(* least max( 1, m ). *)
- (* X : DOUBLE PRECISION array of DIMENSION at least *)
+ (* X : Real array of dimension at least *)
(* ( 1 + ( n - 1 )*abs( IncX ) ) when Trans = 'N' or 'n' *)
(* and at least *)
(* ( 1 + ( m - 1 )*abs( IncX ) ) otherwise. *)
@@ -250,7 +254,7 @@
(* elements of X. IncX must not be zero. *)
(* Beta : On entry, Beta specifies the scalar beta. When Beta is *)
(* supplied as zero then Y need not be set on input. *)
- (* Y : DOUBLE PRECISION array of DIMENSION at least *)
+ (* Y : Real array of dimension at least *)
(* ( 1 + ( m - 1 )*abs( IncY ) ) when Trans = 'N' or 'n' *)
(* and at least *)
(* ( 1 + ( n - 1 )*abs( IncY ) ) otherwise. *)
@@ -329,7 +333,7 @@
(* matrix op( A ) and the number of rows of the matrix *)
(* op( B ). K must be at least zero. *)
(* Alpha : On entry, Alpha specifies the scalar alpha. *)
- (* A : LONGREAL array of DIMENSION ( LDA, ka ), where ka is *)
+ (* A : Real array of dimension ( LDA, ka ), where ka is *)
(* k when TransA = 'N' or 'n', and is m otherwise. *)
(* Before entry with TransA = 'N' or 'n', the leading *)
(* m by k part of the array A must contain the matrix *)
@@ -340,7 +344,7 @@
(* declared in the calling (sub) program. When TransA = *)
(* 'N' or 'n' then LDA must be at least max( 1, m ), *)
(* otherwise LDA must be at least max( 1, k ). *)
- (* B : LONGREAL array of DIMENSION ( LDB, kb ), *)
+ (* B : Real array of dimension ( LDB, kb ), *)
(* where kb is n when TransB = 'N' or 'n', and is k *)
(* otherwise. Before entry with TransB = 'N' or 'n', *)
(* the leading k by n part of the array B must *)
@@ -353,7 +357,7 @@
(* otherwise LDB must be at least max( 1, n ). *)
(* Beta : On entry, Beta specifies the scalar beta. When Beta *)
(* is supplied as zero then C need not be set on input. *)
- (* C : LONGREAL array of DIMENSION ( LDC, n ). *)
+ (* C : Real array of dimension ( LDC, n ). *)
(* Before entry, the leading m by n part of the array *)
(* C must contain the matrix C, except when beta is *)
(* zero, in which case C need not be set on entry. *)
@@ -374,7 +378,13 @@
(* -- An M2 angepasst von M. Riedl, August 1995. *)
(* *)
(* Alternative, schnellere Routinen sind in MatLib zu finden *)
- (* (MatMatProd{NN|NT|TN,TT}) *)
+ (* (MatMatProd{NN|NT|TN,TT}) wenn nicht eine "schnelle" BLAS *)
+ (* Bibiliotek (z.B. OpenBlas, ATLAS) eingebunden wird *)
+ (* *)
+ (* M : Anzahl der Zeilen der Matrix op(A) und der Matrix C *)
+ (* N : Anzahl der Spalten der Matrix op(B) und der Matrix C *)
+ (* K : Anzahl der Zeilen der Matrix op(A) und der Spalten *)
+ (* der Matrix op(B) *)
(*----------------------------------------------------------------*)
(*
@@ -422,14 +432,14 @@
(* Unchanged on exit. *)
(* IncY : On entry, IncY specifies the increment for the *)
(* elements of Y. *)
- (* A : Array of DIMENSION ( m, n ). *)
+ (* A : Array of dimension ( m, n ). *)
(* Before entry, the leading m by n part of the array A *)
(* must contain the matrix of coefficients. On exit, A *)
(* is overwritten by the updated matrix. *)
(* *)
(*--------------------------------------------------------------*)
-(*============================= complexe prozedures ========================*)
+(*============================= complexe procedures ========================*)
PROCEDURE zswap( N : CARDINAL;
VAR X : (* ARRAY OF *) CFLOAT;
@@ -439,6 +449,19 @@
(*----------------------------------------------------------------*)
(* Swap complex vectors X and Y *)
+ (*----------------------------------------------------------------*)
+
+PROCEDURE zcopy( N : INTEGER;
+ VAR X : (* ARRAY OF *) CFLOAT;
+ IncX : INTEGER;
+ VAR Y : (* ARRAY OF *) CFLOAT;
+ IncY : INTEGER);
+
+ (*----------------------------------------------------------------*)
+ (* copies a vector, x, to a vector, y. *)
+ (* uses unrolled loops for increments equal to one. *)
+ (* jack dongarra, linpack, 3/11/78. *)
+ (* MRi, Modula-2 10.04.16 | 09.09.18 (complex version) *)
(*----------------------------------------------------------------*)
PROCEDURE zdotc( N : INTEGER;
@@ -490,19 +513,95 @@
c,s : FLOAT);
(*----------------------------------------------------------------*)
- (* Applies a plane rotation. *)
+ (* Applies a plane rotation, where the cos and sin (c and s) are *)
+ (* real and the vectors cx and cy are complex. *)
+ (*----------------------------------------------------------------*)
+
+(*
+ * PROCEDURE zgemv( Trans : CHAR;
+ * M,N : INTEGER;
+ * Alpha : CFLOAT;
+ * VAR A : ARRAY OF ARRAY OF CFLOAT;
+ * lda : INTEGER;
+ * VAR X : ARRAY OF CFLOAT;
+ * IncX : INTEGER;
+ * Beta : CFLOAT;
+ * VAR Y : ARRAY OF CFLOAT;
+ * IncY : INTEGER);
+ *)
+
+CONST zgemv = LibDBlasM2.zgemv;
+
+ (*----------------------------------------------------------------*)
+ (* Performs one of the matrix-vector operations *)
+ (* *)
+ (* y = alpha*a *x + beta*y, or *)
+ (* y = alpha*a'*x + beta*y, or; *)
+ (* y = alpha*conjg(a')*x + beta*y,; *)
+ (* *)
+ (* where Alpha and Beta are scalars, X and Y are vectors *)
+ (* and A is an M by N matrix. *)
+ (* *)
+ (* parameters *)
+ (* *)
+ (* Trans : trans specifies the operation to be performed as *)
+ (* follows: *)
+ (* *)
+ (* trans = 'N' or 'n' Y = Alpha*A*X + Beta*Y *)
+ (* trans = 'T' or 't' Y = Alpha*A'*X + Beta*Y *)
+ (* trans = 'C' or 'c' Y = Alpha*conjg(A')*X + Beta*Y *)
+ (* *)
+ (* *)
+ (* M : M specifies the number of rows of the matrix A. *)
+ (* M must be at least zero. *)
+ (* N : N specifies the number of columns of the matrix A. *)
+ (* N must be at least zero. *)
+ (* Alpha : Alpha specifies the scalar Alpha *)
+ (* A : array of dimension (lda,N) *)
+ (* Before entry, the leading M by N part of the *)
+ (* array A must contain the matrix of coefficients. *)
+ (* Unchanged on exit. *)
+ (* lda : on entry, lda specifies the first dimension *)
+ (* of A as declared in the calling (sub) program. *)
+ (* lda must be at least max(1,M). *)
+ (* X : array of dimension at least (1+(n-1 )*abs(incx)) *)
+ (* when trans = 'n' or 'N' and at least *)
+ (* (1+(m-1 )*abs(incx)) otherwise. *)
+ (* Before entry, the incremented array x must contain *)
+ (* the vector X. Unchanged on exit. *)
+ (* IncX : IncX specifies the increment for the elements of *)
+ (* X. IncX must not be zero. *)
+ (* Beta : Beta specifies the scalar Beta. When Beta is *)
+ (* supplied as zero then y need not be set on input. *)
+ (* Unchanged on exit. *)
+ (* Y : array of dimension at least (1+(m-1)*abs(incy)) *)
+ (* when trans = 'N' or 'n' and at least *)
+ (* (1+(n-1 *abs(incy)) otherwise. *)
+ (* Before entry with beta non-zero, the incremented *)
+ (* array Y must contain the vector Y. On exit, Y is *)
+ (* overwritten by the updated vector Y. *)
+ (* IncY : IncY specifies the increment for the elements of *)
+ (* Y. IncY must not be zero. *)
+ (* *)
+ (* level 2 blas routine. *)
+ (* *)
+ (* -- written on 22-october-1986. *)
+ (* Jack Dongarra, Argonne National Lab. *)
+ (* Jeremy du Croz, NAG central office. *)
+ (* Sven Hammarling, NAG central office. *)
+ (* Richard Hanson, Sandia National Labs. *)
(*----------------------------------------------------------------*)
(*
* PROCEDURE zgemm( TransA,TransB : CHAR;
* M,N,K : INTEGER;
- * Alpha : LONGCOMPLEX;
- * VAR A : ARRAY OF ARRAY OF LONGCOMPLEX;
+ * Alpha : CFLOAT;
+ * VAR A : ARRAY OF ARRAY OF CFLOAT;
* LDA : INTEGER;
- * VAR B : ARRAY OF ARRAY OF LONGCOMPLEX;
+ * VAR B : ARRAY OF ARRAY OF CFLOAT;
* LDB : INTEGER;
- * Beta : LONGCOMPLEX;
- * VAR C : ARRAY OF ARRAY OF LONGCOMPLEX;
+ * Beta : CFLOAT;
+ * VAR C : ARRAY OF ARRAY OF CFLOAT;
* LDC : INTEGER);
*)
@@ -551,7 +650,7 @@
(* matrix op( A ) and the number of rows of the matrix *)
(* op( B ). K must be at least zero. *)
(* Alpha : On entry, Alpha specifies the scalar alpha. *)
- (* A : LONGCOMPLEX array of DIMENSION ( LDA, ka ), where ka *)
+ (* A : Complex array of dimension ( LDA, ka ), where ka *)
(* is k when TransA = 'N' or 'n', and is m otherwise. *)
(* Before entry with TransA = 'N' or 'n', the leading *)
(* m by k part of the array A must contain the matrix *)
@@ -562,7 +661,7 @@
(* declared in the calling (sub) program. When TransA = *)
(* 'N' or 'n' then LDA must be at least max( 1, m ), *)
(* otherwise LDA must be at least max( 1, k ). *)
- (* B : LONGCOMPLEX array of DIMENSION ( LDB, kb ), *)
+ (* B : Complex array of dimension ( LDB, kb ), *)
(* where kb is n when TransB = 'N' or 'n', and is k *)
(* otherwise. Before entry with TransB = 'N' or 'n', *)
(* the leading k by n part of the array B must *)
@@ -575,7 +674,7 @@
(* otherwise LDB must be at least max( 1, n ). *)
(* Beta : On entry, Beta specifies the scalar beta. When Beta *)
(* is supplied as zero then C need not be set on input. *)
- (* C : LONGCOMPLEX array of DIMENSION ( LDC, n ). *)
+ (* C : Complex array of dimension ( LDC, n ). *)
(* Before entry, the leading m by n part of the array *)
(* C must contain the matrix C, except when beta is *)
(* zero, in which case C need not be set on entry. *)