Compare commits

...
Author SHA1 Message Date
julie 5944165ca8 Fix typo 2015-11-15 21:29:03 +00:00
julie ae707d1b00 Updating Docyfile for manpages 2015-11-15 21:07:31 +00:00
julie 87ca83c468 Missing parameter definition 2015-11-15 21:06:49 +00:00
julie 50d40d7852 Updating version number 2015-11-15 20:33:40 +00:00
langou 7d7b8483f7 adding the GETRF2 and POTRF2 from LAPACKE to CMAKE 2015-11-15 19:19:56 +00:00
langou 59640067c6 adding xGETRF2 to LAPACKE 2015-11-15 19:17:09 +00:00
langou b6d843ea0d adding xPOTRF2 to LAPACKE 2015-11-15 19:03:17 +00:00
julie a1e0db0adf adding end bracket...now looks better 2015-11-15 18:00:34 +00:00
julie 0c50bbd62a removing extra bracket 2015-11-15 17:56:10 +00:00
julie acbd283dd1 Adding potrf2 and getrf2 to CMakefile 2015-11-15 17:43:25 +00:00
langou e303516715 integration of xGETRF2 2015-11-15 17:15:57 +00:00
langou e5c236b03a integration of xPOTRF2 2015-11-15 16:49:46 +00:00
julie 39a7b4621f Add the missing CONJG ...
TESTINGS are all good now!
2015-11-15 02:50:39 +00:00
julie cdf546c3ec Adding CGESVJ/ZGESVJ and CGEJSV/ZGESVJ to the testing suite
Note: TEST 15 and 19 (xBDT01  - | A - U diag(S) VT | / ( |A| max(M,N) ulp )  are not passing the threshold
      TEST 15 and 19 are commented until we find the fix
2015-11-15 02:19:18 +00:00
julie 1401ea15bc Fix cast... 2015-11-14 06:40:57 +00:00
julie fb66eae95d Adding *esvdx and *bdsvdx to LAPACKE
*** NEED REVIEW ***
2015-11-14 06:30:55 +00:00
langou ca514d8b0f See: http://icl.utk.edu/lapack-forum/viewtopic.php?t=4830
The variables NDIV, NITER and NFAIL are INOUT.  These variables have to be
initialized (e.g., in LASQ2) before callin LASQ3.  LASQ3 increments these
counters.  These counters do not play a role in the algorithm; they just give
statistics.) Thanks to Tracey Brendan for the report.
2015-11-13 18:03:21 +00:00
julie 9711b86ef7 Adding *gesvj and *gejsv to LAPACKE 2015-11-13 07:41:33 +00:00
julie bab8132e35 Update Doxyfile... one more 2015-11-12 15:15:07 +00:00
julie 2eb3764b59 Update Doxyfile 2015-11-12 15:09:31 +00:00
julie 4d00a7d4b9 Rook with 2 o , not 3... 2015-11-11 06:28:29 +00:00
julie 5df478d1d6 Committing patch submitted by Christopher Conrad on Sept 25th 2015
From Christopher:
I noticed the following errors in the documentation and attached
patches for all of them:
- Sometimes the function name in the docstring \brief does not match the
actual function name (ex: xSYGV*).
- According to the documentation, xLAHRD is obsolete but not deprecated.
- The parameter N in xLA(R)SCL2 is not the number of columns of D.

Also, I updated the Doxyfile (doxygen -u DOCS/Doxyfile) and removed
the missing DOT_FONTNAME to get rid of the Doxygen warnings.
2015-11-11 06:20:49 +00:00
julie 9c71847ec5 Adding xlapmt to LAPACKE ( continue ) .. forgot to save the include file 2015-11-11 05:52:56 +00:00
julie 6bfabb6722 Adding xlapmt to LAPACKE 2015-11-11 05:40:19 +00:00
julie b4c44df6d0 Fix cast for lwork in complex [cz]uncsd2by1 routines 2015-11-11 05:13:21 +00:00
julie 1894619166 Incorporating DBDSVDX tests in dchkbd
Disabling temporarily some [SD]BDSVDX tests - those generate some numerical errors
See email from Osni on Nov 10th 2015
2015-11-11 03:35:02 +00:00
julie cb02a06605 Adding routines to Makefile / CMakefile.txt 2015-11-09 00:13:42 +00:00
julie 6f69800f5e Committing Zlatko Drmac Contribution 2015-11-09 00:10:27 +00:00
julie 5768f53708 First commit for Zlatko Drmac Contribution - Fixing z precisions issues + modif sent by Zlatko 2015-11-08 23:42:08 +00:00
julie b412768c7a First commit for Zlatko Drmac Contribution
Contains only source code with Doxygen format and Makefile modifications for 
CGESVJ (Jacobi SVD) with its dependencies: CGSVJ0 and CGSVJ1.

TO DO: 
  - Include Testing
  - LAPACKE interface
2015-11-08 23:24:14 +00:00
julie 79ea95e9a9 Change DBLE cast by REAL - confirmed with Osni 2015-11-06 01:16:19 +00:00
langou eedd28ee8d Thanks to Lawrence Mulholland (NAG) for reporting the problem. While the array
E should really be of size N-1, xSYCONV() is not ready for this and so, in the
comment at the header level, we now require E to be of size N. Also xSYTRS2()
is using E(N) = ZERO, so if we make E of size N-1 in xSYCONV(), then we need to
see the impact on xSYTRS2().  This is long term cleaning, so for now, we revert
back to requesting an array E of size N. Thanks Lawrence for noticing this.
2015-11-04 19:54:31 +00:00
julie 54547abdff Commit svdx files sent by Osni on Oct 31st 2015
Updated Makefile
Updated file format (Oxygen)
Small Fix: sdrvbd / cdrvbd has a lot of double / double complex in comments

From Osni:
Files for LAPACK/SRC (all new, additions to Makefile are needed):

 - dbdsvdx.f, sbdsvdx.f: full or partial (subset) SVD of a bidiagonal matrix through an associated eigenvalue problem
 - dgesvdx.f, sgesvdx.f, zgesvdx.f, cgesvdx.f: full or partial (subset) SVD of a general matrix by invoking bdsvdx

Files for LAPACK/TESTING/EIG :
- dchkbd.f, schkbd.f: added tests 20-34 for bdsvdx
- dbdt04.f, sbdt04.f (new): needed for tests 25 and 30 in chkbd
- dlahd2.f, slahd2.f: added information about tests 20-34 in chkbd
- derrbd.f, serrbd.f: added tests for the values of INFO returned by bdsvdx
- ddrvbd.f, sdrvbd.f, zdrvbd.f, cdrvbd.f: added tests 23-35 (real case) and 15-27 (complex case) for gesvdx.
- dbdt05.f, sbdt05.f, zbdt05.f, cbdt05.f (new): needed for tests 30,33 (real case) and 22,25 (complex case) for gesvdx
- derred.f, serred.f, zerred.f, cerred.f: added tests for the values of INFO returned by gesvdx


Current Issues:
 - 16 real tests do not pass the threshold ( ssvd.out) - but seems to go through in debug
 - serrbd.f has some DOUBLE PRECISION calculation inside - Is that ok or shall we change it to REAL?
Line 113-119
*     Set the variables to innocuous values.
*
      DO 20 J = 1, NMAX
         DO 10 I = 1, NMAX
            A( I, J ) = 1.D0 / DBLE( I+J )
   10    CONTINUE
   20 CONTINUE

TODO:
     - corresponding LAPACKE routines
     - Test Doxygen format
2015-11-04 06:22:56 +00:00
julie bdab3e8a69 Fix some typos.. 2015-11-04 05:34:49 +00:00
julie a3177c4b05 remove extra tabs - Thank you Matyas A Sustik 2015-11-01 16:21:47 +00:00
langou d1b995d2d3 In ?syconv, replace the variable name WORK by the variable name E. E is the
standard way to name the supdiagonal/subdiagonal of a symmetric tridiagonal
matrix.  Also, E (previously WORK) is of size N-1, not N. So correct this in
the comment.
2015-10-29 05:06:14 +00:00
langou 7947667679 The subroutine DSYCONV stores the supdiagonal of the symmetric 1-by-1 or 2-by-2
block matrix in the array WORK. (Or the subdiagonal, same array.) Before
commit, only the nonzero elements of WORK were initialized to their correct
nonzero values. The zero entries were not initialized and not referenced and
assumed to be zero in subsequent subroutines. This is fine, but I think a
better behavior for the subroutine is to initialize these zero entries to zero.
So the commit is initializing these entries to zero. 

Also a (double precision) ZERO in the D routine should have been an (integer)
0.

Also fix some formatting to have C, D, and S consistent.

Note: the indentations, comments of the Z routine is not consistent with C, D and
S. I did not have time to fix this.
2015-10-29 04:58:50 +00:00
langou b2f92b663a minor: (1) eliminate trailing spaces in comments and (2) comment indicators
along the left margin of the commented fragment, in order to show explicitly
that the fragment is a comment rather than a code between two comments.
Thanks Dmitry.
2015-10-29 04:41:20 +00:00
langou 834c77d1a4 Remove NaN check from LAPACKE_?laswp and add a comment on why the NaN check is removed.
This might not be the best fix but this will do for now. 
Current behavior: LAPACKE_?laswp does not check for NaNs.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827 for more information.
Thanks to Dmitry Baksheev from Intel.
2015-10-28 02:35:58 +00:00
julie cae67b7549 Apply Christoph Conrads Doxygen patch for xyycsd2by1.f - comment modification only 2015-10-27 14:10:26 +00:00
julie c8aff6931d Committing temporary fix for bug 113
Submitted by Osni Marques on Oct 22nd 2015
we just need to set the variable NOFAIL to .false. in _larrf.f (line 260). 
As it is now, dsyevr may enter into an infinite loop in some rare cases. 
With NOFAIL=.false. the code will return an error message.
2015-10-27 03:16:53 +00:00
julie 56a076911e Fix bug 137 and 138 submitted by Dan Kortschak
Applied patch submitted by Dan Kortschak
2015-10-22 05:29:34 +00:00
julie 6d3c6b3d71 Fix bug 139 submitted by Christoph Conrads on Oct 6th 2015
"according to the LAPACK documentation, xSTEDC guarantees to
return the eigenvalues in ascending order (parameter D on exit). To
this end, it sorts the eigenvalues if necessary.

If there is only a single subproblem of size n, no sorting algorithm is
called (cf. {s,d}tedc.f, line 450). Furthermore, xLAED0
({s,d}tedc.f:400) does not guarantee to return eigenvalues in ascending
order. Thus, xSTEDC may return eigenvalues that are not in ascending
order."

Applied patch provided by Christoph Conrads: "always sorting the eigenvalues"
2015-10-22 04:39:19 +00:00
lawrence.mulholland 2491c9367a bugs in ?GGHD3 : B,LDA-->B,LDB and zeroing of too large a submatrix 2015-10-13 12:10:47 +00:00
langou 292c6d6dc8 Quick and dirty bug fix.
Bug report and bug fix from Dan Kortschak.

See:
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4810
https://github.com/xianyi/OpenBLAS/issues/642

This is a quick bug fix, this only checks the triangular part of the trapezoid,
the rectangular part is not checked. Another commit should follow up soon.
2015-10-06 02:11:30 +00:00
julie c2959d1a5a Adding [un/or]csd2by1 routines to LAPACKE 2015-10-05 01:26:04 +00:00
julie a532e83768 Adding xlascl to LAPACKE 2015-10-05 00:04:38 +00:00
julie b1e10c2775 Updating Copyright with current year 2015-10-04 18:57:19 +00:00
julie 856c201da6 Adding xsytrf_rook, xsytrs_rook, xhetrf_rook and xhetrs_rook to LAPACKE 2015-09-25 05:15:44 +00:00
julie c406915af2 Adding xlahrd to DEPRECATED (problem reported by zerothi) 2015-09-19 19:22:02 +00:00
julie d8ca22766e Fixing comments in [sd]lasd6
Issue : Parameter IDXQ of function SLASD6 is described as [out], should be described as [in,out]. 
Reported by dbakshee from INTEL on the forum on Sep 18th 2015
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4799
2015-09-19 16:46:16 +00:00
julie 9a1c8477ad Handle Deprecated routines in LAPACKE Makefile 2015-09-16 05:12:31 +00:00
julie 4940393828 Issues and fixes submitted by Christoph Conrads on Sept 14th by email
(1st commit)

-> File modified: DOCS/Doxyfile --
- Doxygen documentation
The Doxygen "project version" is still 3.4.2. The attached patch bumps
this to 3.6.0.
-> let's be ready!
- Doxygen documentation
The Doxygen configuration file uses multiple obsolete tags and warnings
are shown right after starting Doxygen. The warnings are easy to see if
you set "QUIET = YES" in DOCS/Doxyfile.
-> set "QUIET = YES"

-> File modified: SRC/*larfgp.f
It says "non-negatibe" in the documentation of xLARFGP. 
-> Fixed typo

-> File modified: SRC/*orcsd2by1.f SRC/*uncsd2by1.f
The parameter M in the xORCSD2BY1 is not the number of columns of X and
there is no X12 (parameter P). 
-> Fixed

-> File modified: LAPACKE/src/CMakeLists.txt
The C interfaces for the deprecated GSVD routines are still built with
cmake -DBUILD_DEPRECATED=OFF. This causes a linker error with cmake
-DBUILD_TESTING=ON as soon as the Fortran functions are not found in
liblapack.so.
-> Add a if(BUILD_DEPRECATED)

-> File modified: trunk/LAPACKE/include/lapacke.h
The C declaration (lapacke.h:11840-11843) for xGGSVD3 is in a block
of #defines for LAPACK 3.2.X (see lapacke.h:12089,12122).
-> moved them down
2015-09-15 07:12:59 +00:00
julie 86393a475b Bug Fix for bug0135
Bug reported by kortschak on Sep 10th
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4793

Fix typo substituting O with 0
2015-09-10 07:11:18 +00:00
julie a61ed54a7d Fixing bug 133
Bug reported by the GONUM team member: btracey on LAPACK forum
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4771
Description:  the number of columns of A depends on the Side, so the test should compare against m or n.

Fix by Julie.
2015-09-03 06:07:59 +00:00
langou 2f2f760e62 Minor edits in the BLAS header to better describe the functionality.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4786
2015-09-03 03:05:54 +00:00
julie d8350cf73f Committing Nico's change about build system improvements for LAPACK
"One of the improvements with the patches is that SOVERSION and VERSION are now properly set and the proper symlinks are created:
```
liblapack.so -> liblapack.so.3
liblapack.so.3 -> liblapack.so.3.5.0
liblapack.so.3.5.0
```
Since BLAS is shipped with LAPACK and no separate version number is given for BLAS, I applied the same there, too."

Tested on Julie's Mac

TO DO: To test under Windows
====

Updated OSX RPATH settings
In response to CMake 3.0 generating warnings regarding policy CMP0042,
the OSX RPATH settings have been updated per recommendations found
in the CMake Wiki:
  http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
2015-09-02 05:32:19 +00:00
langou 9c1c8b90a1 A is input/output for the subroutines ?sytrs2.f 2015-08-26 04:47:36 +00:00
julie a5009ec0e0 Correcting Bug 129
See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4747

 Modify LAPACK_?syconv interface  - Work is used to return values
 
 (1) Remove the local work variable and its allocation and deallocation
 (2) Add work in LAPACK_?syconv interface 
 (3) Update lapacke.h
2015-08-26 04:46:55 +00:00
langou 6b20fd0bfc correcting bug 128
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4746

When LAPACK_NAN_CHECK is enabled, in input of xLASET, we now allow if the matrix A contains NaN. 
 
Since the goal of xLASET is to set values in A, we consider it OK if A contains NaN in input.

In other words, the rationale is that we do not consider A has an input/output. We consider A as an output only.

Note: We allow neither alpha nor beta to be a NaN.

(So we do check for NaN in alpha and in beta and return error if NaN.)

So this commit
(1) removes the NaN check on matrix A in LAPACKE wrappers: lapacke_?laset.c
(2) declares that A is OUTPUT in LAPACK subroutines: ?laset.f
(3) adds a thanks to Victor Kostin from Intel
2015-08-26 04:42:47 +00:00
julie 77a356fe35 Propagate comment added in rev 1568 to make.inc with gfortran compiler 2015-08-26 01:43:34 +00:00
igor175 10b473c210 changed variable names from LAM_MAX to SING_MAX and from LAM_MIN to SING_MIN to reflect the chnage in the algorithm for TEST4 for rook pivotig routines, since we now use singular values instead of eigenvalues in TEST4 to compute the norm for 2-by-2 marices in TEST 4. Also corrected the bug in for Hermitian case in TEST4, where during the constraction of Hermitian 2-by-2 matrices the operation of complex conjugation was missing. Changes made to: cchkhe_rook.f cchksy_rook.f dchksy_rook.f schksy_rook.f zchkhe_rook.f zchksy_rook.f 2015-08-19 21:17:27 +00:00
philippe.theveny 49b7de3e36 Moved deprecated SGVD routines into DEPRECATED directory.
Added a BUILD_DEPRECATED option for make and cmake, which build
deprecated routines into the LAPACK library (OFF by default).
This completes r1563.

TODO: document the BUILD_DEPRECATED option (i.e. update documentation).
2015-08-17 22:58:57 +00:00
philippe.theveny 321ab61ac2 Removed unused and obsolete statement functions. 2015-08-17 21:37:47 +00:00
philippe.theveny ad584bfedd Added LAPACKE wrappers for GSVD (complements r1572). 2015-08-17 21:17:37 +00:00
philippe.theveny de7f36e7f9 Added BLAS3 routines for generalised SVD.
TODO: LAPACKE wrappers.
2015-08-14 22:54:14 +00:00
igor175 06f432d14d Fixed BUG number 123, that is testing of 'rook' routines, specifically TEST 4 for UPLO='U' case that test bounds of block diagonal matrices. TEST 4 wasfailing for UPLO='U', since 2-by-2 was passed incorrectly to the -EVX routine. Also, during the fix the TEST 4 for both UPLO='U' and 'L' was modified. Instead of computing the ratio of eigenvalues for 2-by-2 matrices, using the -EVX routines, now we compute the ratio of singular values using *GESVD routines. Affected test routines: TESTING/LIN/schksy_rook.f TESTING/LIN/dchksy_rook.f TESTING/LIN/cchksy_rook.f TESTING/LIN/zchksy_rook.f TESTING/LIN/cchkhe_rook.f TESTING/LIN/zchkhe_rook.f 2015-08-11 22:27:27 +00:00
philippe.theveny 882ff1a5d2 Removed declaration of unused variables. 2015-08-11 21:52:11 +00:00
philippe.theveny 8caa8ba4f9 Replaced archaic intrinsics AMIN1, DMIN1, MIN0, AMAX1, DMAX1, MAX0 by MIN/MAX. 2015-08-11 20:44:38 +00:00
langou c9d8be454d adding a comment in make.inc.example saying the following:
#
#  Note: During a regular execution, LAPACK might create NaN and Inf
#  and handle these quantities appropriately. As a consequence, one 
#  should not compile LAPACK with flags such as -ffpe-trap=overflow.
#

Julien.
2015-08-11 16:59:56 +00:00
philippe.theveny 9756c9b1fd Fix bugs reported by Vitorrio Zecca on August 10, 2015. 2015-08-11 16:23:45 +00:00
philippe.theveny 300e756574 Fix bug reported by Vittorio Zecca. 2015-08-11 16:03:54 +00:00
philippe.theveny adba39b8df Bux fix from Rodney James about implicit typing.
Some variables were undeclared, some were mistyped, and others were unused.
2015-08-10 17:33:47 +00:00
philippe.theveny 7b9b17997e Move all but one deprecated routines to a new separate directory.
They are compiled and included in the liblapack.a archive when
the MAKEDEPRECATED option in the make.inc file is set.

TODO: Add the corresponding behavior to the cmake files.

NOTE: The xGEQPF routines are deprecated but still used by some
non-deprecated routines. They have not been moved to the DEPRECATED
directory.
2015-08-06 23:01:56 +00:00
philippe.theveny e12970ddbe Remove deprecated xGEQPF from the test suite.
WARNING: xGEQPF is still used in xGGSVP routines.
2015-08-06 20:57:14 +00:00
philippe.theveny f6dc581dc6 Remove all but one deprecated routines from the test suite.
NOTE: The tests are renumbered in xDRVLS and xCHKTZ.
TODO: remove deprecated xGEQPF, when it is replaced by xGEQP3 in xGGSVP.
2015-08-06 17:56:35 +00:00
langou fcfe82e566 missing EXTERNAL 2015-08-05 21:24:32 +00:00
julie 8e26f833b8 Commit bug reported by Alexander Kobotov (INTEL) on LAPACK Forum
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4762&p=11439#p11439

Recent commit r1533 introduced out of bound access which could lead to a crash.
It results scaling of a vector instead of a single number.
Fix is simple:

zhgeqz.f:669
- CALL ZSCAL( ILAST, SIGNBC, H( ILAST, ILAST ), 1 )
+ CALL ZSCAL( 1, SIGNBC, H( ILAST, ILAST ), 1 )

Similar for chgeqz on line 668
2015-07-18 23:53:25 +00:00
langou a002ad4689 Revert commit 1474: files ?lansy.f are back as they were in revision 1473. 2015-06-30 10:27:18 +00:00
langou ddac61b7d5 (minor) Consistency of comments between the four precisions. 2015-06-25 13:20:58 +00:00
julie ba17d2ef0e Adding error test to each element of S must be positive. - Thank you Elena (Oracle) 2015-06-25 06:00:59 +00:00
julie c58276f126 Finish removing unnecessary code - TMP = DBLE(M) - see 1547 - Thank you Elena 2015-06-25 05:09:58 +00:00
langou 78d4e1705e Fix [CDSZ]QRT17.
This is a routine to test DGELS which solves solves full rank overdetermined ( linear least squares ) or underdetermined (minimum norm) linear systems.

The check is, as follows,

(1) If the system is consistent, (smallresidual,) we check that 
|| A^T ( b – A * x ) || / (||A||*||b||*max(M,N,NRHS)*eps)
is small (say less than 30).

(2) If the system is not consistent, (large residual,) we check that 
|| A^T ( b – A * x ) || / (||A||*|| b - A*x ||*max(M,N,NRHS)*eps)
is small (say less than 30).

DQRT17 was checking in the not consistent case (large residual) that
|| A^T ( b – A * x ) || / (||A||*||x||*max(M,N,NRHS)*eps)
is small. It is a mistake and we need to change the ||x|| by a ||r||. 

This fix is consistent with what the documentation says and makes more sense.
2015-06-22 14:04:46 +00:00
langou b5dddc3009 Typo in the comments of [S,C,D,Z]LATM1.
The matrix D needs to be of size N.
2015-06-19 02:59:06 +00:00
langou c1eeefa972 These are two fixes in [S,C,D,Z]-LAGGE.
(1) The routine was writing ZEROs out of bound in some specific cases. This is
corrected. Thanks to Yi Meng (CU Denver) for finding the bug.

(2) Quick exit when KL=KU=0 in this case, the user wants a diagonal matrix,
there is probably no reason to call this routine if one simply wants a diagonal
matrix, but that said we still ought to return a correct answer. A quick exit
makes the trick. The routine was not working otherwise.
2015-06-19 02:56:27 +00:00
langou 73854f7f69 bug in [c,d,s,z]get02.f when calling the norm computation for A 2015-06-17 14:44:54 +00:00
langou e3c6598e1a typos 2015-06-16 14:34:40 +00:00
langou 2ca49cb43d typos in these testing functions 2015-06-15 15:30:10 +00:00
langou 6f1cef6f81 IDIST is an INTEGER, change the comment 2015-06-10 21:41:42 +00:00
langou 5277dad956 remove the COMPLEX*16 TMP from DLAHILB
this has nothing to do here, probably a bad copy-paste from Z to D
2015-06-10 17:30:19 +00:00
langou 81a0ecfe83 typos in the comment 2015-06-08 14:31:13 +00:00
philippe.theveny 34420f19e3 This partially fixes bug 061 reported by Victor Liu.
Some compilers allocate local arrays on the heap when their size is
above a particular threshold.
This leads to wrong results when multiple threads call the same routine.

The bug fix consists in using a larger workspace, as proposed by Victor Liu
(Tue Nov 13, 2012).
Some routines still have large local arrays and cannot be fixed that way
because they have no workspace parameter: xGBTRF, xBPTRF, and xHSEQR.
2015-05-14 18:50:57 +00:00
julie 6eff56f7e1 Applying patch provided by Julien Schueller (Phimeca) on March 20th 2015 via Lapack mailing list to fix some warnings 2015-05-06 04:54:45 +00:00
julie 35d0023dd7 Update version number and release date on rook routines - those routines were part of the 3.5.0 release - reported by Elena (Oracle) 2015-05-06 04:44:20 +00:00
julie 1bbb1e4c6f Correct typo in variable name - reported by Elena (Oracle) 2015-05-06 04:30:24 +00:00
julie 1dcb80f8b8 Propagate fix to bug111 to lapacke - minimum work space - Issue reported by Andrew James on LAPACK mailing list on April 30th 2015 2015-05-06 04:21:45 +00:00
langou c20d8cceca Bug fix from Osni Marques, Beresford Parlett and Jim Demmel.
This fixes bugs 032 and 056.
Edits in cstein.f, dstein.f, sstein.f and zstein.f

From Osni on Monday, May 4: 

As we discussed in our last conference call, I am attaching a new version of
_STEIN, which fixes bugs 032 and 056.  (The bugs were reported for DSTEIN, but
I have propagated the fix to the other versions.) Also, in the process of
testing the fix for those two bugs with more difficult cases, we stumbled upon
a matrix that led SSTEIN to return NaNs in the eigenvectors ... We fixed that
too and, in summary, these are the changes in _STEIN:

1) The assignment after the GO TO 60 needs to be GPIND = J1 (instead of GPIND =
B1).

2) In 'Normalize and scale the righthand side vector Pb' (after GO TO 100 or GO
TO 120) we have replaced _ASUM with I_AMAX.
2015-05-05 01:00:18 +00:00
julie c2bb35e025 Correct info testing for SYSVXX routines
in ?SYSVXX
 INFO = -10 needs to be changed to INFO = -11 
The code in this section of the files is about to check and make sure all S 
elements are positive. And S is argument 11 not 10. 

in ?ERRVXX
 Add info testing for input parameter 10 and 11
2015-04-23 03:25:41 +00:00
julie fe1d6223ca Problem reported by Elena (Oracle)
Some arguments return the wrong Info number 
For example LDX is not the 14th argument, but 15th.

Correct corresponding testing routines
2015-04-01 14:56:02 +00:00
langou 8d99316e83 **** Correct bug 125 ****
Change the maximum number of QR iterations (ITMAX) for xLAHQR from ITMAX=30 to
ITMAX = 30 * MAX( 10, NH ).

Bug reported by Yoshihide Okimi on July 16, 2014
https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4566
and, independently, by Marco Caliari (Università di Verona) on February 11,
2015.

Involved in bug fix: Yoshihide Okimi, Marco Caliari (Università di Verona),
Meiyue Shao (LBL), Julien Langou, and Daniel Kressner (EPFL).

** Bug **

xLAHQR v3.5 does not converge on some matrices while xLAHQR v2 converges

** Note **

xLAHQR v2 is available through ARPACK so xLAHQR v2 is still in "wide" use

** Description **

xLAQR0 v3.5 and xLAQR4 v3.5 have ITMAX set to:
    ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) ) 

xLAHQR v2 has ITMAX set to:
    ITMAX = 30 * NH

xLAHQR v3.5 has ITMAX set to:
    ITMAX = 30

Yoshihide Okimi reports that, in his application, (1) xLAHQR v3.5 does not
converge, (2) xLAHQR v2 converges, (3) changing ITMAX to 30*NH in xLAHQR v3.5
enables convergence.

Marco Caliari reports that, in his application, using xLAHQR v2.0 converges,
while xLAHQR v3.5 does not converge.

** Bug fix **

Set ITMAX in xLAHQR to
    ITMAX = 30 * MAX( 10, NH ) 

Email from Meiyue: I feel that setting ITMAX proportional to NH makes sense.
Perhaps we can change ITMAX to ITMAX*MAX( 10, NH ) so that it is also safe for
ill-conditioned tiny matrices.
2015-03-25 22:45:19 +00:00
langou 0255f6d7bf **** Fix bug 124 ****
**** (I also fixed the documentation of the six subroutines ****

Bug reported by Victor_K on the forum.

See forum http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4643

Bug fix by Julien Langou. Involved as well Nick Higham, Sven Hammarling and Craig Lucas.

** Bug **

xPSTF2 and xPSTRF returns NaNs when the matrix in input has N negative diagonal entries. 

** Note **

A matrix with N negative diagonal entries is a highly non valid input, but, yet no reason to create some NaNs, better to have a cleaner solution.

** Description **

xPSTF2 and xPSTRF first scan the diagonal of the matrix to find the greatest element on the diagonal. 

During this pass on the diagonal, xPSTF2/xPSTRF checks as well for ZERO or NAN on the diagonal and aborts if it finds a ZERO or a NAN on the diagonal. 

*
*     Compute stopping value
*
      PVT = 1
      AJJ = A( PVT, PVT )
      DO I = 2, N
         IF( A( I, I ).GT.AJJ ) THEN
            PVT = I
            AJJ = A( PVT, PVT )
         END IF
      END DO
      IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN
         RANK = 0
         INFO = 1
         GO TO 170
      END IF

Since the input matrix is filled with a negative diagonal (and no ZERO and no NAN), xPSTF2/xPSTRF finds a maximum element (which is the largest negative elements on the diagonal), and then this (negative) element is used to compute DSTOP, the stopping value. But then we get a negative DSTOP,

      IF( TOL.LT.ZERO ) THEN
         DSTOP = N * DLAMCH( 'Epsilon' ) * AJJ
      ELSE
         DSTOP = TOL
      END IF

and then I stop even thinking on what would happen next. It seems that the code continues and does produce NAN in the first column. Why not. But I think we should catch this case and try to handle it in a different way. Maybe.

** Bug fix **

Replace
      IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN
With
      IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
So that if there is any nonpositive element or any NAN on the diagonal of A, we return right away with RANK=0 and INFO=1.

** Email from Nick Higham **

[ Julien wrote ] So that if there is any nonpositive element or any NAN on the diagonal of A, we return right away with RANK=0 and INFO=1?

[ Nick wrote ]

I think so.
This is justified by the documentation, which says

   INFO is INTEGER
   If INFO = -K, the K-th argument had an illegal value,
   = 0: algorithm completed successfully, and
   > 0: the matrix A is either rank deficient with computed rank
   as returned in RANK, or is indefinite.

We are in the indefinite case if any diagonal element is negative.
Actually, that is not quite true: we are in the "not positive definite"
case.  We can only say "indefinite" if there are both positive *and* negative
diagonal entries!  However, if that is going to be said then it would be
necessary to check that all other LAPACK routines are similarly precise in
their wording, so it's simplest, and not too misleading,
to stay with "indefinite".
2015-03-25 17:28:33 +00:00
julie 7819b90287 Correcting Bug111 reported by Kevin Squire on LAPACK Mailing - August 15th 2013
From Kevin: We were following the recommendation for RWORK size calculation from 
the ZGESDD header here ( http://netlib.org/lapack/complex16/zgesdd.f), and were 
finding that when INFO=N, the size was insufficient, and generally led to a segmentation fault.

The current definition says that "If JOBZ = N, LRWORK >= 5*min(M,N)", but we found 
that the minimum size needed to be at least 7*min(M,N). This was through experimentation
 and comparison with code from Numpy and Octave, so you may wish to verify this through the code.

JL: bug confirmed and reproduced - correction in comments
If JOBZ = N, LRWORK >= 7*min(M,N)
2015-03-18 05:09:27 +00:00
julie 52508f6632 Correct issue reported by Elena (Oracle)
Add SIGMA and EPS in a list of arguments and describe them in the "Arguments" section
2015-03-17 14:53:16 +00:00
julie 6e0f116827 Correction reported by Elena (Oracle)
LAPACK 3.5.0 [cz]hgeqz.f compute eigenvalues differently depending on whether 
eigenvectors are requested or not. Since the computation is different, eigenvalues 
are not bit-by-bit identical whether eigenvectors are requested or not. 

This fix enables to have [cz]hgeqz.f behaving more of the same whether eigenvectors 
are requested or not. 

Note: The fact that eigenvalues are bit-by-bit identical whether eigenvectors are 
requested or not is checked in the LAPACK test suite.
2015-03-06 04:31:28 +00:00
langou c1040414e3 Correct two ". GT." to " .GT.". Bug reported by email ny Willem Vermin "Minor
issue in dorbdb.f and sorbdb.f" on Friday, February 27, 2015 at 4:03 AM.
2015-03-02 16:04:35 +00:00
philippe.theveny 409a29e546 Fix wrong update when the right Schur vector is not computed. 2015-02-25 23:40:47 +00:00
julie ba12bdc7bc Add back cggglm to Makefile...build goes fine 2015-02-25 03:55:26 +00:00
philippe.theveny 6273f536d1 Add xGGHD3: blocked Hessenberg reduction, code from Daniel Kressner.
Add xGGES3 and xGGEV3: computation of the Schur form, the Schur vectors, and
   the generalized eigenvalues using the blocked Hessenberg reduction.
2015-02-24 23:50:54 +00:00
philippe.theveny c95be035b7 Fix typo in comments. 2015-02-24 19:26:59 +00:00
philippe.theveny 93e3e82694 Fix typo in comments. 2015-02-23 18:06:06 +00:00
philippe.theveny d2fd43b59a Fix typo. 2015-02-06 20:42:31 +00:00
philippe.theveny 2cbabfbc38 Systematically return with INFO=1 when the root finder failed.
This corresponds to the documentation of [d/s]lasdx routines and fixes bug121
reported Justin Si.
2015-02-06 20:31:47 +00:00
julie ec7a8aeaa1 Ed Anderson Bug Fix - Jan 26 2015
related to 1522 
Correct call to [SD]chkhs to add new arguments.
2015-01-30 20:03:11 +00:00
julie 024f629981 Ed Anderson Improvement - Jan 26 2015
STGEX2 can call Level 3 BLAS and I did this in LAPACK3E.  
I replaced STGEX2 with the LAPACK3E version (when I say STGEX2, I mean DTGEX2 too) 
and also fixed an incorrect leading dimension in DTGEX2.
2015-01-30 19:50:52 +00:00
julie c6bcd83265 Ed Anderson Bug Fix - Jan 26 2015
Also in TESTING/EIG, I fixed two bugs in s/d chkhs; the diff of schkhs is:
790c790
<             CALL SLACPY( ' ', N, N, U, LDU, UZ, LDU )
---
>             CALL SLACPY( ' ', N, N, U, LDU, UZ, LDA )
831c831
<      $                 ABS( WI1( J )-WI3( J ) ) )
---
>      $                 ABS( WR1( J )-WR3( J ) ) )
In further testing, I was able to produce a test case where Test 8 fails comparing
the eigenvalues from xHSEQR(‘E’,’N’) with the eigenvalues from xHSEQR(‘S’,’V’).
The eigenvalues were the same, but in a different order.  It appears that xHSEQR
does some rearrangement of the Schur matrix and so we should not expect the
eigenvalues to be in the same order, although I am trying to confirm this 
with the authors.  In the meantime, I have modified xCHKEE and xCHKHS to 
compute the eigenvalues from xHSEQR(‘S’,’N’) in a separate array W2 (or 
WR2 and WI2) so that test 8 can compare the eigenvalues from xHSEQR(‘S’,’N’) 
with the eigenvalues from xHSEQR(‘S’,’V’).
2015-01-30 19:24:26 +00:00
julie b1ebc7d44e Ed Anderson Bug Fix - Jan 26 2015
In TESTING/LIN/schkrq.f and schklq.f (only those, not the other precisions), the loop to look for test failures runs from 1 to NTESTS, it should be 1 to NT.
2015-01-30 07:29:56 +00:00
julie 9e3dc66dba Ed Anderson Bug Fix - Jan 26 2015
In TESTING/LIN, the test routines xchkqr kept track of the number of tests performed in the variable NT, which could be 2, 6, or 7.  Recently another test was added at the end and the loop that checks for failing tests was changed to run from 1 to NT to 1 to NTESTS, including tests that were never performed.  As a result, with THRESH = 0., the number of tests failing exceeds the number of tests performed (for example, with n = 1 as the only N value and THRESH = 0.0 you get “604 out of 514 tests failed to pass the threshold”.)  The right way to fix this would be to renumber the tests so that the new test is test #3 and the loop can run from 1 to NT again, but I just changed the count of tests performed from NT to NTESTS.  For consistency between schkqr and schkrq and other test routines in the QR family, it would have been better for the new tests to go in a separate test module.
2015-01-30 07:26:22 +00:00
julie 93ccfe64e2 Ed Anderson Bug Fix - Jan 26 2015 - I fixed an old bug in the count of the number of tests in xdrvge and xdrvgb 2015-01-30 07:22:01 +00:00
julie 83fc0b48af Applied Jakub's CBLAS patch sent on Jan 9th
Netlib CBLAS can be put on top of BLAS with 64-bit integers.
It can be accomplished using the flag "WeirdNEC" :)
It basically redefines int to long, but at the same time, it had multiple bugs.
2015-01-10 05:57:14 +00:00
langou 6d9b1a2737 Apply patch from Pavel Holoborodko.
See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4624

Please thanks to
  Pavel Holoborodko. Multiprecision Computing Toolbox for MATLAB. Advanpix LLC.   
Below is a copy-paste from Pavel's post on the forum.

ZLARFT:
ZGEMM is not listed in EXTERNAL section (but extensively used in the code). 

DLADIV:
This file has three different routines - DLADIV, DLADIV1, DLADIV2. 

DLADIV2 has "if" in lower case:
         if( BR.NE.ZERO ) THEN


DGGBAL/BAK, ZGGBAL/BAK:
There are few places in these routines where DOUBLE PRECISION variables are implicitly converted to INTEGER. 

For example:

         IR = LSCALE( I ) + SIGN( HALF, LSCALE( I ) )

         JC=RSCALE(I)+SIGN(HALF,RSCALE(I))

         K=RSCALE(I)

         K=LSCALE(I)


R/LSCALE(I) is double precision, IR, JC and K are integers.  For the sake of
correct semantic and F77 rules we have to use INT to show conversion
explicitly.  Also this would make conversion to other languages much easier.
Interestingly, only those routines are missing the INT.
2014-12-01 05:07:52 +00:00
julie ea25fc2944 Fix typo reported by Elena (Oracle) 2014-11-15 05:06:16 +00:00
julie 9d195d0eaf Bug Fix form Elena (Oracle) - Correct test of error exits 2014-11-15 05:01:47 +00:00
julie d31967742f Bux fix from elena Ivanova (Oracle) Rearrange If statements for not overwriting info value 2014-11-15 04:52:36 +00:00
julie 7a433c1db3 Change INFO value when testing N - N is first parameter - INFO should be -1 - bug reported by Elena Ivanova (oracle) 2014-10-31 15:51:06 +00:00
julie 3098c5b7ff Set default value for INFO - bug reported by Elena Ivanova (oracle) and David Hough 2014-10-31 15:48:04 +00:00
julie cfb6f61cfc Comment Fix from Jim: Update of Purpose section of Jacobi SVD about accuracy 2014-10-20 16:31:31 +00:00
julie c1360f3808 Comment fix from Jim: argument A in xsyconv.f should be in,out 2014-10-20 16:23:51 +00:00
julie d2c47b642d From Jim: Routine description improvement - Adding guarantees that each R(i,i) >= 0 in comment and reference to lawn 203 in Furhter details section 2014-10-17 16:46:43 +00:00
julie ab19fb88cf correct typo while editing Makefile with VI 2014-10-09 01:12:17 +00:00
julie 8d160e5f96 Fixing folder uppercase / lower case issue - Thank you Don 2014-10-08 18:40:57 +00:00
julie f04a5811b7 Commit fix from Osni Marquez for Bug 115 reported from Duncan Po (Mathworks)
Description of bug http://icl.utk.edu/lapack-forum/viewtopic.php?f=13&t=4391,
It turns out to be related to bug http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=5&t=4498 as well. Further, I suspect that the problem reported in an e-mail sent by Justin Weiguang Si to lapack@cs.utk.edu on Sep 22 is also related to those, although Justin has not yet replied to my request for the offending matrix...

The bug has been traced to [d/s]laed6, which computes the root closest to the origin of a secular equation and is used in the D&C tridiagonal eigensolver (DSTEDC) and D&C least squares solver (DGELSD). We have interacted with Ren-Cang Li (the original developer of [d/s]laed6) about possible fixes, and I am attaching a new version of [d/s]laed6. This version has been tested with our 'torture cases' (more on this below) in:

- single and double precision
- Intel Xeon Westmere with gnu (gfortran) and intel (ifort) compilers
- AMD MagnyCours with pgi, cray, intel and gnu compilers

The bug was related to a too stringent tolerance convergence criterion, line 390 in laed6. The fix is

390          IF( ( ABS( F ).LE.FOUR*EPS*ERRETM ) .OR.
391      $      ( (UBD-LBD).LE.FOUR*EPS*ABS(TAU) )  )

to replace

390          IF( ABS( F ).LE.EPS*ERRETM )

corrected bugs: 115 and 121
2014-10-07 04:21:49 +00:00
julie bbe0f64dbb Fix problem in Info return value when checking input parameter
Definition of xLAED7( ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q, [ etc..] 

QSIZ is the third argument, not the fourth

       ELSE IF( ICOMPQ.EQ.1 .AND. QSIZ.LT.N ) THEN
-         INFO = -4
+         INFO = -3


Bug reported by Elena Ivanova (Oracle) directly to Julie on Oct 2nd 2014
Bug labelled as Bug122
2014-10-07 04:13:57 +00:00
julie b41b7aa472 Correction to bug120
Fix workspace definition in comment following bug report from Rasmus Munk Larsen, Google Knowledge & Research
See forum https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4587

See revision 1349, and 649 for history
2014-09-22 15:38:39 +00:00
langou 5684d01e6f Typos in the comments of [s/d]tpmqrt.f reported by Andreas Noack Jensen on Sept. 15 2014.
See LAPACK forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4583
2014-09-16 03:51:58 +00:00
julie 13d22f234d Clean CMAKE build for includes 2014-08-23 01:53:37 +00:00
julie cd88b0b21d Update make.inc's following the integration of CBLAS 2014-08-23 01:31:15 +00:00
julie 29788da147 Commit to integrate CMAKE and MAKEFILE build system for CBLAS
Also modify the way the CBLAS mangling was generated...now CBLAS follows LAPACKE model

Details on MAKEFILE build
  To compile CBLAS library from the LAPACK folder:
    - make cblaslib --> create the cblas lib
    - make cblas_testing --> compile BLAS Ref if necessary, build exe, then run exe

Details on CMAKE build
  Now you have an option to select CBLAS
  If CBLAS is check the Library is built and if BUILD_TESTING is enable, test and example are built and run
 

following
-->  modification of all make.inc
-->  more clean up
-->  debugging on other platforms

** PLEASE TRY and SEND FEEDBACK - Thanks - Julie **
2014-08-23 01:21:57 +00:00
julie 91d9461d1a 2014-08-15 20:14:26 +00:00
langou a00738d270 See post on the forum from Pauli Virtanen.
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4560

Documentation of xSTEVR says that VL and VU are not referenced if RANGE = 'A'
or 'I', however the code does reference VL and VU for any value of RANGE:

      VLL = VL
      VUU = VU

So simply protect these two lines of code:

      IF( VALEIG ) THEN
         VLL = VL
         VUU = VU
      END IF

Julien.
2014-07-12 20:30:57 +00:00
langou 2b911746d5 Edited the code of xGBMV, xGEMV and xGEMM by removing the test for an entry of
B (or X) being zero to skip a loop so as to enable better NaN (or Inf)
propagation.

Taking DGEMM as an example, if you use notation: 
	C(I,J) = C(I,J) + alpha * A(I,L) * B(L,J), 
the reference BLAS DGEMM is using the JLI version of matrix matrix multiply and
is checking, for each J (from 1 to N) and for each L (from 1 to K), whether
B(L,J) is zero (or not) to save (or not) the 2M following operations.

(See the "IF (B(L,J).NE.ZERO) THEN" in the code below.)

The snippets of code is as follows

              DO 90 J = 1,N
                  DO 80 L = 1,K
                      IF (B(L,J).NE.ZERO) THEN
                          TEMP = ALPHA*B(L,J)
                          DO 70 I = 1,M
                              C(I,J) = C(I,J) + TEMP*A(I,L)
   70                     CONTINUE
                      END IF
   80             CONTINUE
   90         CONTINUE

This induces some non NaN-propagation in a pretty ad-hoc way. For better NaN
propagation, this patch removes the above IF statement.

The snippet of code now becomes

              DO 90 J = 1,N
                  DO 80 L = 1,K
                      TEMP = ALPHA*B(L,J)
                      DO 70 I = 1,M
                          C(I,J) = C(I,J) + TEMP*A(I,L)
   70                 CONTINUE
   80             CONTINUE
   90         CONTINUE

This enables correct NaN propagation for this piece of code.

Rationale: BLAS does not correctly propagate all NaNs (and Infs). We still have
no NaN propagation where for example ALPHA=0, etc. The goal of this commit is
to have correct NaN propagation no matter what the entries of the input
matrices/vectors (A, B, C, X, etc.) are.  BLAS do not correctly propagate NaNs
and Infs based on some values of the scalars (ALPHA, BETA, etc.).

See below the email from Tom Callaway from RedHat, sent on July 9th to
lapack@cs.utk.edu.

Hello LAPACK people,

Martyn & Lejeczek (on CC) reported an issue to Fedora relating to R using our
system copy of BLAS (from LAPACK).

As noted in the R administration and Installation Manual, "R relies on ISO/IEC
60559 compliance of an external BLAS. This can be broken if for example the
code assumes that terms with a zero factor are always zero and do not need to
be computed - whereas x*0 can be NaN. This is checked in the test suite."

In the stock BLAS, DGBMV, DGEMM, and DGEMV fail this. R has been patching their
bundled BLAS to resolve this issue since 2010, but Fedora now uses the system
BLAS.

Attached is a patch (from upstream R) to fix this issue in the LAPACK BLAS.
Please consider applying it.

Thanks,

~tom
2014-07-12 19:58:39 +00:00
julie 986c48f631 fix lapack_testing.py for windows platforms - Fix provided by amran.illoul@ensam.eu on July 9th 2014-07-09 16:43:58 +00:00
langou 93617f591f Bug in comments on array size reported by a Sergey Kuznetsov from Intel.
The size of array RWORK in {c,z}dbsqr was given incorrectly.

Previous version for cbdsqr.f read
          RWORK is REAL array, dimension (2*N)
          if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise

Now reads
          RWORK is REAL array, dimension (4*N)
2014-06-27 11:46:34 +00:00
langou c911488e78 bug found by Themos Tsikas fron NAG Ltd
LAPACK FORUM topic #4558

Hello

In zlanhf.f, first executable statements
Code: Select all
      IF( N.EQ.0 ) THEN
         ZLANHF = ZERO
         RETURN
      ELSE IF( N.EQ.1 ) THEN
         ZLANHF = ABS(A(0))
         RETURN
      END IF

When N=1, we should be ignoring any imaginary part (as we do for general diagonal elements later on) and so it should read
Code: Select all
      IF( N.EQ.0 ) THEN
         ZLANHF = ZERO
         RETURN
      ELSE IF( N.EQ.1 ) THEN
         ZLANHF = ABS(DBLE(A(0)))
         RETURN
      END IF


Themos Tsikas
NAG Ltd
2014-06-16 12:16:58 +00:00
julie 54a506304c Applied patch provided from vitaut on LAPACK forum on June 13th.
The patch fixes the warnings (Policy CMP0026) by replacing the deprecated LOCATION target
property with the generator expression $<TARGET_FILE>

See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4556&p=10939#p10939
2014-06-14 17:04:05 +00:00
julie b42e9d5b6f Update version number in CMAKE - Thanks Allan Wollaber for the bug report (April 15th 2014) 2014-04-15 20:19:45 +00:00
julie ed799d9ba7 Update version number in CMAKE - Thanks Allan Wollaber for the bug report (April 15th 2014) 2014-04-15 20:18:55 +00:00
julie 8b21bd980b Adding missing routine in repository 2014-04-07 15:40:04 +00:00
julie 5adbeddfd6 Corrected minor bug submitted by Elena Ivanova, Oracle on March 18th 2014.
From Elena:
there is a minor bug in /LIN/dchkql.f:
Array IWORK  (a parameter of this routine) is not used at all.
It would be better to remove IWORK from the list of parameters,
remove its declaration and description in the code of /LIN/dchkql.f:

Note: only dchkql had that IWORK parameter, [c,s,z]chkql don't have it.
2014-03-19 01:15:50 +00:00
julie b611932199 Fix typos found by Jeremy Du Croz 2014-02-20 15:58:23 +00:00
julie a9ffa9a181 INTEGRATED CHANGES PROVIDED BY INTEL TEAM FOR LAPACKE -- SEE Eugene Chereshnev email on Feb 18th
--> THANK YO INTEL <--


We performed auto-replacement matrix_order -> matrix_layout in the LAPACKE C Interface.
Also we applied several bug fixes which were presented on our side and added two LAPACKE interfaces for
function LAPACK_stpqrt which weren't represented on your side (although interfaces for d/c/z/pqrt were).
 
All changes are reflected in the archive in attachment (only modified files in the archive). All changes were performed for revision 1471.
 
 
Summary of changes:
1.  Files:
    lapacke_stprfb.c
    lapacke_dtprfb.c
    lapacke_ctprfb.c
    lapacke_ztprfb.c
   
    lapacke_stprfb_work.c
    lapacke_dtprfb_work.c
    lapacke_ctprfb_work.c
    lapacke_ztprfb_work.c
    lapacke.h
 
    Expression MAX(1,ldwork)*MAX(n,k) was replaced by 'work_size'. It's not a bug but apparently 'work_size' is right expression in this place.
    Also in functions lapacke_(c/z)tprfb type of 'work' array was changed from float/double to
    lapack_complex_float/lapack_complex_double. Array 'work' is passed to lapacke_(c/z)tprfb_work and it calls
    LAPACK_(c/z)tprfb (and passes array 'work') but LAPACK_(c/z)tprfb has argument 'work' of complex type:
    SRC/ctprfb.f:
    *>          WORK is COMPLEX array, dimension
    *>          (LDWORK,N) if SIDE = 'L',
    *>          (LDWORK,K) if SIDE = 'R'.
    and SRC/ztprfb.f:
    *>          WORK is COMPLEX*16 array, dimension
    *>          (LDWORK,N) if SIDE = 'L',
    *>          (LDWORK,K) if SIDE = 'R'.
    Types of 'work' array in lapacke.h for LAPACK_(c/z)tprfb are float/double so they aren't correct.
    The archive includes changes in lapacke.h and source files:
        types of 'work' array in LAPACK_(c/z)tprfb: float/double -> lapack_complex_float/lapack_complex_double
        types of 'work' array in LAPACKE_(c/z)tprfb_work: float/double -> lapack_complex_float/lapack_complex_double
        In a similar way types of allocated 'work' arrays in LAPACKE_(c/z)tprfb were replaced.
    Also you can see here why MAX(1,ldwork)*MAX(n,k) isn't fully correct expression for work_size.   
 
2.  Files:
    lapacke_cuncsd.c
    lapacke_dorcsd.c
    lapacke_sorcsd.c
    lapacke_zuncsd.c
   
    From documentation of LAPACK_cuncsd (for other three LAPACK functions IWORK must have same size):
    *>          IWORK is INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q))
   
   So it's not correct here to allocate working array with MAX(1,m-q) size.
   Changes:
    lapack_int r;
    r=MIN(p,m-p);
    r=MIN(r,q);
    r=MIN(r,m-q);
    MAX(1,m-q) -> MAX(1,m-r)
   
3.  Files:
    lapacke_cgbsvxx_work.c
    lapacke_cgesvxx_work.c
    lapacke_chesvxx_work.c
    lapacke_cposvxx_work.c
    lapacke_csysvxx_work.c
    lapacke_dgbsvxx_work.c
    lapacke_dgesvxx_work.c
    lapacke_dposvxx_work.c
    lapacke_dsysvxx_work.c
    lapacke_sgbsvxx_work.c
    lapacke_sgesvxx_work.c
    lapacke_sposvxx_work.c
    lapacke_ssysvxx_work.c
    lapacke_zgbsvxx_work.c
    lapacke_zgesvxx_work.c
    lapacke_zhesvxx_work.c
    lapacke_zposvxx_work.c
    lapacke_zsysvxx_work.c
 
    Functions doesn't perform right transposition for 'err_bnds_norm' and 'err_bnds_comp' matrices:
    From documentation of these functions:
    *>          ERR_BNDS_NORM is (SINGLE/DOUBLE) PRECISION array, dimension (NRHS, N_ERR_BNDS)
    *>          ERR_BNDS_COMP is (SINGLE/DOUBLE) PRECISION array, dimension (NRHS, N_ERR_BNDS)
    So for interface functions right 'lda' for 'err_bnds_norm' and 'err_bnds_comp' matrices is 'n_err_bnds' rather than 'nhrs' in the case of LAPACK_ROW_MAJOR.
 
4.  Files:
    lapacke_stpqrt.c
    lapacke_stpqrt_work.c
    lapacke/src/Makefile
    lapacke/src/CMakeLists.txt
   
    Interfaces for LAPACK_spqrt were added: lapacke_stpqrt.c and lapacke_stpqrt_work.c and appropriate changes were performed in Makefile and CMakeLists.txt.
    Declaration of LAPACK_spqrt was added to lapacke.h.
2014-02-18 16:47:10 +00:00
julie 149087fffd Correct a bug in the description of the WORK parameter in (c,z)la_syrpvgrw.f
WORK is real
Bug report sent from Elena Ivanova (Oracle) on Feb 14th 2014
2014-02-14 21:40:56 +00:00
julie 06cdfd1dfb Fix potential initiation issue in (c,d,s,z)lansy.f
Bug report sent from Elena Ivanova on Feb 2014

Array WORK is initialized with ZERO when 'L' and is not initialized when 'U'.
There can be some garbage in WORK. Move up the initialization of WORK before the line
   IF( LSAME( UPLO, 'U' ) ) THEN.

Rearrange loop ordering numbers.
2014-02-14 21:13:20 +00:00
langou 54d66c762f ( Let me know if I broke anything. I double checked. We should be fine but )
( please let me know if concerns/problems.                                 )

1) The comments in ICMAX1 (resp. IZMAX1) were not correct. The comments read:
"ICMAX1 finds the index of the element whose real part has maximum absolute
value." It should have read: "ICMAX1 finds the index of the first vector
element of maximum absolute value." This is corrected. The problem was reported
Eloy Romero Alcalde from the SLEPc team, Universitat Politècnica de València
and confirmed by Nick Higham, Sven Hammarling and Julien Langou.

2) The routine ICAMAX (resp. IZAMAX) from the BLAS evolved without ICMAX1
(resp. IZMAX1). Reconcialated both version. So essentially took the ICAMAX
currently in the BLAS and changed it appropriately for an ICMAX1.

3) Remove the use of statement function in ICMAX1 (resp. IZMAX1). Now obsolete
in FORTRAN.

4) Change comments in BLAS routines: SCABS1, DCABS1, ICAMAX, IZAMAX, SCASUM,
and DZASUM. Remove the use of "absolute value of a complex number" for the
quantity "| Re(.) | + | Im(.) |". For example:
before
   DCABS1 computes absolute value of a double complex number 
after
   DCABS1 computes |Re(.)| + |Im(.)| of a double complex number
2014-02-10 19:55:39 +00:00
julie df74740608 == Patch provided by Brad King from Kitware - brad.king@kitware.com ==
Provide CMake packages for both LAPACK and LAPACKE

Teach "lapack-config.cmake" to provide variables

 LAPACK_blas_LIBRARIES
 LAPACK_lapack_LIBRARIES

that contain either the target names when using the reference
implementation or the system libraries found for them.

Configure a "lapacke-config.cmake" file for the build and install
trees to package LAPACKE.  Teach it to load the LAPACK package
installed with it.  Provide variables

 LAPACKE_INCLUDE_DIRS
 LAPACKE_LIBRARIES

containing the header file search path for lapacke headers
and the list of lapacke library targets.

This requires CMake 2.8.10 to separate the installation export
for the lapacke library from the other targets.
2014-02-09 00:37:45 +00:00
julie a681d8fc7a Problem reported by zhaowei@sccas.cn on Jan 9th 2014
Corrected comments to list Z as input/output

> Email 
i just found a mistake in the comments of 'dlasq3.c' while reading the code:
 
/*  Z      (input) DOUBLE PRECISION array, dimension ( 4*N ) */
/*         Z holds the qd array. */
 
but Z can be changed in that subroutine...i just think '(output)' should be added to avoid misleading user...
2014-01-09 20:34:39 +00:00
julie ad5a59e959 Do not hide the CMAKE_GNUtoMS variable to users (Thanks Brad) 2013-12-09 17:55:10 +00:00
julie 3e98d5fcde Fix typo in comment reported by elena.x.ivanova@oracle.com - zhetri2x fix was committed in r1465 (oops) 2013-12-07 00:32:08 +00:00
julie 3715f9c93f Fixed typos reported by elena.x.ivanova@oracle.com on Dec 5th 2013-12-07 00:25:51 +00:00
julie 014dcec815 Remove unused leftover GNUtoMS support file 2013-12-06 23:13:50 +00:00
julie 7d5a500ae4 Remove GNUtoMS code in favor of CMake builtin version - Thanks Brad (Kitware) 2013-12-06 03:59:31 +00:00
julie 0ffd5191b7 Require CMake >= 2.8.7 so we can use CMAKE_GNUtoMS 2013-12-06 03:58:29 +00:00
lawrence.mulholland 1e6ecf9157 fix to bug report 4331 2013-11-29 16:08:47 +00:00
julie 1039d785f6 Split lines to make INtel Windows Compiler happy... 2013-11-27 16:07:34 +00:00
langou eafd3b8946 Correct bug reported by Alex Zotkevich from Intel
See: http://icl.utk.edu/lapack-forum/viewtopic.php?f=13&t=4392

Bug: During workspace computation, LAPACK code CGESVD was calling other
subroutines (e.g. CGEQRF) with REAL DUM variable as COMPLEX WORK variable.  DUM
(in CGESVD) is REAL while WORK (in called subroutines) is COMPLEX.  This
corrupts the stack when a value is set in WORK.

Fix: In CGESVD, use the COMPLEX CDUM variable (already present in the code)
instead of the REAL DUM variable.  Since I was at it, the COMPLEX "TAU"
variables (not referenced anyway) were passed the REAL DUM variable, I changed
the code so that the COMPLEX CDUM variable is passed. This is cleaner like
this.

Same problem with ZGESVD. Same fix.

Alex's post:
Hi, We recently found a stack corruption issue in (C,Z)GESVD that potentially
could even lead to incorrect xerbla error message.  In ZGESVD array DUM which
is used in LWORK query is a double precision array of size 1 allocated on
stack:
	DOUBLE PRECISION DUM( 1 )
DUM comes to ( ZGEQRF, ZUNGQR, ... ) as a WORK array to return an optimal LWORK
value.  But in ( ZGEQRF, ZUNGQR, ... ) array WORK is declared as a COMPLEX*16
array. So WORK(1) = 1 corrupts the stack as it deals with complex value while
pointer on input of the function is a pointer to double: (oooooooo|xxxxxxxx),
oooooooo fills with LWORK value, xxxxxxxx corrupts. Let compiler use xxxxxxxx
to hold some value. After LWORK query the value will turn to be a zero.  "Hacky
fix" would be to allocate DUM array of size 2.
W.B.R.
Alex Zotkevich
2013-11-26 19:36:29 +00:00
langou f27b681ff5 Apply patch from Nadezhda Mozartova from Intel. (Sent to Julien on November
20th.) Thanks Nadezhda! Thanks Intel!
2013-11-25 23:47:55 +00:00
julie 89e6d08cb3 Fix info value problem for (c,d,s,z)tgsy2.f reported by Elena Ivanova (ORACLE) - Sent Nov 20th 2013-11-20 18:57:47 +00:00
julie 8368c618d4 Applying 2nd part of Mathieu's patch - modification in the include file 2013-11-19 10:18:52 +00:00
julie 5eb720761b Upadte version and date 2013-11-19 09:52:10 +00:00
julie d7eb9b6123 Apply patch submitted by Matthew Faverge, INRIA on Nov 19th 2013
There are problems  in LAPACKE complex lacn2 interfaces. Those functions don't have a "isgn" parmeter in LAPACK. This exists only for real interface. The problem is present in the four files of C and Z functions.

In Lapack:
  SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )

In Lapacke:
   LAPACK_zlacn2( &n, v, x, isgn, est, kase, isave );
2013-11-19 09:43:31 +00:00
igor175 72ee3708a3 LAPACK bug fix for XBLAS: bug revealed in testing of linear equation routines, when XBLAS is linked 2013-11-18 23:51:04 +00:00
julie 16a3151347 Update version and date on make.inc templates 2013-11-17 01:17:17 +00:00
julie 1351e9e3ee fix Illegal grep pb in lapack_testing 2013-11-17 01:15:04 +00:00
julie 94c1e9adda Slight modification to Lawrence patch for xTPQRT - Update conditions for testing parameter L - MIN(M,N) can be 0 2013-11-17 01:08:52 +00:00
julie afbaf16e8a update ilaver 2013-11-17 01:06:41 +00:00
julie ddd12e2c0e Update release number and date 2013-11-17 00:25:52 +00:00
julie 1b0d1a3582 Patch provided by Lawrence Mulholland from Nag on Nov 1st 2013
Email below: 
============
I have been incorporating some routines into the NAG Library,
which means some automatic code translation and writing some
example and test programs.

The routines I have been adding are:
?geqrt, ?gemqrt, ?tpqrt, ?tpmqrt, ?orcsd, ?uncsd

At the end of this message I will give you my current svn status
and svn diff for consideration and approval before I commit.

In each case, when testing immediate exits, my tests failed because
constraints were mutually exclusive for the immediate return case.
I have already committed changes to the constraints for some of
the above to allow immediate exit.
I have completed this for the remainder of this set.

Less importantly, there are things in the code that trip up a checking
compiler:
  a) an
           IF ( clause1(i) .AND. clause2(array(i)) ) THEN

      where array(i) is either not initialized or is out of bounds if
      clause1(i) is .FALSE.

      This is wrong since a Fortran compiler is at liberty to test clause2 first.
      In my changes this has been split into two as best suits the case.

 b) an
          CALL SUB (i, array(N-i+2))
     with i = 1 and array(N+1) either not initialized or out of bounds, but
     internally array(N+1) is not referenced.

     In this case I don't think the Fortran standard is clear, but it trips up the
     nagfor compiler with checking on. So in the NAG incorporated versions
     of Lapack routines such calls are protected and/or
     a special i=1 call is made.
     The changes I want to commit also do this.

 c) workspace queries passing zero instead of array references
         e.g.
                lwork = -1
                call barf(n,m,0,0,0,0,0,-1,info)

     a checking compiler won't like this.
     I have changed cases like this to pass available arrays of sufficient size
     and the right shape in place of the zeros.
2013-11-17 00:01:25 +00:00
langou 6159678a50 Typo in the comment on complex xHSEQR.
The formula:
	(QZ)*H*(QZ)**H.
should read:
	(QZ)*T*(QZ)**H.
2013-10-15 02:57:28 +00:00
james e9df21dece Added check for NaN in input parameter G to avoid infinite loop -- fixes bug110. 2013-10-05 21:19:17 +00:00
langou 3a87b2df45 FIX BUG 112.
(Bug reported on Aug 18 2013 by Daniel Strobusch on LAPACK mailing list)
    (Bug fixed by Rodney on Aug 19 2013)

This is a problem with gfortran.  One need to force gfortran to allocate all
local arrays on the stack.  One way to do this is to have the option
-frecursive
2013-10-04 19:55:20 +00:00
julie 36fb0160c3 Remove unused code 2013-10-04 03:20:34 +00:00
julie b0f05ab803 Correct comment
Problem reported by Elena Ivanova <Elena.x.Ivanova@Oracle.com> on Sept 16th
"Both RES, and AYB have to be described as REAL."
2013-09-16 16:44:21 +00:00
julie 24b0454b7d Apply fix sent by Elena Ivanova (Oracle)
There is FPE in the 457th line of CDRVRFP:
cdrvrfp.f
(dbx) where
=>[1] cdrvrfp(nout = 6, nn = 9, nval = ARRAY, nns = 3, nsval = ARRAY, nnt = 9, ntval = ARRAY, thresh = 30.0, a = ARRAY, asav = ARRAY, afac = ARRAY, ainv = ARRAY, b = ARRAY, bsav = ARRAY, xact = ARRAY, x = ARRAY, arf = ARRAY, arfinv = ARRAY, c_work_clatms = ARRAY, c_work_cpot02 = ARRAY, c_work_cpot03 = ARRAY, s_work_clatms = ARRAY, s_work_clanhe = ARRAY, s_work_cpot01 = ARRAY, s_work_cpot02 = ARRAY, s_work_cpot03 = ARRAY), line 457 in "cdrvrfp.f"

MAIN(), line 244 in "cchkrfp.f"
When N=0, attempt to calculate a condition number → FPE, because we try to delete by zero (ANORM = 0.0, AINVNM = 0.0) in the 457th line:
Line 457:
      RCONDC = ( ONE / ANORM ) / AINVNM
2013-09-13 21:32:40 +00:00
julie edde389f85 Add small fixes sent by Ake Sandgren <ake.sandgren@hpc2n.umu.se> 2013-09-13 21:24:08 +00:00
julie bb468effb7 Fix "if test" semantic in xdrvpox
Bug report sent by Elena Ivanova <elena.x.ivanova@oracle.com> on Sept 10th
2013-09-12 15:42:59 +00:00
lawrence.mulholland ec6c4073d0 typo in previous fix: MIN(M,N)>0 NOT MIN(M,N)<0 when checking NB>MIN(M,N) 2013-08-21 10:39:32 +00:00
langou e7c9157244 Fix from Lawrence Mulholland (NAG).
From Lawrence:
	The *GEQRT routines are supposed to return immediately when N=0 or M=0.
	However the code is such that an INFO = -3 is triggered since we are
	trying to satisfy
		ELSE IF( NB.LT.1 .OR. NB.GT.MIN(M,N) )THEN
			INFO = -3
	should be
		ELSE IF( NB.LT.1 .OR. ( NB.GT.MIN(M,N) .AND. MIN(M,N).LT.0 ) )THEN
			INFO = -3

Also on a side note, I think we could allow NB to be greater than MIN(M,N) in
the interface and then reset NB as needed if the user's NB is too large.
Another day. Good enough for now. 

Julien.
2013-08-16 15:03:03 +00:00
langou 2c7f5d957a apply patch from Hong Xu
patch sent to lapack mailing list on Sunday July 21st

In the input parameter checking, LDZ was not checked correctly
LDZ was checked against M instead of N essentially
2013-07-22 23:01:15 +00:00
julie 0e179fac77 Add missing file in CMakeLists.txt 2013-07-20 19:29:54 +00:00
igor175 ca8c0412b0 Added LAPACK tests for 'rook' routines and drivers to LIN/Makefile LIN/CMakeLists.txt 2013-07-09 04:45:46 +00:00
igor175 ac63399686 Modified test files for 'rook' pivoting LAPACK routines: LIN/cchkaa.f LIN/cchkhe_rook.f LIN/cdrvhe_rook.f LIN/cerrhe.f LIN/cerrvx.f LIN/zchkaa.f LIN/zchkhe_rook.f LIN/zdrvhe_rook.f LIN/zerrhe.f LIN/zerrvx.f ctest.in ztest.in 2013-07-09 04:42:19 +00:00
igor175 c1c4e80309 Added 'rook' LAPACK routines and drivers to SRC/Makefile SRC/CMakeLists.txt 2013-07-09 04:06:39 +00:00
igor175 127f04d2f0 Modified new 'rook' pivoting routines and drivers for Hermitian indefinite matrices, Complex precision: zhetf2_rook.f zlahef_rook.f zhetri_rook.f 2013-07-09 04:02:51 +00:00
igor175 2742b52089 Modified new 'rook' pivoting routines and drivers for Hermitian indefinite matrices, Complex precision: chetf2_rook.f clahef_rook.f chetri_rook.f 2013-07-09 01:55:07 +00:00
igor175 c150e44218 modified error hadling routines for LIN testing of new Hermitian 'rook' pivoting code: aladhd.f 2013-07-04 00:52:02 +00:00
igor175 133f9d3417 modified error hadling routines for LIN testing of new Hermitian 'rook' pivoting code: aladhd.f, alahd.f 2013-07-04 00:22:09 +00:00
james 68b1f1a6a1 bug fix provided by Elena Ivanova via email. 2013-06-27 18:54:28 +00:00
james 8767fb4cb6 updated xlarfb routines 2013-06-27 18:34:04 +00:00
james 29b9e2c718 fixed array index problems in new CSD routines by adding MAX() to ensure index is at least 1 -- this fixes array bounds violations in the test suite when array bounds checking is enabled 2013-06-05 02:55:11 +00:00
james 78de161a10 Now using 2-norm to compute vector norms of row and column for balancing algorithm.
This seems to fix problems with balancing causing very large backward error for certain
Hessenberg matrices, including the often cited example of Watkins.
2013-05-16 18:55:48 +00:00
igor175 0dbca90690 fixed comments in (c,z)errsy.f 2013-04-22 10:03:22 +00:00
igor175 c57182219e changed comments in (c,z)hetf2.f 2013-04-22 08:57:05 +00:00
igor175 9523660b3a added LAPACK routine (c,z)hesv_rook.f 2013-04-22 08:43:55 +00:00
igor175 1e800d2ed0 added LAPACK routine (c,z)hecon_rook.f 2013-04-22 08:35:15 +00:00
igor175 968ac62f28 added LAPACK routine (c,z)hetri_rook.f 2013-04-22 07:49:39 +00:00
igor175 36e3c390c1 added LAPACK routine (c,z)hetrs_rook.f 2013-04-22 07:41:56 +00:00
igor175 54c9a6e9b9 added LAPACK routine (c,z)hetrf_rook.f 2013-04-22 07:32:00 +00:00
igor175 18c5c20e7a added LAPACK routines (c,z)hetf2_rook.f 2013-04-22 06:54:22 +00:00
igor175 c5535f3f7d fixed comments in LAPACK routines (c,z)lahef.f and (c,z)lahef_rook.f 2013-04-21 03:32:20 +00:00
igor175 2a074023d5 fixed comments in LAPACK routines (c,z)lahef.f and (c,z)lahef_rook.f 2013-04-21 02:51:17 +00:00
igor175 a50f292ada Fixed comments in (c,z)lahef.f and (c,z)lahef_rook.f 2013-04-20 01:50:26 +00:00
igor175 96d2076201 added HR (Hermitian 'rook') path to LAPACK test routines alaerh.f alahd.f aladhd.f 2013-04-19 23:27:57 +00:00
igor175 7a58b251fb changed comments in LAPACK testing routine (c,z)latb4.f 2013-04-19 22:10:35 +00:00
igor175 90fa0bbf1a fixed comments in LAPACK testing routines (s,d,c,z)lavsy.f, (s,d,c,z)lavsy_rook.f (c,z)lavhe.f, (c,z)lavhe_rook.f 2013-04-18 00:39:57 +00:00
igor175 98a5672d00 fixed comments in LAPACK test routines (s,d,c,z)syt01.f, (s,d,c,z)syt01_rook.f and (c,z)het01.f, (c,z)het01_rook.f 2013-04-17 05:11:46 +00:00
igor175 aa4168d1e8 minor changes in LAPACK testing routines (s,d,c,z)drvsy.f, (s,d,c,z)drvsy_rook.f, (c,z)drvhe.f, and (c,z)drvhe_rook.f 2013-04-17 03:53:30 +00:00
igor175 9b6a2ea9ec removed whitespace in LAPACK testing routines (s,d,c,z)chksy.f and (s,d,c,z)chksy_rook.f and (c,z)chkhe.f (c,z)chkhe_rook.fand minor modifications 2013-04-17 02:53:48 +00:00
igor175 0d9453057f changed comments in LAPACK testing routines (s,d,c,z)chksy.f and (s,d,c,z)chksy_rook.f (c,z)chkhe.f (c,z)chkhe_rook.fand minor modifications 2013-04-17 02:44:09 +00:00
igor175 09e2b55c38 changed comments in LAPACK testing routines (c,z)chksy.f and (c,z)chksy_rook.f (c,z)chkhe.f (c,z)chkhe_rook.f and minor modifications 2013-04-17 01:46:16 +00:00
igor175 b52a7ab565 changed comments in LAPACK testing routines (c,z)chksy.f and (c,z)chksy_rook.f (c,z)chkhe.f (c,z)chkhe_rook.f and minor modifications 2013-04-17 01:45:24 +00:00
igor175 86fd909474 changed comments in LAPACK testing routines (c,z)chksy.f and (c,z)chksy.f 2013-04-16 22:06:41 +00:00
igor175 5ff998a98e changed coments in LAPACK testing routines (c,z)chksy.f and (c,z)chksy.f 2013-04-12 23:45:56 +00:00
igor175 941f02d0f5 added test routines (c,z)chkhe_rook.f and (c,z)drvhe_rook.f for Hermitian factorization routines with rook pivoting algorithm 2013-04-12 20:06:51 +00:00
igor175 ccc590feb7 added test routines (c,z)chkhe_rook.f and (c,z)drvhe_rook.f for Hermitian factorization routines with rook pivoting algorithm 2013-04-12 20:06:18 +00:00
julie a2d0bb04ed lapacke.h: template with C linkage error - forum topic 4221 2013-04-04 05:20:31 +00:00
james 13d8329ee4 removed references to example_ZGESV_rowmajor.c 2013-03-26 14:55:38 +00:00
james 2de914dbe2 removed example_ZGESV_rowmajor.c 2013-03-26 14:53:56 +00:00
james c3cf0a404a corrected bug found by Tyrone Rees posted on email list:
"I think there's a bug in the routine dlaqp2.f in version 3.4.2 of LAPACK 
(and possibly earlier). Line 220 of the source is
   IF( I.LE.N ) THEN
whereas for the other versions the same line reads
   IF( I.LT.N ) THEN

This difference appears to make the routine dgeqp3 fall over when asked 
to do a factorization of the last two columns of a 10x5 matrix.  The NAG 
fortran compiler gives the error:
 Subscript out of range for assumed-size array A - Access to element 22 
but actual argument has only 20 elements
 Program terminated by fatal error

The single precision version runs without a hiccup.

Best wishes,

Tyrone"
2013-03-22 20:54:57 +00:00
james cb5841c008 Applied patch provided by Sergey Kuznetsov @ Intel, fixes bug where TAU2 can be uninitialized. 2013-03-22 12:38:47 +00:00
james febdb51dbf added code to set the last pivots to n: ipiv(n)=jpiv(n)=n 2013-03-05 17:52:07 +00:00
julie 17c30cf73e Update and add examples 2013-02-15 21:54:15 +00:00
julie 01c8946882 Remove unused file 2013-02-15 16:45:00 +00:00
julie 476aeea055 Fix typos in README 2013-02-07 16:28:08 +00:00
julie 3e2429eedb Add c/zlacp2 for PLASMA team 2013-01-10 04:26:11 +00:00
igor175 5ae0f48852 Updated comments in (s,d,c,z)lasy_rook.f and (c,z)lahe_rook.f 2012-12-12 03:03:41 +00:00
igor175 5fc0e03de0 updated comments in (s,d,c,z)lasyf.f and (c,z)lahef.f 2012-12-12 02:49:09 +00:00
igor175 3c87e37d1c Updated comments in (s,d,c,z)sytf2_rook.f 2012-12-12 02:15:21 +00:00
igor175 d9f63ada77 Updated comments in (s,d,c,z)sytf2.f and (c,z)hetf2.f 2012-12-12 02:08:16 +00:00
igor175 315b545f70 updated comments in 2012-12-12 01:16:46 +00:00
igor175 2a7e5cf577 fixed comments in clahef_rook.f and zlahef_rook.f 2012-12-11 20:33:11 +00:00
julie 2f64e5a9cd Commit Victor Liu's suggestion about making the complex division routine more robust
tests and builds seems fine.

Message sent on Oct 18th
I just saw a paper on ArXiv about making the complex division routine more robust:
http://arxiv.org/abs/1210.4539
Second author is actually the original inventor of the current algorithm in Lapack.
I have attached my modified DLADIV routine, which passes all the tests in the build process.
2012-12-11 19:01:44 +00:00
igor175 dded5f0777 Replaced IF(J.LE.N) by IF(J.LT.N) for 'U', where U12 is put in standard form by partially undoing the interchanges, also added comments to the part where U21 is put in standard form; Similarly, replaced IF(J.GE.1) by IF(J.GT.1) for 'L', where L21 is put in standard form by partially undoing the interchanges, also added comments to the part where L21 is put in standard form; Affected files: zlahef.f clahef.f zlasyf.f clasyf.f dlasyf.f slasyf.f 2012-12-05 07:16:18 +00:00
igor175 ca6dac5d52 fixed a typo in a comment in (c,z)lahef_rook.f 2012-11-10 03:33:51 +00:00
igor175 aad0dfbf80 added clahef_rook.f and zlahef_rook.f 2012-11-10 02:33:57 +00:00
igor175 0ba273bce8 fixed a typo in a commnet in (c,z)lahef.f 2012-11-08 23:23:15 +00:00
igor175 62a53eb896 (s,d,c,z)lasyf.f and (c,z)lahef.f: added comments to the part where a column or 2 columns are updated at each step 2012-11-08 21:53:21 +00:00
igor175 cac00dc021 fixed comments in (s,d,c,z)lasyf.f and (c,z)lahef.f 2012-11-03 00:53:08 +00:00
igor175 7b5fb338b2 updated comments for interchage of rows and columns in (s,d,c,z)lasyf.f and (c,z)lagef.f 2012-11-02 04:26:02 +00:00
igor175 99ad8555ce Changed comment in (sdcz)lasyf.f and (cz)lahef.f about interchanges for 2x2 pivot 2012-11-02 03:02:56 +00:00
igor175 3d7f512461 (s,d,c,z)lasyf.f: introduced from zlahef.f a more efficient version of the code that interchanges row and columns -- 1) for 'L' version: eliminated unnecessary copying to elemnents in cols. K (K and K+1 for 2x2 pivot) that later on will be overwritten by storing L(k) ( L(k) and L(k+1) for 2x2 pivot ) into these cols. 2) for 'U' version: eliminated unnecessary copying to elemnents in cols. K (K and K-1 for 2x2 pivot) that later on will be overwritten by storing L(k) ( L(k)and L(k-1) for 2x2 pivot ) into these cols. 2012-11-02 02:00:52 +00:00
igor175 1dece8c92b updated comments in (c,z)lahef.f for column interchange 2012-11-02 00:44:17 +00:00
igor175 a47e62c31d (c,z)lahef.f: Changed the length of the swap vector from KK-1 to K-1 for the 'L' case and from N-KK to N-K for the 'U' case. It is sufficient to swap rows KK and KP only in the first K-1 columns of A instead of in the first KK-1 columns of A in 'L' case (columns K (or K and K+1) of A will be later overwritten). It is sufficient to swap rows KK and KP only in the last K+1 to N columns of A instead of in the last KK+1 to N columns of A in the 'U' case (columns K (or K and K-1) of A will be later overwritten). 2012-11-01 22:51:10 +00:00
igor175 2326ea0398 fixesd inconsistencies between 'L' and 'U' parts in (z,c)lahef.f, added an IF check to 'U' part IF(KP.GT.1) where column interchange occurs 2012-11-01 19:37:46 +00:00
igor175 77d27131d0 fixes to comments in *zlasyf_rook.f 2012-10-30 23:57:03 +00:00
igor175 6395d09a72 fixes to comments in *lasyf_rook.f 2012-10-29 18:49:49 +00:00
igor175 accaf7887d fixes to comments in *lasyf_rook.f 2012-10-29 18:30:30 +00:00
james 61b577c7f5 removed extra characters after ZERO 2012-10-27 15:13:36 +00:00
julie f7c5910a4a Add xlacn2 for PLASMA team 2012-10-26 05:04:09 +00:00
igor175 2f2ff626ad fixes to documentation in clahef.f and zlahef.f 2012-10-25 22:25:22 +00:00
igor175 227e83bb82 fixes to comments in *lasyf_rook.f 2012-10-25 22:12:12 +00:00
igor175 df210ad64f fixes to documentation in *lasyf.f, *lasyf_rook.f 2012-10-25 21:48:07 +00:00
james 04af8255ec patch from Mathworks that fixes convergence problem with some particular pencils in xGGEV 2012-10-19 21:45:55 +00:00
james 5dbf71b11b * added check for NaN after the norm of each block of H is computed
* if NaN is detected, returns with INFO=-6 (H is the 6th parameter)
* fixes problem found by Alexander Kobotov at Intel where a NaN in H can cause an infinite loop: 

  http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=3928
2012-10-11 18:19:31 +00:00
julie 988230771a Simplify description of workspace requirement
Reported by Simon on Oct 8th on LAPACK forum : http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=3951

The size of the workspace for DGESDD for JOBZ = 'S' or 'A' has been changed in LAPACK 3.4.2, and is set by LWORK. The current description of LWORK reads:

LWORK >= 3*min(M,N) +
         max(max(M,N),4*min(M,N)*min(M,N)+3*min(M,N)+max(M,N)).


In the second line, both arguments of max contain max(M,N), and so the the function is redundant - the second argument will always be realised. 
So the description could be simplified to:

LWORK >= 3*min(M,N) +
         4*min(M,N)*min(M,N)+3*min(M,N)+max(M,N)


or further simplified to 

LWORK >= min(M,N)*(6+4*min(M,N))+max(M,N)
2012-10-08 21:12:36 +00:00
julie a65e481c60 2012-09-25 23:56:27 +00:00
julie e9f3eef006 2012-09-22 03:33:49 +00:00
julie 7efafa8446 2012-09-21 15:48:46 +00:00
julie 44948e7c8e 2012-09-21 02:21:29 +00:00
james f045e14fbd 2012-09-20 14:41:07 +00:00
james 894f016c2a 2012-09-18 01:14:38 +00:00
james de0934ada8 2012-09-08 23:02:04 +00:00
james fd810cdf6d 2012-09-06 03:38:21 +00:00
james 960de6d4c7 2012-09-06 03:34:54 +00:00
julie 4870b29da5 2012-08-29 16:08:30 +00:00
james 59bbc63d76 2012-08-28 14:29:34 +00:00
julie 615220d1ee 2012-08-25 22:58:53 +00:00
julie 1d71ab691f 2012-08-25 22:27:13 +00:00
julie 807bbe52ad Add ilaver to LAPACKE 2012-08-25 22:24:59 +00:00
james 97ae78715a 2012-08-24 00:32:54 +00:00
julie 0b7c1103c9 2012-08-22 14:58:21 +00:00
james 60b151f5ad 2012-08-22 02:23:49 +00:00
julie e599d98717 Correct typo found by Elena Ivanova, Oracle.
See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=3612
2012-08-21 05:09:38 +00:00
james c8ee6a3d98 Corrected bug that occurs when V is stored in backwards order: previously, the scan for zero rows or columns at the _end_ of V can result in the trunctation of the unit triangular part of V. The correction replaces the LASTV in the DIRECT='B' cases with the full length, which is either M or N, which then keeps the full K-by-K unit triangular portion of V. Another approach, which could be applied in a future revision, is to add new routines to compute the first non-zero row and non-zero column of a matrix, and store this index in FIRSTV, and run the loops and matrix multiplications from FIRSTV:M and FIRSTV:N where appropriate. 2012-08-18 22:01:21 +00:00
james ed86510324 reverting to previous version, which is correct 2012-08-18 21:45:06 +00:00
james 0cb0c77bb9 fixed logic error that corrects bug found by Duncan Po at Mathworks 2012-08-17 00:53:59 +00:00
julie f19e60eae7 Correct comments and Doxygen generation following comments from Sa-Lin Cheng Bernstein sent to lapack mailing list on August 9th 2012
While looking at the new lapack version (v3.4.1) and going through the routines on http://www.netlib.org/lapack/lapack_routine/, we found some errors and thought that we should report them. Below is the list of the errors.

====================================================================
(1) Should be "\ingroup complex16OTHERsolve" and not "\ingroup complex16OTHERcomputational" because they are driver routines; in addition, in the line just below SUBROUTINE <routinename>, it should be driver routine:
sgtsv.f
sgtsvx.f
sptsv.f
sptsvx.f
dgtsv.f
dgtsvx.f
dptsv.f
dptsvx.f
cgtsv.f
cgtsvx.f
cptsv.f
cptsvx.f
zgtsv.f
zgtsvx.f
zptsv.f
zptsvx.f

(2) Should be "\ingroup complex16SYsolve" and not "\ingroup complex16OTHERcomputational" because they are driver routines; in addition, in the line just below SUBROUTINE <routinename>, it should be driver routine:
ssysvxx.f
dsysvxx.f

(3) Should be "\ingroup realOTHERcomputational" and not ""\ingroup auxOTHERcomputational":
spttrf.f

(4) Should be "\ingroup doubleOTHERcomputational" and not ""\ingroup auxOTHERcomputational":
dpttrf.f

(5) Should be "symmetric matrix" and not "Hermitian indefinite matrix" in "\par Purpose:"
ssytri2.f
dsytri2.f
csytri2.f
zsytri2.f

(6) Should be "\ingroup realGEsing" and not "\ingroup realGEcomputational":
sgejsv.f
dgejsv.f
2012-08-10 17:32:23 +00:00
langou eca2d3e81e Correct comments in
SRC/sgeev.f
	SRC/dgeevx.f
	SRC/dgeev.f
	SRC/sgeevx.f

Reported by Konstantinos Kafoysas (Beta CAE Systems S.A., Greece) on Thu Aug
9th, 2012 through LAPACK mailing list.

> In the comments of dgeev function
> 
> *  The left eigenvector u(j) of A satisfies
> *                u(j)**T * A = lambda(j) * u(j)**T
> *  where u(j)**T denotes the transpose of u(j).
> 
> u is supposed to satisfy u(j)**H * A = lambda(j) * u(j)**H
2012-08-09 15:49:47 +00:00
julie d797a2b9de error in comment detected by Mathieu (PLASMA)
Routine affected: [CZ]HEGST et [CZ]HEGS2,
B is IN in comment, but in the code, B is actually changed, but after restored.
Here is the code portion that is to blame. [CZ]HEGS2 

00203                IF( K.LT.N ) THEN
00204                   CALL ZDSCAL( N-K, ONE / BKK, A( K, K+1 ), LDA )
00205                   CT = -HALF*AKK
00206                   CALL ZLACGV( N-K, A( K, K+1 ), LDA )
00207                   CALL ZLACGV( N-K, B( K, K+1 ), LDB )
00208                   CALL ZAXPY( N-K, CT, B( K, K+1 ), LDB, A( K, K+1 ),
00209      $                        LDA )
00210                   CALL ZHER2( UPLO, N-K, -CONE, A( K, K+1 ), LDA,
00211      $                        B( K, K+1 ), LDB, A( K+1, K+1 ), LDA )
00212                   CALL ZAXPY( N-K, CT, B( K, K+1 ), LDB, A( K, K+1 ),
00213      $                        LDA )
00214                   CALL ZLACGV( N-K, B( K, K+1 ), LDB )
00215                   CALL ZTRSV( UPLO, 'Conjugate transpose', 'Non-unit',
00216      $                        N-K, B( K+1, K+1 ), LDB, A( K, K+1 ),
00217      $                        LDA )
00218                   CALL ZLACGV( N-K, A( K, K+1 ), LDA )
2012-08-03 18:17:41 +00:00
julie 199c646448 Commit Brian Sutton new CS Decomposition routines.
All the routines from the SRC folder have been updated to integrate the current Doxygen layout.
Everything seems to be fine, all tests passed without problem.
2012-07-27 06:42:44 +00:00
james 2a180a73cd added NaN check to prevent NaN's from being skipped in accumulation 2012-07-17 13:15:40 +00:00
james b0ccd072d7 matrix norms now consistently return nan when input matrix contains a nan;
previously, this was (usually) only the case for the 'F' norm
2012-07-16 14:21:07 +00:00
julie 8989738d77 Add make.in for pgf95 compiler 2012-07-13 17:12:37 +00:00
julie 2bb57e4e12 Correct bug0096 reported by Joseph Young from Sandia.
Followed recommendation, use the existing sorting code.

Report sent to LAPACK mailing list on June 26th 2012

From Joseph:
>     There appears to be an inconsistency and possible bug in the dstemr 
> implementation.  When calculating the eigenvalues of a matrix, the 
> returned eigenvalues are supposed to be returned in ascending order.  
> Although this appears to be the case for N >= 3, it does not appear to 
> be the case for N=2.  I believe this happens because the dstemr routine 
> has special cases for N=0,1, and 2, which immediately return after their 
> computation.  Because these cases return immediately, they do not call 
> the sorting routines around line 723 (in LAPACK version 3.4.1).  As 
> such, a simple fix would be to have the N=2 case call this sorting code 
> rather than returning.
2012-07-04 02:53:38 +00:00
julie 1b56352b85 Add Brief description for auxiliary routines 2012-07-03 04:39:13 +00:00
james 38febd8f67 Added fix to prevent dividing by T when T=0 provided by Alexander Kobotov of Intel. 2012-06-29 11:47:00 +00:00
julie fb89702b46 Correct a problem reported by Keita Teranishi from CRAY on May 18th 2012
Confirmed and Corrected by Julie on May 21st 2012

====================================
EMAIL:
We would like to report a bug in {S,D}SYEVR and {C,Z}HEEVR  routines.  This bug causes writing two different data in the same address in IWORK, potentially producing wrong answers.
The bug description is provided in the bottom of the email.  Please let us know, if you have any questions.
 
Thank you,
 
Line 543 in {S,D}SYEVR:
Line 717 on {C,Z}HEEVR:
 
=== Code Starts here==
      INDISP = INDIBL + N
*     IWORK(INDIFL:INDIFL+N-1) stores the indices of eigenvectors
*     that corresponding to eigenvectors that fail to converge in
*     DSTEIN.  This information is discarded; if any fail, the driver
*     returns INFO > 0.
      INDIFL = INDISP + N
*     INDIWO is the offset of the remaining integer workspace.
      INDIWO = INDISP + N  <- -- It is suspicious.
=====End of the Code=========
 
I think this should be INDIWO = INDIFL+N.  Otherwise, subsequent {S,D}STEIN call takes the same address for IWORK(INDIWO) and INWROK(INDIFL).
         CALL DSTEIN( N, WORK( INDD ), WORK( INDE ), M, W,
     $                IWORK( INDIBL ), IWORK( INDISP ), Z, LDZ,
     $                WORK( INDWK ), IWORK( INDIWO ), IWORK( INDIFL ),
     $                INFO )
 
====================================
2012-05-22 00:55:21 +00:00
james 45c1a9c115 added missing comma, thanks to Lee Killough at ANL 2012-05-16 19:44:39 +00:00
julie 21c706a281 Correct a minor problem in comments sent by Alexander Kobotov
One more minor notice:
- In sgsvj0.f and sgsvk1.f: EPS and SFMIN become INTEGER in description whereas these are actually REAL.
2012-05-14 18:34:22 +00:00
julie 0d773316a0 Fix lange routine.
/* Allocate memory for working array(s) */
   if( LAPACKE_lsame( norm, 'e' ) || LAPACKE_lsame( norm, 'f' ) ) {
       work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
       if( work == NULL ) {
           info = LAPACK_WORK_MEMORY_ERROR;
           goto exit_level_0;
       }
   }

This is wrong, it is actually the opposite. Only the inf norm needs a workspace.

Thanks Mathieu for catching this!
2012-05-12 00:51:25 +00:00
julie f6b3a42a1d Commit patch sent by Sébastien Fabbro to enable LAPACKE built without LAPACK.
The patch has been modified a little by Julie as there were some minors problems.
This also fix the BUILD_TESTING=OFF option problem reported by Marcin on lapack mailing list.

From Sébastien:
Here is a patch to compile lapacke with CMake using an already
existing optimized lapack library instead of forcing the build of the
included one in the tar ball. It applies to the latest lapack svn
trunk.
2012-04-26 13:22:53 +00:00
julie 8f06ee757c Update CMAKE version requirement and remove FindBLAS module that is now include inside CMAKE 2012-04-25 20:35:07 +00:00
julie b5c3057664 Minor modification for ctest build template 2012-04-25 06:51:09 +00:00
julie 88d8de0d4f Fix small problem detected by user Yao Toa. sent to the LAPACK mailing list on April 23th 2012
It seems that this one has been around forever 

============

hi.

i found a subtle difference between dsyevd.f and ssyevd.f when using lapack 3.4.1.

dsyevd updates LOPT after calling dsytrd and dlacpy. but those codes are not visible in ssyevd.f, cheevd.f and zheevd.f.

pls refer to line 329, 344 in dsyevd.f.

i wonder whether those codes are necessary, because dsyevd has precalculated LOPT with at least 1+6*N+2*N**2.

if those codes must be there, why not for ssyevd?

thanks in advance.

Yao Tao
2012-04-25 05:14:31 +00:00
james f5cdededb3 modified exceptional shift for complex versions - solves problem of nan's appearing on some platforms, most notably IBM/XLF, causing an infinite loop in xLARTG (which also should be fixed by enforcing a max iteration count when computing SCALE) 2012-04-23 23:16:24 +00:00
julie 99af1a44a9 Fix problems in comments found by Alexander Kobotov
Just taking a quick look on the new release I noticed some minor issues there, which probably caused by a generation script:
- If you explore diff for files (c/z)gbrfsx, cgbsvx, cgbsvxx, cheequb, clanhf, zheequb you could find that number of datatype descriptions in documentation were changed to incorrect one (DOUBLE PRECISION instead of COMPLEX, or COMPLEX*16 instead of just COMPLEX). 
+ cunbdb has CMPLX instead of COMPLEX for X12 parameter.
+ zggevx RWORK become REAL instead of correct DOUBLE PRECISION
- Number of files got following string "/ output)", which seems meaningless. Just grep for it.
2012-04-23 21:33:19 +00:00
julie f5ad5058f7 Fix XLF flags that were causing test zgg to hang 2012-04-20 19:08:58 +00:00
james 73697fcf86 put FOUR parameter back since it is used in this routine 2012-04-19 15:30:39 +00:00
julie 6abbc1aa1e rearrange the test (Julien prefers it that way) 2012-04-18 19:09:31 +00:00
julie 5010a5e95e Update date and revision number 2012-04-18 16:37:50 +00:00
julie 9769575ceb Correct bug sent by NAG people
Got a new bug for you! Mick Pont found this problem in DLAED6. The code in question is the 40 loop - when DSCALE(I)=TAU you get a divide by zero (rare in practice). This can cause some compilers to immediately stop, e.g. the Sun compiler.

Mick proposed solution is below:

        DO 40 I = 1, 3
           IF (DSCALE( I ).NE.TAU) THEN
              TEMP = ONE / ( DSCALE( I )-TAU )
              TEMP1 = ZSCALE( I )*TEMP
              TEMP2 = TEMP1*TEMP
              TEMP3 = TEMP2*TEMP
              TEMP4 = TEMP1 / DSCALE( I )
              FC = FC + TEMP4
              ERRETM = ERRETM + ABS( TEMP4 )
              DF = DF + TEMP2
              DDF = DDF + TEMP3
           ELSE
*              On rare occasions dscale(i) can be exactly equal to
*              tau, leading to division by zero. If no trap occurs,
*              there is no problem; the quantities above all overflow
*              and the test on abs(f) below sends you to the end
*              with good results. If a trap occurs, though, the
*              user program will stop. Avoid that happening by
*              jumping directly out.
              GO TO 60
           END IF
  40    CONTINUE

This seems to work OK in our testing.
2012-04-18 16:35:07 +00:00
james 90489aa716 modified exceptional shift strategy so that QZ now works for various pencils (see http://netlib.org/lapack/Errata/vrac/lapack_known_issues.html) 2012-04-17 17:26:31 +00:00
julie f0b200da5b Update version number 2012-04-13 18:22:32 +00:00
julie ac815691de Fix small issue with lapacke built 2012-04-12 23:06:02 +00:00
julie e920f07b55 Add -qnosave option for xlf compiler (Thanks Rodney) 2012-04-12 21:07:52 +00:00
julie d1c0c25cd2 Follow up to rev r1130
Fix bug bug0088 reported by Mike Pont from NAG on the forum
(see http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=2893)

Actually there were a lot of problems regarding arguments checking.
I tried to correct most of them.

Apply the fix propose to all x[he/sy]rfsx.f routines
- Use IGNORE_CWISE as suggested to prevent use of unitialize variable PARAMS

I also appied the previous TESTING fix to all routines

INFO has new value in ZHERFSX (see description of INFO between ZHESVX and ZHESVXX)
This is set on line 634 (IF ( INFO .LE. N ) INFO = N + J) of zherfsx.f
And this is not handled by the testing LIN/zdrvhex.f
I just add  .AND. INFO.LE.N at line 638 to avoid raising an error when INFO = N + J

At the moment, I would recommand a further look at those routines.
ZHE, ZSY led to 182 Tests failing to pass the threshold
and the same for complex

better than before, but still....
2012-04-12 00:56:00 +00:00
james 21199982e2 removed comment regarding A being modified and restored - this is no longer the case with the changes made to xLARFT 2012-04-11 23:08:06 +00:00
julie 200e652e63 Remove unused variables 2012-04-11 20:16:24 +00:00
julie 55d43f3c3c Remove unused parameters 2012-04-11 19:43:59 +00:00
james c254495b4d added code to handle N=1 case to fix divide by zero problem that occurs
when the single (diagonal) element is negative

see: http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01195.html
2012-04-11 01:50:07 +00:00
julie 1b5afc4229 Fix call to GEMQRT (no lwork) and lwork declarations 2012-04-10 20:59:35 +00:00
julie 85f43a20d5 Fix External Subroutines declarations 2012-04-10 20:21:27 +00:00
julie a6d0c3e520 Add the python script for LAPACK Summary output to CTEST 2012-04-05 05:47:38 +00:00
james 1aaf19768b changed SVD test threshold to 50.0 and removed SEP test for matrix type 9 so that all tests pass 2012-04-05 02:53:32 +00:00
james 5178b0ead4 changed weights so that the badly conditioned tests (which always fail) are avoided for SXV, DXV, CXV, ZXV. 2012-04-03 18:11:13 +00:00
james 824718cced Fix provided by Hong Bo Peng for bug0026 2012-04-03 15:29:34 +00:00
julie fea16a1196 Undoing unvoluntary change commited in 1237 2012-04-02 21:58:34 +00:00
julie 2df2e59305 2012-04-02 21:44:14 +00:00
julie 00f52845f6 Following Mathieu's request, some part of lapacke.h were moved to lapacke_utils.h
(the definition of ABS, MAX, MIN, etc...)
Those were conflicting with PLASMA internal definitions.

LAPCKE Routines are now just including lapacke_utils.h which in turn includes lapacke.h
2012-03-22 22:55:22 +00:00
julie e928763a01 Correct problem in Workspace calculation 2012-03-22 02:05:18 +00:00
julie 97230bb34e Correct bug 0090 Need to unscale if necessary when there is an error in DHGEQZ (QZ iteration failed)
* bug report by Hong Bo Peng Sandgren, on 03-19-2012.
 * See link:http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01257.html[LAPACK Mailing list msg 01257]

I am doing some work with DGGEV. When I check the return msg and the actual code, I found something may be wrong. Here is part of comments in the header of DGGEV.F.

*  INFO    (output) INTEGER
*          = 0:  successful exit
*          < 0:  if INFO = -i, the i-th argument had an illegal value.
*          = 1,...,N:
*                The QZ iteration failed.  No eigenvectors have been
*                calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
*                should be correct for j=INFO+1,...,N.
*          > N:  =N+1: other than QZ iteration failed in DHGEQZ.
*                =N+2: error return from DTGEVC.

When INFO = 1...N, there is an error in DHGEQZ (QZ iteration failed). From the code, we can see it jumps to label 110 then set WORK(1) and return. 
But in case of we scaled the matrix, we still need to undo scale for the output array ALPHAR, ALPHAI and BETA for those values j=INFO+1,...,N. 

In DGEEVX, we can see that it jumps to label 50 in case of DHSEQR failure and then undo scale before return.
2012-03-20 21:31:07 +00:00
julie cbc5626696 Add csyr and zsyr needed by the PLASMA project 2012-03-20 04:23:55 +00:00
james 28afe053e2 modified so that V is [in] only instead of [in/out] 2012-02-23 19:34:36 +00:00
julie a4498822a1 Change CMAKE configuration for LAPACKE
CMAKE now can find the Fortran Mangling automatically (no need of extra flags) 
with the module FortranCInterface and create the necessary header.
Needed to make some adjustements with the routine name.
Added a file lapacke_mangling_with_flags.h that is used with Makefile build

lapacke.h now requires lapacke_mangling.h
 - the file is created by CMAKE if CMAKE is used
 - the file is copied from lapacke_mangling_with_flags if Makefile is used
2012-02-17 17:23:57 +00:00
julie 972d055ebd Fix Makefile in LIN 2012-01-26 19:59:40 +00:00
julie 3946763959 Fix Typo 2012-01-21 13:48:21 +00:00
james 5906b88423 Fixed problem with optimizer breaking error checking, now using F90 EPSILON intrinsic.
Thanks to Harald Anlauf for providing the solution.
2012-01-20 15:12:13 +00:00
james a880822a50 replaced calculation of EPS with F90 call to EPSILON intrinsic 2012-01-20 03:06:12 +00:00
julie da9a2d6d7a Update CMAKE build 2012-01-19 15:16:39 +00:00
james eb4f5ca43b Fixed QRT routine testing 2012-01-18 22:38:18 +00:00
langou 30231be484 typo 2012-01-17 04:46:18 +00:00
igor175 bae881fa32 added a comment to *chksy_rook.f 2012-01-12 23:05:35 +00:00
igor175 bbd78a4327 introduced CALL XLAENV( 2, 2 ) in zchksy.f and cchksy.f in order to make them uniform with schksy.f and dchksy.f and *chksy_rook (it was discussed with Julien in an email) 2012-01-12 07:52:50 +00:00
igor175 083a6f0537 added sdrvsy_rook.f cdrvsy_rook.f zdrvsy_rook.f to LIN/CMakeLists.txt 2012-01-12 07:30:43 +00:00
igor175 f0443ccaf0 small fixes, removed unused varibales in ddrvsy_rook.f zdrvsy_rook.f sdrvsy_rook.f 2012-01-12 07:16:18 +00:00
igor175 4b1ceab1d7 added a test for double precision complex SV driver for symmetric indefinite matrices with rook pivoting 2012-01-12 07:14:31 +00:00
igor175 3d3e2692a1 added a test for double precision complex SV driver for symmetric indefinite matrices with rook pivoting 2012-01-12 06:20:58 +00:00
julie 7c9b02423f Add an option LAPACKE_WITH_TMG that will generate the LAPACKE with the TMG routines needed in plasma (by default regular LAPACKE with only LAPACK routines 2012-01-12 01:46:17 +00:00
julie f9b184c35d Add the test for single precision driver routines for symmetric indefinite matrices with rook pivoting in CMAKE 2012-01-12 01:27:47 +00:00
igor175 c610df408e added the test for single precision driver routines for symmetric indefinite matrices with rook pivoting 2012-01-11 23:53:07 +00:00
julie 6e54500199 Fix LAPACKE makefile to only include XBLAS routine if USEXBLAS is defined 2012-01-11 21:57:01 +00:00
julie 36369de32a Adding CMAKE Support for LAPACKE.
Now we can generate dll for LAPACK and LAPACKE directly for Mingw so that FORTRAN compiler is longer needed.
Because LAPACKE contains some routines from MATGEN (for PLASMA), LAPACKE will requires the tmglib library.

Add some LAPACK 3.4.0 routines were missing in the CMAKE LAPACK build.
2012-01-10 23:15:10 +00:00
julie 491fcee030 Fix minor problem in some comments... 2012-01-08 05:27:18 +00:00
julie a055c28aa2 Fix bug0085 - xGESVD Problem in Workspace computation 2012-01-07 06:00:05 +00:00
julie c47cfff838 Add Rook pivoting routines to LAPACKE 2012-01-06 06:25:39 +00:00
julie 125497bd3a Update CMAKE build for Rook Pivoting Routines + correct minor fix 2012-01-06 04:47:10 +00:00
julie 1323886a30 Modifications following email from PLASMA Team (Mathieu) 2012-01-06 03:53:11 +00:00
igor175 a135fe145c added spacing between argumets in subroutine call 2012-01-04 08:23:39 +00:00
igor175 0971499ef4 changed error handler alaerh.f so that it recognizes ***'SV' instead of ***'SV ' for 'xSY', 'xSR' and 'xHE' test paths 2012-01-04 08:20:05 +00:00
igor175 a44bd0134a added the tests, i.e. ddrvsy_rook.f for driver routines for symmetric indrfinite matrices with rook pivoting, included this tests in dchkaa.f and Makefile 2012-01-04 07:51:43 +00:00
igor175 4ed101fbd6 fixed a typo in aladhd.f 2012-01-03 23:46:05 +00:00
julie 5e23c70a52 Fix group problem for Level 2 BLAS routine in double precision 2012-01-03 23:44:14 +00:00
igor175 d77ac5faee added 'SR' test path to aladhd.f for driver routines that correspond to symmetric indefinite matrices with rook pivoting 2012-01-03 23:27:40 +00:00
igor175 32fea3c465 added 'SR' test path to TESTING/LIN/*errvx.f to test *SYSV_ROOK error exits 2011-12-27 06:12:22 +00:00
igor175 6e221d7bec added a special block diagonal matrix type to tests for COMPLEX*16 symmetric indefinite factorization routines with rook pivoting 2011-12-27 05:25:02 +00:00
igor175 611b774a50 added a special block diagonal matrix type to tests for COMPLEX symmetric indefinite factorization routines with rook pivoting 2011-12-27 05:10:16 +00:00
igor175 ac9669ebc0 changed a comment in cchkaa.f dchkaa.f schkaa.f 2011-12-26 07:36:36 +00:00
igor175 e7eca7e00e fixed a typo in TESTING/LIN/zerrsy.f 2011-12-26 07:32:09 +00:00
igor175 f19cb27704 changed 'Complex precision' into 'Zomplex precision' in TESTING/LIN/zchksy_rook.f 2011-12-26 06:56:51 +00:00
igor175 8f2c0bfb69 added 'ZSR' test path to test COPLEX*16 routines with rook pivoting in TESTING/LIN/zchksy.f, also added this path to the driver file ztest.in 2011-12-26 06:38:03 +00:00
igor175 275f710ddc added 'ZSR' test path to test COPLEX*16 routines with rook pivoting in TESTING/LIN/zchksy.f, also added this path to the driver file ztest.in 2011-12-26 06:37:44 +00:00
igor175 fff26160a4 added TESTING/LIN/zchksy.f and included in the makefile 2011-12-26 06:22:02 +00:00
igor175 cfebea7f5f line formatting fixes to schksy_rook.f and dchksy_rook.f 2011-12-26 03:31:49 +00:00
igor175 38577177d4 updated tests in for COMPLEX symmetric indefinite matrix routines with rook pivoting in TESTING/LIN/cchksy_rook.f 2011-12-26 03:23:48 +00:00
igor175 f0438db300 fixed a typo in a comment in LIN/cchkaa.f 2011-12-26 02:59:48 +00:00
igor175 659c9c1248 added 'CSR' tet path to test COMPLEX routines for symmetric indefinite matrices with rook pivoting to the main test program TESTING/LIN/cchkaa.f and updated driver file ctest.in 2011-12-26 02:45:13 +00:00
igor175 2c94aed53d added cchksy_rook.f in TESTING/LIN/ and included it in Makefile 2011-12-26 02:26:07 +00:00
igor175 67d000b9da added cchksy_rook.f in TESTING/LIN/ and included it in Makefile 2011-12-26 02:25:57 +00:00
igor175 f90e2a00ad fixed a call with a wrong number of arguments to *SYTRI_ROOK in schksy_rook.f dchksy_rook.f 2011-12-26 01:31:15 +00:00
igor175 864565c8e3 corrected a type in a comment in TESTING/LIN/schksy_rook.f 2011-12-26 01:03:57 +00:00
igor175 3b6eff3d15 changed comment in dchksy.f schksy.f 2011-12-26 00:49:05 +00:00
igor175 14a4c06859 changed the variable name in TESTING/LIN/schksy_rook.f 2011-12-25 23:50:19 +00:00
igor175 03b1638d81 changed the order of variable decrarations in TESTING/LIN/schksy_rook.f 2011-12-25 23:45:24 +00:00
igor175 aa17a40770 fixed a typo 0.0E+o --> 0.0D+0 in TESTING/LIN/zchksy.f 2011-12-25 23:37:10 +00:00
igor175 8459b7c4fd added CZERO named constat to TESTING/LIN/zchksy.f 2011-12-25 23:23:07 +00:00
igor175 ee0b35801a added CZERO constant to cchksy.f 2011-12-25 23:13:53 +00:00
igor175 70e0263e72 updated a comment in dchksy.f and schksy.f 2011-12-25 23:12:04 +00:00
igor175 8714041cd2 added 'SSR' test path to test symmetric indefinite factorization routines with rook pivoting to TESTING/LIN/schkaa.f 2011-12-25 06:07:19 +00:00
igor175 9e4c8a0a56 added 'SSR' test path for symmetric indefinite factorization routines with rook pivoting into stest.in driver file 2011-12-25 06:01:17 +00:00
igor175 dd49064384 added 'DSR' test path for symmetric indefinite factorization routines with rook pivoting into dtest.in driver file 2011-12-25 05:58:00 +00:00
igor175 9982ee2e30 added schksy_rook.o to TESTING/LIN/Makefile 2011-12-25 05:54:46 +00:00
igor175 add0502817 added schksy_rook.o to TESTING/LIN/Makefile 2011-12-25 05:51:07 +00:00
igor175 990ec0c630 added schksy_rook.o to TESTING/LIN/Makefile 2011-12-25 05:49:41 +00:00
igor175 3d3fdf834b changed comments in dchkaa.f 2011-12-25 05:46:44 +00:00
igor175 12105e2e50 added schksy_rook.f 2011-12-25 05:27:46 +00:00
igor175 acad7414de added a few comments in routines schksy.f dchksy.f cchksy.f zchksy.f 2011-12-25 04:50:57 +00:00
igor175 ecfc5e7828 fixed a bug in the counter for the number of completed tests in schksy.f dchksy.f cchksy.f zchksy.f 2011-12-25 04:01:51 +00:00
igor175 ee98c25dda final version of the routine dchksy_rook.f that tests dsytrf_rook.f dsytri_rook.f dsytrs_rook.f dsycon_rook.f 2011-12-25 03:14:59 +00:00
igor175 c6df29ae8b fixed a typo in serrsy.f cerrsy.f zerrsy.f 2011-12-25 02:05:46 +00:00
igor175 95ec73f743 fixed a typo in alahd.f 2011-12-25 01:52:41 +00:00
igor175 774dfef56f added 'SR' test path for symmetic indefinite factorization routines with rook pivoting to alaerh.f 2011-12-25 01:45:59 +00:00
igor175 5efe1971ec added new 'SR' test path (that sorresponds to symmetric indefinite factorization routines with rook pivoting) to the alahd.f routine that prints header information for different test paths 2011-12-25 01:18:39 +00:00
igor175 af570da6d5 added rook pivoting routines to the tests that check error exits for symmetric indefinite factorization routines, i.e. to serrsy.f derrsy.f cerrsy.f zerrsy.f 2011-12-25 01:15:10 +00:00
igor175 907d76cce5 added a comment to schksy.f cchksy.f dchksy.f zchksy.f 2011-12-24 01:49:37 +00:00
igor175 1d12a003eb updated comments and changed the way how test type counter NT is incremented in cchksy.f zchksy.f dchksy.f schksy.f 2011-12-23 23:54:32 +00:00
igor175 72b3274ec9 added *lavsy_rook.o and *zsyt01_rook.o to TESTING/LIN/Makefile 2011-12-23 05:38:47 +00:00
igor175 b6a857fdec chenge parameter ONE to CONE for complex routines clavsy.f, zlavsy.f. Also updated the documentation for these files to DoXigen format. Is seems that the documentation for these complex routines was not converted complely into DoXigen 2011-12-23 05:25:17 +00:00
igor175 2fd1c8f3df updated the documentation for dlavsy.f slavsy.f 2011-12-23 05:21:36 +00:00
igor175 ac3183fcd5 added slavsy_rook.f dlavsy_rook.f clavsy_rook.f zlavsy_rook.f 2011-12-23 05:00:52 +00:00
igor175 473b0bb127 added dlavsy_rook.f 2011-12-23 03:23:11 +00:00
igor175 db71b247d6 changed the order of external function declarations from CLAVSY, CLASET to CLASET, CLAVSY in csyt01.f to be consistent with zsyt01.f 2011-12-23 01:56:14 +00:00
igor175 fa41f57d3d changed the order of external function declarations from SLAVSY, SLASET to SLASET, SLAVSY in ssyt01.f to be consistent with dsyt01.f 2011-12-23 01:55:44 +00:00
igor175 9a3b0c2ffe added ssyt01_rook.f csyt01_rook.f zsyt01_rook.f 2011-12-23 01:52:04 +00:00
igor175 4ed2e4f235 added dchksy_rook.f 2011-12-23 01:50:30 +00:00
igor175 161689ad28 added 2011-12-23 01:16:22 +00:00
igor175 355cdb3ae1 added a few comments to the code in files for linear equations testing routines: schksy.f dchksy.f cchksy.f zchksy.f 2011-12-23 01:00:25 +00:00
igor175 6cc04f348a inserted a comment line '' into cchksy.f, zchksy.f, dchksy.f, schksy.f 2011-12-21 21:12:13 +00:00
igor175 11ecff3e7b corrected a typo from the previos commit: CALL pwd( PATH, NOUT ) replaced by CALL DERRSY( PATH, NOUT ) 2011-12-21 06:49:03 +00:00
igor175 939b459767 Included a comment about what CALL XLAENV( 2, 2 ) does in dchksy.f, schksy.f 2011-12-21 06:26:11 +00:00
igor175 9a0911c945 pached the comments blocks for test programs for linear equation routines schkaa.f dchkaa.f zchkaa.f cchkaa.f; added a description of MATMAX parameter, ann changed the description from 'Arguments' into 'Parameters' 2011-12-21 03:26:47 +00:00
igor175 272f202132 pached the comments blocks for test programs for linear equation routines schkaa.f dchkaa.f zchkaa.f cchkaa.f; inconsistency in the number of lines of the driver datafile 2011-12-21 01:03:29 +00:00
lipshitz 45a0830531 dqds, equivalent changes to single precision versions 2011-12-20 19:04:31 +00:00
james 52abf911e2 fixed. 2011-12-20 14:22:39 +00:00
julie d146d498ca Fix linking problem C and Fortran with Sun Compilers on Linux machine 2011-12-20 04:45:12 +00:00
lipshitz e5962daa53 In dqds, set shift to zero if it is insignificant compared to the cumulative shift, and set a d to zero if it is insignificant compared to the cumulative shift and the current shift is zero. This should guarantee that it always finishes in a linear number of iterations, without hurting accuracy at all. 2011-12-20 03:10:11 +00:00
julie bfe4d2eff2 Add end of line (Sun compiler was complaining) 2011-12-20 02:47:06 +00:00
julie 82da7c3203 Add name of LAPACKE library in make.inc 2011-12-20 02:14:29 +00:00
langou 2861ed0ff7 change a few "symmetric" in "Hermitian" 2011-12-16 18:47:29 +00:00
langou 074cbc801b corrects CSYEQUB (resp. ZSYEQUB) in CHEEQUB (resp. ZCHEEQUB) in the
documentation of cheequb.f (resp. zheequb.f)
2011-12-16 18:42:40 +00:00
julie 75af084e8a For Dashboard, set correct path to LAPACK rep 2011-12-14 20:28:51 +00:00
julie 3076651009 Fix bug bug0088 reported by Mike Pont from NAG on the forum
(see http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=2893)

This is related to the LAPACK-XBLAS routine: zherfsx.f

Here is what I did:
 - Introduce IINFO so that INFO is not overwritten
 - Use IGNORE_CWISE as suggested to prevent use of unitialize variable PARAMS
But this did not fix the problem reported.
INFO has new value in ZHERFSX (see description of INFO between ZHESVX and ZHESVXX)
This is set on line 634 (IF ( INFO .LE. N ) INFO = N + J) of zherfsx.f
And this is not handled by the testing LIN/zdrvhex.f
I just add  .AND. INFO.LE.N at line 638 to avoid raising an error when INFO = N + J

Please send feedback as I am not sure this is the best way to fix the issue.
I will commit other precision once fix approved.
Thanks
Julie
2011-12-10 06:45:16 +00:00
julie 758888bfa2 Modif call from xLA_RPVGRW to xLA_GERPVGRW
Routien Name was modified before.
2011-12-10 03:06:35 +00:00
julie 21fdf092e1 Add missing header, add Windows configuration, and more 2011-12-09 04:09:29 +00:00
julie 5ef1195b70 Make modifications to initialization to make Windows happy - LAPACKE example now runs fine 2011-12-09 03:52:18 +00:00
julie b4d7d47ea4 This time, I believe I catch them all... 2011-12-09 03:28:39 +00:00
julie cf33dba387 Some more and fix previous mistakes ... 2011-12-09 03:15:06 +00:00
julie f38c5d3c13 Put declaration before executable statment to respect ISO 99 standard (Windows compiler was barking) 2011-12-09 02:43:13 +00:00
james 2a41d09a42 corrected documentation 2011-12-08 23:55:05 +00:00
julie 5517e6dae1 Add Rook pivoting file in CMAKE 2011-12-08 23:51:37 +00:00
igor175 b91edba110 added object file entries for 'rook' pivoting algorithm to SRC/Makefile:
ssytf2_rook.o,  slasyf_rook.o, ssytrf_rook.o, ssytrs_rook.o, ssytri_rook.o, ssycon_rook.o, ssysv_rook.o  to SLASRC entry;
 dsytf2_rook.o,  dlasyf_rook.o, dsytrf_rook.o, dsytrs_rook.o, dsytri_rook.o, dsycon_rook.o, dsysv_rook.o  to DLASRC entry;
 csytf2_rook.o,  clasyf_rook.o, csytrf_rook.o, csytrs_rook.o, csytri_rook.o, csycon_rook.o, csysv_rook.o  to CLASRC entry;
 zsytf2_rook.o,  zlasyf_rook.o, zsytrf_rook.o, zsytrs_rook.o, zsytri_rook.o, zsycon_rook.o, zsysv_rook.o  to ZLASRC entry;
2011-12-07 17:24:50 +00:00
igor175 8e1b99e75b added double precision complex (COMPLEX*16) routines for rook pivoting algorithm for for symmetric indefinite matrices: zlasyf_rook.f zsytri_rook.f zsytrs_rook.f zsytrf_rook.f zsysv_rook.f zsycon_rook.f zsytf2_rook.f 2011-12-07 16:24:19 +00:00
igor175 0cc45e7727 fixed a typo in dsysv_rook.f, ssysv_rook.f, csysv_rook.f, replaced a call to *SYTRF by *SYTRF_ROOK 2011-12-07 15:11:32 +00:00
igor175 2adc1fc4f5 fixed a bug in csycon.f, changed the call to CLACN2 \n from CLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE ) \n to CLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE ) 2011-12-07 14:46:54 +00:00
igor175 c2552546f5 collapsed 2 lines of COMPLEX variable declarations into one line in clasyf_rook.f and csytf2_rook.f 2011-12-07 14:19:47 +00:00
igor175 3a4622a6c1 added standard precision (COMPLEX) routines for rook pivoting \\nalgorithm for symmetric indefinite matrices: slasyf_rook.f ssytri_rook.f ssytrs_rook.f ssytrf_rook.f ssysv_rook.f ssycon_rook.f ssytf2_rook.f 2011-12-07 12:52:24 +00:00
igor175 1e32dac881 updated comments in dsytri_rook.f and ssytri_rook.f 2011-12-07 12:45:06 +00:00
igor175 23dffa46c3 updated comments in dsysv_rook.f and ssysv_rook.f 2011-12-07 12:38:53 +00:00
igor175 b7342951d7 fixed comments in ssytrs_rook.f and dsytrs_rook.f 2011-12-07 10:45:15 +00:00
igor175 b81e2cec0a fixed comments in dlasyf_rook.f and slasyf_rook.f 2011-12-07 09:19:33 +00:00
igor175 ce40247db8 fixed comments in dsytf2_rook.f and ssytf2_rook.f 2011-12-07 09:14:09 +00:00
igor175 55d75b598e renamed DTEMP variable into STEMP in single precision routines ssytf2_rook.f slasyf_rook.f 2011-12-07 08:44:21 +00:00
igor175 73c5ccf3f8 added standard precision (REAL) routines for 'rook' pivoting algorithm for symmetric indefinite matrices: slasyf_rook.f ssytri_rook.f ssytrs_rook.f ssytrf_rook.f ssysv_rook.f ssycon_rook.f ssytf2_rook.f 2011-12-07 08:07:17 +00:00
igor175 1c5642102b changed the relational experssions in pivot search loop in dsytf2_rook.f to be the same as in dlasyf_rook.f. \n In particular, ROWMAX .EQ. COLMAX was replaced by the equivalent ( P.EQ.JMAX ).OR.( ROWMAX.LE.COLMAX ). This approach better handles NaN and Inf 2011-12-07 03:22:08 +00:00
igor175 c8a92cd4de added LAPACK driver dsysv_rook.f 2011-12-05 15:39:52 +00:00
igor175 134ad19d9c fixes to dsytri_rook.f 2011-12-05 14:28:12 +00:00
igor175 f14078a974 fixes to dsycon_rook.f 2011-12-05 14:00:00 +00:00
igor175 a494d1e927 fixes to dsytrs_rook.f 2011-12-05 11:59:35 +00:00
igor175 51aa48f35b fixes to dsytrf_rook.f 2011-12-05 09:56:22 +00:00
julie 3542df4eea Integrate LAPACKE into LAPACK make and CMAKE build system.
First commit, works on my mac! Need to see how to adapt to intel compilers and of course Windows.

LAPACKE is not built by default. Is that OK?
User need to type 'make lapackelib' to generate the lib
I add a couple of examples taken from MKL LAPACKE 'make lapacke_example'
2011-12-03 05:37:44 +00:00
igor175 4bb0911979 fixes to dlasyf_rook.f 2011-12-01 07:22:37 +00:00
james bcc9b0d09e fixed bug. 2011-11-30 17:24:24 +00:00
langou 19cd29a4fb Change RWORK description in the header. The RWORK array needs to be at least of
dimension 2*NMAX to accomodate the calls to CHESVXX in CDRVHEX, ZHESVXX in
ZDRVHEX, CSYSVXX in CDRVSYX, and ZSYSVXX in ZDRVSYX. (The dimension of RWORK in
the caller subroutines --, e.g., ZCHKAA -- is way large enough.)
2011-11-30 16:17:35 +00:00
langou c428e19df0 Patching LAPACK testing routines according to Mike Pont (NAG)'s forum post #2894.
http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=2894
2011-11-30 13:34:58 +00:00
igor175 40c9efd398 Fixes to dsytf2_rook.f 2011-11-29 11:08:24 +00:00
julie 4029478e7b Correct some more new lines in program - Thanks Igor for finding out the problem 2011-11-23 18:10:47 +00:00
igor175 aa7f417d78 fixed new lines in testing drivers source files 2011-11-22 03:04:51 +00:00
julie 1d5a514561 Update LAPACK version for CMAKE 2011-11-16 21:37:59 +00:00
langou 9ae8fa152c ********************************************************************************
From Ake Sandgren, Umea University and HPC2N, on 11-16-2011.

Hi!

stprfb.f has some unneeded external declarations

diff -ru site/SRC/stprfb.f p1/SRC/stprfb.f
--- site/SRC/stprfb.f   2011-10-22 18:49:03.000000000 +0200
+++ p1/SRC/stprfb.f     2011-11-16 09:30:22.000000000 +0100
@@ -246,7 +246,7 @@
     EXTERNAL  LSAME
*     ..
*     .. External Subroutines ..
-      EXTERNAL  SCOPY, SGEMM, SLACGV, STRMM
+      EXTERNAL  SGEMM, STRMM
*     ..
*     .. Executable Statements ..
*

********************************************************************************

Ake,

Thank you for catching this.  I will remove the unused external declarations.
The changes will be available from the lapack-dev svn server, and in the next
release.

Rodney

********************************************************************************
2011-11-16 16:03:59 +00:00
igor175 eee73b62e2 function call change from DSYTRS to DSYTRS_ROOK in DSYCON_ROOK 2011-11-14 18:02:55 +00:00
igor175 32c7650cfb added routines for bounded Bunch-Kaufman pivoting factorization algorithm in DOUBLE PRESCISION case:\n dsytf2_rook.f dsytri_rook.f dsytrs_rook.f dsytrf_rook.f dsycon_rook.f dlasyf_rook.f 2011-11-14 16:03:40 +00:00
julie ba4f3e59e4 Various change: add target to generate doc (man and html) and cleanup make.inc's 2011-11-11 21:08:04 +00:00
langou 891c3081b4 fixed 2011-11-11 20:18:50 +00:00
julie 403d9dcdfd Upadte info and date (testing are not included) 2011-11-11 20:15:00 +00:00
julie 2825d54e13 Add lapacke inside LAPACK 2011-11-11 20:12:14 +00:00
julie 84118d4efb Update version number to 3.4.0 2011-11-11 19:34:11 +00:00
julie 9e96fbee1f Correct bug 0065.
Replace Workspace calculations by calls to the routines with LWORK=-1.
This impacts only three routines: xGESVD, xGELSS, x[OR/UN]GBR
Testing have been run to check that the workspace size return is the same.

In a further effort (next major release probably), LAPACK will need to stick
to that LWORK=-1 rule to compute Workspace size.
2011-11-07 20:19:53 +00:00
julie 56c0804703 Change to ilaver to update doc 2011-11-07 20:15:25 +00:00
julie d7db507e71 Correct comments dor Doxygen 2011-11-04 20:05:18 +00:00
julie 1c3ba60067 Cosmetic changes in Doxygen presentation.
Use \par instead of \details for section.

add a Contributors Section and a Reference Section.
Remove (some) verbatim section when not needed.
Those changes have been done by hand so I am not sure I manage to catch them all.
2011-11-03 20:32:56 +00:00
julie d5c30c90bd Never say never... 2011-11-01 22:02:31 +00:00
julie 04670a6876 Last commit related to Doxygen integration following Albert's comment 2011-11-01 18:25:33 +00:00
julie 0d9e213c67 Correct Warning detected during Doxygen Generation.
Now each routine should have the correct list of arguments.
This allowed to detect and fix problems in parameter description of many routines.
2011-10-31 22:21:11 +00:00
julie 82901cd3e7 adding error checker for gejsv, they were missing - reported by Nadezhda Mozartova 2011-10-25 08:28:38 +00:00
julie a3ddf2b657 correction error checkers for sysv, posv, hesv, gbsv - reported by Nadezhda Mozartova (INTEL) 2011-10-25 07:17:15 +00:00
julie 4633d45bf3 add name of the routine before call 2011-10-25 07:05:50 +00:00
julie 11d2537893 Skip n=0 for rfp test to protect against div by zero - reported by Ake Sandgren on Oct 22nd on lapack mailing list 2011-10-25 07:01:05 +00:00
julie 4a95882685 Correct wrong filename 2011-10-13 11:20:19 +00:00
julie 2210bef7af adding link to individual download, the links will appear directly in Doxygen html documentation 2011-10-13 08:53:21 +00:00
julie d98817f250 fixing end of routine 2011-10-12 14:25:34 +00:00
julie 23e3bd7d23 set timeout to 36000 to enable test in quadruple prcision to finish 2011-10-12 13:24:32 +00:00
julie 5df9426cf6 fix problem detected by Sven
xerbla was called without SRNAMT and INFOT.
Actually the problem was that the CSD routines did not have error exits.
So I added them, and i also modified the source files because info was not set correctly.
2011-10-12 12:07:47 +00:00
julie 5dfdfeba7f fix undeclared variables introduced in rev1017:fix to Ming Gu's bug 2011-10-12 12:04:02 +00:00
julie fba1a13c7e Fix Problem in testing discovered with the LAPACK dashboard related to rev 983 2011-10-07 09:46:30 +00:00
julie eb0f83e01e Use cmake to copy files at installation time 2011-10-06 14:02:16 +00:00
julie e1d39294ae Integrating Doxygen in comments 2011-10-06 06:53:11 +00:00
igor175 5fe0466a14 Changes to the SRC/Makefile to fix bugs that affected 'make single', 'make double', 'make complex', 'make complex16' functionality. Specifically, DSLASRC was included as a dependency for single and double, and ZCLASRC as a dependency for complex and complex16. Also, a few modifications for the case when USEXBLAS is defined to enable 'make single', 'make double' etc. For more info refer to LAPACK-DEV google group 'LAPACK SRC/Makefile question?' thread. 2011-10-04 02:58:05 +00:00
lipshitz 3b27d3196c Fix to Ming Gu's bug in dqds. See post of LAPACK DEV message board for more details 2011-10-03 19:24:45 +00:00
igor175 0cd8057636 Per consultation with Julie, added ./testieee to main Makefile lapack_install target 2011-10-01 02:41:38 +00:00
igor175 12b935fd55 Format changes to INSTALL/Makefile 2011-10-01 02:37:03 +00:00
igor175 216ff89f71 deleted svn:executable SVN property on SRC/dgeqrt.f 2011-09-30 22:26:57 +00:00
julie 13acf3d65e Comments fix to be able to generate the new layout and the corresponding Doxygen documentation 2011-09-30 18:34:50 +00:00
igor175 d3718a28ef Refactored $(ALLOBJ) files in TESTING/MATGEN/Makefile and a few cosmetic changes 2011-09-30 02:23:37 +00:00
igor175 8dd2dca7de Reverting previous bad commit and going back to revision 1008 2011-09-30 00:03:50 +00:00
igor175 4e293f99ff convinience change to Makefile to clean BLAS directory from object files 2011-09-29 23:33:36 +00:00
julie 420085d7a5 Add the LAPACK library as dependencies for testing after Igor's comment.
This means that if you change one file, all testings will be rerun.

Should we be smarter than that?
2011-09-26 21:52:31 +00:00
julie 55890ddab9 Improve CMAKE BUILD system and OUTPUT PARSING when not all precisions are needed.
The following variables will control the precision to be built:
  BUILD_SINGLE
  BUILD_DOUBLE
  BUILD_COMPLEX
  BUILD_COMPLEX16

For mixed precision SINGLE/DOUBLE routines, both BUILD_SINGLE and BUILD_DOUBLE needs to be on.
(same for COMPLEX/COMPLEX16)
2011-09-23 19:50:27 +00:00
julie 46e1b19474 Commit patch sent by Sven.
Patch was based on 3.3.0, so required a little bit of merging.
Thank you Sven for the corrections.
Julie



JL
TESTING/EIG
zerrgg.f
Declare ILO, IHI

SRC
---
I have corrected all the following warnings and errors:

c/d/s/zsysv.f, Unused external reference ILAENV
>JL OK
c/d/s/zsysv.f, Unused local variable NB
>JL  ALREADY CORRECTED

sgsvj0.f, Unused intrinsic AMIN1
> JL OK

d/sorbdb.f, Unused intrinsic MIN
> JL OK

sorcsd.f, Unused intrinsic SIN
sorcsd.f, Unused intrinsic COS
> JL OK MERGE

cpoequb.f, Unused intrinsic AIMAG
cpoequb.f, Unused intrinsic REAL
cpoequb.f, Unused local variable ZDUM

zgeequb.f, REAL --> DBLE
> JL OK

sorcsd.f, line 330: Inconsistent data type REAL (previously INTEGER) for argument 14 in reference to SORBDB
sorcsd.f, line 340: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGQR
sorcsd.f, line 345: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGQR
sorcsd.f, line 356: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGLQ
sorcsd.f, line 363: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGLQ
sorcsd.f, line 369: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGLQ
sorcsd.f, line 374: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGLQ
sorcsd.f, line 385: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGQR
sorcsd.f, line 392: Inconsistent data type REAL (previously INTEGER) for argument 4 in reference to SORGQR
sorcsd.f, line 399: Inconsistent data type REAL (previously INTEGER) for argument 9 in reference to SBBCSD
> JL OK MERGE


ila(s/d/c/z)lr.f
In the WHILE loop, at about line 59 I inserted
IF (I.EQ.0) THEN
   EXIT
END IF
since, otherwise when I = 0, A(0,J) is referenced.
> JL OK

TESTING/MATGEN
--------------
s/dlatm7.f
line 187: I replaced
IF( N.GT.1 ) THEN
by
IF( N.GT.1 .AND. RANK.GT.1 ) THEN
Otherwise I get a division by zero.
> JL OK

s/dlaror.f
I moved:
INFO = 0
from line 125 to line 121 in front of
 IF( N.EQ.0 .OR. M.EQ.0 )
$   RETURN
otherwise INFO is not defined on return when N or M are zero.
Similar change for
c/zlaror.f
> JL OK

TESTING/LIN
-----------
s/derrsy.f
In calls to S/DSYTRI2: I replaced IW by IW(1) since the dummy argument
(LWORK) is a scalar.
> JL OK

c/zerrrfp.f
I made ALPHA and BETA REAL/DOUBLE and introduced COMPLEX/COMPLEX*16
CALPHA since calls to C/ZHFRK need real alpha and beta.  In calls to
CTFSM, I then replaced ALPHA with CALPHA.
In cerrrfp.f, I replaced 1.0D0 with 1.0E0 (not strictly necessary, but
cleaner).
> JL OK

dpot06.f
Removed the unused declaration of LSAME
> JL OK

d/zdrvac.f
Removed the unused declaration of LSAME
> JL OK MERGE

s/d/c/z/ckcsd.f
Removed the unused declarations of S/D/C/ZLANGE, SIN and COS
> JL OK

c/zgennd.f
Removed the unused variable OUT
> JL already DONE

Corrected the following warnings and errors:

dchksy.f, Unused local variable MYWORK
> JL already DONE

ddrvgbx.f, line 792: Different number of arguments from the first call of DGBT02
> JL OK

cdrvgbx.f, line 726: Inconsistent data type REAL (previously COMPLEX) for argument 4 in reference to CLASET
cdrvgbx.f, line 728: Inconsistent data type REAL (previously COMPLEX) for argument 4 in reference to CLASET
cdrvgbx.f, line 780: Inconsistent data type REAL (previously COMPLEX) for argument 10 in reference to CGBT01
cdrvgbx.f, line 794: Different number of arguments from the first call of CGBT02
> JL OK

zdrvgbx.f, line 726: Inconsistent data type DOUBLE PRECISION (previously COMPLEX(KIND(0d0))) for argument 4 in reference to ZLASET
zdrvgbx.f, line 728: Inconsistent data type DOUBLE PRECISION (previously COMPLEX(KIND(0d0))) for argument 4 in reference to ZLASET
zdrvgbx.f, line 780: Inconsistent data type DOUBLE PRECISION (previously COMPLEX(KIND(0d0))) for argument 10 in reference to ZGBT01
zdrvgbx.f, line 794: Different number of arguments from the first call of ZGBT02
> JL OK

TESTING/EIG
-----------
s/d/c/zchkee.f
I inserted
CALL XLAENV( 12, 1 )
at line 1208, since IPARMS(ISPEC) with ISPEC = 12 needs to be set.
(I think I had to do this with them all, certainly with zchkee.f)
> JL OK zchkee.f cchkee.f

c/zchkee.f
In line 2316, the 15th argument of C/ZCKCSD should be real, not complex,
so I replaced A(1,7) by RWORK.
> JL OK

c/zcsdts.f
In calls to C/ZHERK I have replaced ONE by REALONE as arguments 5 and 8
should be real.
> JL OK

s/d/c/zcsdts.f
Division by zero occurs at line 155 in computing EPS when M = 0, so I
have modified
 EPS2 = MAX( ULP, CLANGE( '1', M, M, WORK, LDX, RWORK ) / REAL( M ) )
to
 IF (M.GT.0) THEN
    EPS2 = MAX( ULP, 
$               CLANGE( '1', M, M, WORK, LDX, RWORK ) / REAL( M ) )
 ELSE
    EPS2 = ULP
 END IF
> JL OK

SRC/VARIANTS/lu/CR
------------------
s/d/c/zgetrf
Removed the unused intrinsic MOD
> JL OK
2011-09-23 15:26:46 +00:00
julie 839c47632c Commit pb in TESTING reported by Nadezhda (INTEL) on Aug 29th.
"We notice that errorcheckers tests aren’t correct in some cases.
errorcheckers of ?ggevx, ?pstrf, ?pstf2
Some output parameters are read only in the errorcheckers tests."
2011-08-30 15:24:06 +00:00
julie 095393a41c Correct Bug in the testing of CHERFSX function
reported by omitrofa (olga.mitrofanova@intel.com)
See Forum 2644

Test of CHERFSX function doesn't work because there is an error
in ../TESTING/LIN/cerrhex.f ( lines 284-330 ). 
This function uses the diagonal pivoting factorization of a Hermitian
indefinite matrix instead of the diagonal pivoting factorization of
a Hermitian indefinite packed matrix. When CHERFSX is included in
conditional "IF( LSAMEN( 2, C2, 'HE' ) ) THEN " the test works.
2011-08-15 20:53:17 +00:00
julie 46b5d7df01 Replace DOUBLE COMPLEX by COMPLEX*16
Replace SNGL by REAL
2011-08-15 18:25:57 +00:00
julie e6e99382cb Add missing files for GNU-built LAPACK DLLs with MS tools 2011-08-15 13:26:00 +00:00
james 830433cc32 test routines for new QRT subroutines:
xQRT04 tests xGEQRT and xGEMQRT
xQRT05 tests xTPQRT and xTPMQRT
2011-08-11 22:29:16 +00:00
julie c81b790f91 Commiting BRAD patch
Here is a patch for lapack to provide MS-format dll import libraries
from the MinGW GNU toolchain.  It is ready for others to try before it
goes upstream.  You just need to have MinGW GNU Fortran 4.x and one of
the VS IDEs installed.  Configure a MinGW build with BUILD_SHARED_LIBS
set to ON.  The resulting build (and install) tree will provide both
GNU-format and MS-format import libraries for the DLLs.

A C application built with MSVC and linked to the MinGW-built lapack
DLLs will run but requires the GNU runtime DLLs from MinGW to be available.
I tested this with both 32-bit and 64-bit builds.  For the latter I used
the mingw64 gfortran.  In both cases I just put the GNU runtime directory
in my PATH.  I think both libgfortran-3.dll and libgcc_s_dw2-1.dll are
needed.

This may be used to create a binary LAPACK distribution for Windows that
will work without any GNU tools installed.  One needs only to provide the
MinGW GNU runtime libraries along with blas.dll and lapack.dll.

-Brad
2011-08-09 18:59:44 +00:00
james 3e15d21f62 added new QRT routines to object lists 2011-08-09 01:17:34 +00:00
james 1cb631b23a QR factorization for triangular-pentagonal matrices
(generalization of triangle-over-square and triangle-over-triangle)
2011-08-08 22:07:49 +00:00
james ccebfeaeba QRT (QR factorization with compact WY representation for Q) routines for general matrices 2011-08-08 21:59:06 +00:00
julie 27164edcec CHANGE IN THE SCRIPT:
lapack_testing.py has been moved to the top directory
One argument was added :
     - d [dir] is to indicate where is the LAPACK testing directory (.out files). By default, the script will use .-d or --dir to 
The -f argument was replaced by -r argument. Now by default the script will use the LAPACK output.
     - r is to use to run the LAPACK tests then analyse the output (.out files). By default, the script will not run all the LAPACK tests

INTEGRATION:
Integration of the LAPACK Testing parsing in the Makefile and CMake build process.

In the Makefile build: now the lapack_testing target will call the script after running the tests
In the CMAKE build: after the tests are run, the script will be executed with the option -s (short)
the end of the output will look like this:
100% tests passed, 0 tests failed out of 98

Total Test time (real) = 211.83 sec
SUMMARY                 numerical error         other error  
================        =================       ================  
REAL                    40      (0.004%)        0       (0.000%)
DOUBLE PRECISION        202     (0.020%)        0       (0.000%)
COMPLEX                 2       (0.000%)        0       (0.000%)
COMPLEX16               28      (0.005%)        0       (0.000%)

--> ALL PRECISIONS      272     (0.009%)        0       (0.000%)
2011-06-28 08:07:35 +00:00
julie 6470158d34 merge errors for number only mode 2011-06-27 13:22:47 +00:00
julie 8f12e198a4 Add Julien's suggestions 2011-06-27 13:05:59 +00:00
langou ce2a9dfad8 [ minor edits ]
suggestions:

1) combine Illegal Error and Info Error as one number in the SUMMARY

2) give % values in addition in the SUMMARY, something like: 203 (.01%)
2011-06-24 13:31:01 +00:00
julie b39d1348c9 First try to get a nice script to analyze the LAPACK testing.
Below is the help that goes with it.
Please send feedback. I tired to include several levels of output and several kind of errors
So far, I just tested it on my machine, that has no major problems.
I just tested "numerical errors", not "illegal error" neither "info error".

The goal is to have our nightly testing use it and also users.

TO DO:
  - Test other kinds of errors on machines
  - See to include it in ctest and buildbot (need to contact Don and Brad/Chuck)
  - See if a type of error option is required.


./lapack_testing.py [-h|--help] [-s |--short] [-f |--file] [-e |--error] [-p p |--prec p] [-t test |--test test] [-n | --number]
     - h is to print this message
     - f is to use directly the output of the LAPACK testing (.out files). By default, the script will run all the LAPACK tests
 LEVEL OF OUTPUT
     - x is to print a detailed summary
     - e is to print only the error summary
     - s is to print a short summary
     - n is to print the numbers of failing tests (turn on summary mode)
 SECLECTION OF TESTS:
     - p [s/c/d/z] is to indicate the PRECISION to run:
            s=single
            d=double
            c=complex
            z=double complex
            x=all [DEFAULT]
     - t [lin/eig/mixed/rfp/all] is to indicate which TEST FAMILY to run:
            lin=Linear Equation
            eig=Eigen Problems
            mixed=mixed-precision
            rfp=rfp format
            all=all tests [DEFAULT]
 EXAMPLES:
     ./lapack_testing.py -n -f
            Will return the numbers of failed tests by analyzing the LAPACK output
     ./lapack_testing.py -n -f -p s
            Will return the numbers of failed tests in REAL precision by analyzing the LAPACK output
     ./lapack_testing.py -n -f -p s -t eig 
            Will return the numbers of failed tests in REAL precision by analyzing only the LAPACK output of EIGEN testings
Written by Julie Langou (June 2011)
2011-06-24 08:46:19 +00:00
james 48544278b3 Added N*N to LWEDC (and LRWEDC for complex cases) to reflect updated LWORK requirements (see commit r984 in SRC). 2011-06-22 13:37:15 +00:00
julie b5a7b4eb58 Update the name change (rev 985) for the CMAKE build 2011-06-22 11:50:43 +00:00
julie ab0c98093a Following Yana Gurieva (INTEL) 's comment
"Why does Lapack have the routines named ?la_rpvgrw if they are intended for general matrices? Should not their names be ?la_gerpvgrw instead?"

THIS IS THUS A CHANGE IN INTERFACE
2011-06-22 11:49:32 +00:00
james 03c6181030 added an additional "N*N" to xSTEDC workspace "WORK" to correct problem with LWORK being too small in some cases in the 'V' option when eigenvectors are computed for the dense matrix. 2011-06-22 11:27:16 +00:00
julie 0d0b443c69 Summer cleanup
Cleanup some codes, like unused variables.
Used -Walls to detect problems.
2011-06-22 09:45:40 +00:00
james ffd034b32b Added IF statement to prevent potential out of range errors with "K+1" indices. 2011-06-21 18:59:51 +00:00
langou f82b1646d3 For Yana Gurieva (Intel), see forum post 2508 on Tue Jun 7th, 2011.
Typo in the description of cla_porcond_c and cla_porcond_x.
( zla_porcond_c and zla_porcond_x are good, just the c versions have the typos.)
2011-06-07 09:11:05 +00:00
langou ce74c9c3b3 See post on the forum 2501 of Yana Gurieva from Intel. This fixes some typos
in the comments about the **T and **H.  Proof that it was a good idea to make
clear what this $#@! "A'" meant. (In this case it was used to mean either A**T
in the case of cgtsv or A**H in the case of claqsb.)
2011-06-02 18:30:26 +00:00
julie d935fdd490 Correct a workspace requirement comment in cbdsqr and zbdsqr
For case 1, the routine will call DLASCL that requires a 4*N workspace.

Following a bug report from Hatem:

I am calling this function to only compute the singular
values from the bidiagonal matrix I just got after the 2nd stage.
The function comments say that the workspace should be 
case 1: 2*N if NCVT = NRU = NCC = 0 (basically no singular vectors computed)
case 2: 4*N-4 otherwise.
I allocated the corresponding size for work in my program (i.e. 2*N) and
call the lapackE interface of this function (LAPACKE_zbdsqr_work).
And I get a "double free or corruption (!prev)" when I deallocate
work.
When I call instead LAPACKE_zbdsqr (I let the wrapper
now doing the allocation of work), it passes.
I looked inside LAPACKE_zbdsqr to check the size of work and
it seems to be 4*N across the board (for both cases 1 and 2).
Now, if I call back LAPACKE_zbdsqr_work and I allocate work
using 4*N, it passes.
Is it a bug?
Thanks for your time,
Hatem
2011-05-19 14:46:50 +00:00
julie 4f76bcc136 Correction for Tobias.
To get the manpages correcty generated.

From Tobias:
|RPMLINT prints the following warning - and I think it is correct that 
Fortran's .NOT. is misread as NOT. macro.

Tobias

RPMLINT report:
===============
lapack-man.noarch: W: manual-page-warning 
/usr/share/man/man3/slaqr3.3.gz 351: warning: macro `NOT.BULGE' not defined
lapack-man.noarch: W: manual-page-warning 
/usr/share/man/man3/dlaqr3.3.gz 351: warning: macro `NOT.BULGE' not defined
lapack-man.noarch: W: manual-page-warning 
/usr/share/man/man3/lsametst.3.gz 53: warning: macro `NOT.LSAME(' not 
defined
lapack-man.noarch: W: manual-page-warning 
/usr/share/man/man3/slaqr2.3.gz 317: warning: macro `NOT.BULGE' not defined
lapack-man.noarch: W: manual-page-warning 
/usr/share/man/man3/dlaqr2.3.gz 317: warning: macro `NOT.BULGE' not defined
This man page may contain problems that can cause it not to be formatted as
intended.|
2011-05-18 08:27:36 +00:00
james 654407606d fixed problems with zero matrix and scan 2011-04-21 22:00:11 +00:00
julie 13397e1419 Apply Sebastien Fabbro patch for the cmake build.
"Two more fixes for the cmake files of lapack-3.3.1:
1) syntax consistency for BLAS_LIBRARIES
2) link lapack with xblas when xblas is enabled"
2011-04-20 23:13:17 +00:00
julie fbf8f2f4ea Update the comment of ABSTOL according to Sven's recommendation 2011-04-19 20:17:47 +00:00
julie d9fba55f33 Update ilaver and make.inc to 3.3.1 2011-04-18 20:00:50 +00:00
julie c3c0b30144 Update Version Number in CMAKE 2011-04-15 16:09:49 +00:00
julie 6eb3332a8f Update README for 3.3.1 2011-04-14 15:21:30 +00:00
julie dd795d2903 Upadte header for the modified routine for the 3.3.1 release 2011-04-13 16:30:39 +00:00
julie 16973f0c15 Second and hopefully last pass to homgenize notation for transpose (**T) and conjugate transpose (**H)
Corresponds to bug0024

Please take a look and let me know if you find some old notation of transpose.
I am going to close bug0024.
Julie
2011-04-07 13:53:54 +00:00
james 8b5dd5433b decreased EPS by a factor of 0.9 to correct problem with orthogonality of U in certain cases 2011-04-07 12:30:43 +00:00
julie b7b9415fcd Correct bug0077 : [DS]GESVD Minimum Worksize comments need clarification
Depending on the PATH, the minimum workspace is not the same.
2011-04-05 15:16:30 +00:00
julie d9d50d133b First pass for BLAS to homgenize notation for transpose (**T) and conjugate transpose (**H)
Corresponds to bug0024
2011-04-02 11:46:46 +00:00
julie f2953573ed First pass to homgenize notation for transpose (**T) and conjugate transpose (**H)
Corresponds to bug0024
2011-04-02 11:08:56 +00:00
julie 53b71f5605 While looking if bug0022 was corrected, found that some comments were not updated
bug0022 was indeed corrected by Zlatko
2011-03-17 16:41:08 +00:00
julie 1767365dbf Remove GO TO STATEMENT in DROTMG/DROTM and SROTMG/SROTM.
Incorporate OLD Testings from ACM Collected algorithms : algorithm 539 
for:
   - DROTMG/SROTMG
   - DROTM/SROTM
   - DSDOT / SDSDOT

All BLAS routines are now tested.
Now up to us to change the BLAS but at least this is consistent.
2011-03-16 22:52:01 +00:00
julie e9dac1f3c4 Remove the easy GO TO statments....still 13 to remove in drotm.f and 36 in drotmg.f 2011-03-10 23:33:40 +00:00
julie 1923c69f7e Formating code, use of * for comment, and follow other LAPACK style 2011-03-10 19:09:21 +00:00
james 86579dddaf Added missing Further Details description of V (copied from xLARFT) 2011-03-08 21:01:45 +00:00
julie a300372e37 Remove multiple definition of cpotrs 2011-03-07 15:11:26 +00:00
julie 8dcfef49b8 Added compiler options needed for HP Fortran
- Chuck Atkins (Kitware)
2011-03-06 20:02:06 +00:00
julie b860077bc7 Correct bug 0076 reported by Intel Team on lapack forum
Problem in ?(sy/he)tri2 was found.

For matrices with small N subroutine pass parameter NBMAX to ?(sy/he)tri2x which could be large than N.
In test for this functionality this is hide. Local test subroutine ilaenv.f pass proper values of NB. But if use ordinary ilaenv we will get mistake.

If we implemented

IF ( NBMAX .GE. N ) THEN
MINSIZE = N
ELSE
MINSIZE = (N+NBMAX+1)*(NBMAX+3)
END IF

and will call 

IF( NBMAX .GE. N ) THEN
CALL SSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
ELSE
CALL SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NBMAX, INFO )
END IF

the problem will be solved.


Some other minor changes on workspace query.
2011-03-04 20:44:21 +00:00
julie 472bfdccf7 Correct Workspace Query to make sure we return the max of LWORKOPT and LWORKMIN 2011-03-03 23:14:53 +00:00
julie adc144b1c1 Correct and Add Error exit tests for *errtz
Test the case where N=M (Workspace should be 1), so put LWORK at 0 to make it failed
Test the case where N!=M (Workspace should be more than MAX(1,M)), so put M=2, N=3 ans LWORK at 1 to make it failed

Correct some typos in [dz]drgsx testings.
2011-03-03 23:13:58 +00:00
julie 779f0da239 One more workspace problem fixed... 2011-03-03 22:33:51 +00:00
julie 183a636b9a The c generated code should be better now 2011-03-03 21:09:29 +00:00
julie c555ef8f83 Fix some workspace query problems found with the new interface 2011-03-03 21:02:22 +00:00
james c72cd03194 replaced "do/exit" scan logic with do while loop
fixes bug0075 and bug0035
2011-03-03 20:04:03 +00:00
julie 80d8279841 Added warning suppressions for the Intel compiler on Windows
- Chuck Atkins (Kitware)
2011-02-28 04:11:45 +00:00
julie 7847ac8fb5 Wrapped lines that extended past 72 columns
- Chuck Atkins (Kitware)
2011-02-28 03:42:25 +00:00
julie 04c69903f0 Corrected a typo in the output message when setting optimization level
- Chuck Atkins (Kitware)
2011-02-26 21:49:14 +00:00
julie 2bbd1ad6d5 Re-worked type-size checks to search for differnt sizes for different types
- Chuck Atkins (Kitware)
2011-02-26 20:51:01 +00:00
julie 3e6afae0ef Added a status message when using the supplied NETLIB BLAS
- Chuck Atkins (Kitware)
2011-02-26 20:50:37 +00:00
julie f19fb4ee33 Recude RELEASE optimization level from O>3 to O2
- Chuck Atkins (Kitware)
2011-02-26 20:49:40 +00:00
james 27bef224d9 changed matrix norm to 'M' (max) from 'I' (inf) for scaling of input matrix
and added check for zero norm in xSTERF (the xSTEQR already had this check)
this fixes the issue reported in bug0036
2011-02-24 21:12:23 +00:00
james dc06e1f1e9 removed confusing comments about JMAX, resolves bug0034 2011-02-17 20:14:14 +00:00
james 5eee138e42 removed confusing comments about JMAX, resolves bug0034 2011-02-17 20:10:22 +00:00
james f40d00741b fixes bug0027: removed incorrect description of output of H (they are not in standard form) 2011-02-17 16:50:30 +00:00
julie 4fcd897e1a Correct precision generation problem 2011-02-09 19:55:15 +00:00
julie 1653528c2b Fix bug 0074
Post from Alexander Kobotov (INTEL)
In LAPACK 3.3 ?(SY/HE)SV are updated to use TRS2.
The TRS2 requires WORK(N) to operate, whereas in SV requirements for LWORK just to be >=1.
There is no any check in SV if LWORK>=N, the array WORK just passed as it is to TRS2.
So if LWORK<N a crash could occur while executing TRS2 due to overuse of allocated workspace.

I guess for the case of LWORK<N just previsous Level2 based ?(SY/HE)TRS should be used.
2011-02-09 19:45:09 +00:00
julie 25a1c9440f Fix Bug 0073: [Re] Add dummy routine in timer to avoid compiler problem
Bug reported by John Tellefson to LAPACK Mailing List on February 7th.
Dummy routine was removed in LAPACK 3.3.0 because it seems it was working on all machines.
[Re] Incorporation of the dummy routine and incorporate John's suggested cosmectic changes to allow 
an easier change in number of operation to perform.

"modified secondtst.f from lapack-3.2.2 with the old 
code that makes it reliably report timing loop results. I also added a 
variable TOTAL to simplify changes in setting array size and iterations 
which affect total flops and made few other changes.
2011-02-07 18:00:27 +00:00
julie 641e64e1e6 Move CMake files to a subdirectory
- Brad King (Kitware)
2011-02-07 14:54:28 +00:00
julie f98cca3e85 Link tmglib test library to lapack
The library uses symbols from lapack and so should link to it.
Previously this was not noticed because static libraries do not
really link and the test executables link to lapack anyway.

- Brad King (Kitware)
2011-02-07 14:54:24 +00:00
julie b71aa51528 Organize binaries into bin and lib directories
Put executables under 'bin' and libraries under 'lib'.  This is needed
on Windows with shared library builds to put the .dll and .exe files
together for running tests without setting PATH.

- Brad King (Kitware)
2011-02-07 14:54:21 +00:00
julie 1b76a1d5cf Restore CMake packaging removed in r858
- Brad King (Kitware)
2011-02-07 14:54:19 +00:00
julie cacffd1edf Revert "Restore CMake packaging removed in r858"
This reverts commit e725dc754dd87ed45f21ba6981fca6dbc0530aa3.
2011-02-07 14:54:16 +00:00
julie 3d210f23ba Revert "Organize binaries into bin and lib directories"
This reverts commit e3b5f531553c176a009f41b6a312b0c11b955fd6.
2011-02-07 14:54:14 +00:00
julie 3ba7ca74f0 Revert "Link tmglib test library to lapack"
This reverts commit 5070d8d0b7690496561a26f5849d6f80a8727d93.
2011-02-07 14:54:11 +00:00
julie 310741c073 Revert "Move CMake files to a subdirectory"
This reverts commit bc425c443232cf9737afcce38753f79963d31e0a.
2011-02-07 14:54:09 +00:00
julie efbb122baf Move CMake files to a subdirectory 2011-02-07 14:37:01 +00:00
julie f94d9bdfeb Link tmglib test library to lapack
The library uses symbols from lapack and so should link to it.
Previously this was not noticed because static libraries do not
really link and the test executables link to lapack anyway.
2011-02-07 14:36:57 +00:00
julie 08139a6693 Organize binaries into bin and lib directories
Put executables under 'bin' and libraries under 'lib'.  This is needed
on Windows with shared library builds to put the .dll and .exe files
together for running tests without setting PATH.
2011-02-07 14:36:54 +00:00
julie 98cd5df5c3 Restore CMake packaging removed in r858 2011-02-07 14:36:50 +00:00
julie 0b883f9b2c Fix bug 0072 reported by Inge Gutheil on February 3rd 2011
From Inge:
In the tests,
TESTING/EIG/cchkhs.f (similar in zchkhs.f) in line 492 N = NN ( JSIZE )
is set. If NN( JSIZE ) is zero, CCOPY (N-1,....) gives an error message
and the test breaks. In the real versions dchkhs after N = NN ( JSIZE )
there is
IF ( N .EQ. 0 ) GO TO 270, so there DCOPY does not exit with an error
message.
I think the same statement should be added in the complex version to
avoid copying -1 element.
2011-02-03 18:28:38 +00:00
langou 2f5de047b6 Change from Christof (Voemel) sent on Mon, 31 Jan 2011.
*********************************************************************
change
         IF( USEDQD ) THEN
*           The initial SIGMA was to the outer end of the spectrum
*           the matrix is definite and we need not retreat.
            TAU = SPDIAM*EPS*N + TWO*PIVMIN
         ELSE
into
         IF( USEDQD ) THEN
*           The initial SIGMA was to the outer end of the spectrum
*           the matrix is definite and we need not retreat.
            TAU = SPDIAM*EPS*N + TWO*PIVMIN
            TAU = MAX( TAU,TWO*EPS*ABS(SIGMA) )
         ELSE

that is, with an added line to prevent TAU from becoming zero
            TAU = MAX( TAU,TWO*EPS*ABS(SIGMA) )
*********************************************************************

Thanks Christof!
2011-01-31 18:27:33 +00:00
julie 932dcade9c Fix bug0070 : IWORK dimension is incorrect
bug report sent by nmozarto on Jan 27th
  see forum topic 2156
 
From Brian:
 The correct dimension is (M-R), in which R is the smallest of P, M-P, Q, and M-Q.
 An M-by-M matrix is partitioned into a 2-by-2 block structure. The
 dimensions of the blocks are P-by-Q, P-by-(M-Q), (M-P)-by-Q, and
 (M-P)-by-(M-Q). IWORK is involved in the permutation of rows or
 columns of these blocks, and it is the largest block, in terms of
 number of rows or columns, that determines the size of IWORK.
2011-01-31 16:14:51 +00:00
julie 318f35554e Correct bug0069
Bug was sent by nmozarto on Jan 27th (see forum topic 2156)

Problem in new function ?SYTRI2 was found: the part of A below the diagonal is changed in the case UPLO='U' .
But in the description of arguments 
If UPLO = 'U', the upper triangular part of the
inverse is formed and the part of A below the diagonal is not
referenced; if UPLO = 'L' the lower triangular part of the
inverse is formed and the part of A above the diagonal is
not referenced.

These elements zeroized after calling ?GEMM function in ?SYTRI2X.
CALL SGEMM('T','N',NNB,NNB,CUT,ONE,A(1,CUT+1),LDA,
$ WORK,N+NB+1, ZERO, A(CUT+1,CUT+1), LDA)
2011-01-28 23:04:40 +00:00
julie b472675224 Same for hetrs2 routines 2011-01-27 14:25:04 +00:00
julie 8e844f51fe Follow-up: fix for new routines to handle LDA
See bug0067
2011-01-27 14:21:35 +00:00
langou 890ff5ee9c 1) Je viens de modifier le fichier timer_dsytri2.c de telle sorte a ce qu'il
traite les matrices avec des lda.
Exemple: 

	> gfortran timer_dsytri2.c /Users/langou/Documents/lapack-dev-trunk.svn/lapack_LINUX.a -framework vecLib
	> ./a.out -U -lda 1079 -n 100
	DSYTRI2 info=0, check=1.891597e-14
Dispo dans ldlt.git. Marche bien. Upper ou Lower. LDA different de N ou pas. Le
check est 
	|| A . inv(A) - I || / || A ||
(Je pense que il faut diviser par || A || * || inv(A) ||, pas tres important.)

2) Du coup, dans ce commit, je rectifie tous les codes. Cela compile. Je n'ai
pas verifie les testings. Je n'ai pas ecrit de driver pour verifier. (Le driver
n'est que pour la version DOUBLE.)

JL
2011-01-26 14:02:05 +00:00
langou 99c4971bd8 bon maintenant, ca compile ... (desole) 2011-01-26 05:49:27 +00:00
langou d267cb5ed4 J'ai lu le code vite fait. Comme ca, ca devrait marcher. Je n'ai pas verifie.
Je n'ai meme pas essaye de compiler en fait. En gros mettre LDA en parametre,
definir A comme etant A( LDA, N ) et pour l'increment du swap mettre LDA a la
place de N quand tu travailles sur les lignes. Donc c'est tout con. 

Donc il faut ecrire un driver qui teste ca avec une LDA differente de N ... Et
appliquer les modifications aux autres routines CHE, CSY, ZHE, ZSY et SSY.

Sinon pourquoi dans DSYSWAPR, est ce que tu utilises DSWAP de temps en temps,
et de temps en temps tu le fais a la main?  Je n'ai pas regarde les details.

JL.
2011-01-26 05:47:42 +00:00
julie 0c127da695 Include Zlatko changes following Paul Roberts from NAG report
Message from Zlatko:

The following changes are made in the
current version of the code:

1. in dgejsv, sgejsv:

- a typo in checking the parameters LSVEC.OR.LSVEC
  has been changed to LSVEC.OR.RSVEC
- the length of WORK, LWORK, its description
  and the minimal length for different JOBs
  have been revised and corrected
- in a call to xGESVJ with WORK(N+1), the length
  of the workspace is set to the correct value of 
  LWORK-N, instead of the incorrect LWORK
- a missing RETURN after a call to XERBLA
  has been inserted
- In the case of zero matrix on input, IWORK(3)
  is set to ZERO, to correspond to the description
  of IWORK in other nontrivial cases
2. in all routines
- simple editing so that the single and
  the corresponding double routines have matching
  lines in the source codes.
2011-01-25 22:02:14 +00:00
julie c4e5f2da72 Correct multiple definition in the lapack lib (See forum topic 2099 - Bruno) 2011-01-24 20:05:41 +00:00
julie d1e13ae046 Adding new hetri routines 2011-01-20 17:33:46 +00:00
julie 69dafd0e92 Remove the last compiler directive 2011-01-13 12:05:18 +00:00
julie eae5157da6 Remove outdated compiler directives 2011-01-12 17:34:06 +00:00
julie e057a1ba80 Suppress warning because of undefined variable 2011-01-11 14:10:14 +00:00
julie b7429d4085 Suppress a warning from SUN compilers when building exclusively for your native
platform.

- Chuck Atkins (Kitware)
2011-01-09 19:30:36 +00:00
julie ecdfdc8fb0 Suppress harmless linker warnings on IRIX + MIPSpro
- Chuck Atkins (Kitware)
2011-01-08 16:13:32 +00:00
julie fc22ffe70d Removed output truncation on ctest submissions.
- Chuck Atkins (Kitware)
2011-01-05 03:28:27 +00:00
julie bb3a2fda59 Fix object needed for targets in CMAKE build 2011-01-04 20:03:34 +00:00
julie 3a39267fb0 minor fix following compiler warnings: remove unused variable and change digit output format 2011-01-04 19:59:16 +00:00
julie 6cb10ef589 minor fix: add comment to warn that vector and matrix arguments are not referenced when N = 0, or M = 0 2011-01-04 19:58:09 +00:00
julie 8326a972ee Re-worked the type size check to be much more compact
- Chuck Atkins (Kitware)
2010-12-31 01:33:24 +00:00
julie 1a1c5a44df Added acml_mv to the ACML link libraries
- Chuck Atkins (Kitware)
2010-12-30 23:11:32 +00:00
julie c541fcd909 1. Adjusted regex checks in CheckLAPACKCompilerFlags.cmake to be more compact
2.  Added CheckFortranIntSize.cmake to auto-determine the default integer size
3.  Added more auto-detection features using integer size and compiler checks in FindBLAS.cmake

- Chuck Atkins (Kitware)
2010-12-30 22:14:10 +00:00
julie 3e21518c0e Display the test's output to stdout after a run so it can be viewed on the dashboard.
- Chuck Atkins (Kitware)
2010-12-24 21:38:46 +00:00
julie 8146c9b43f 1. Fixed a typo in FindBLAS for SGI (SCCL should have been SCSL) and 2. Fixed compiler flag check for SunPro to use ftrap=%none instead of ftrap=none.
- Chuck Atkins (Kitware)
2010-12-24 15:29:47 +00:00
julie 7f144b46d4 1. Added support for both IBM XL Fortran and IBM VisualAge Fortran
2.  Added libblas to ESSL libs to cover missing functionality from ESSL
3.  Renamed ESSL_6464, ESSL_SMP, and ESSL_SMP_6464 to ESSL6464, ESSLSMP, and ESSLSMP6464 respectively to mimic the actual library names.
4.  Added copyright notice to CheckLAPACKCompilerFlags

- Chuck Atkins (Kitware)
2010-12-23 02:32:05 +00:00
julie 1c2620a72f Fixed a bug in the IBM compiler options (-ffixed-form -> -qfixed).
- Chuck Atkins (Kitware)
2010-12-23 00:50:18 +00:00
julie 7c3ad4800f Added checks disable floating point exceptions for GNU, Intel, Sun, and IBM compilers and to enforce fixed-form for IBM compilers.
- Chuck Atkins (Kitware)
2010-12-23 00:39:05 +00:00
julie c6db164e8d Fixed FindBLAS for Sun Performance Library
- Chuck Atkins (Kitware)
2010-12-21 02:11:49 +00:00
julie 96a5907fbc Added a CTestCustom.cmake file to filter unwanted files from code coverage and suppress harmless warnings on the dashboard.
- Chuck Atkins (Kitware)
2010-12-20 22:54:32 +00:00
langou 20d3177888 Adding Peng Du's name in the authors of the variants. 2010-12-17 00:09:40 +00:00
julie 046375a08f 1. Corrected the way linker flags from FindBLAS are being used
2.  Changed LOOK_FOR_OPTIMIZED_BLAS to USE_OPTIMIZED_BLAS per CMake convention
3.  Changed BLAS_VENDORS to use library names instead of manufacturer names:
    From: BLAS_VENDORS=AMD;IBM;INTEL;HP;SUN etc
      To: BLAS_VENDORS=ACML;ESSL;MKL;VECLIB;PERFLIB
    This seems to be a more intuitive interface
4.  Added support for Intel MKL single dynamic library

- Chuck Atkins (Kitware)
2010-12-16 15:12:27 +00:00
julie 0d5645bfec Merge some of Sebastien Fabbro's patch for CMAKE 2010-12-15 18:44:42 +00:00
julie 141210af9c Added compiler flags from FindBLAS. 2010-12-15 18:42:50 +00:00
julie 1ab7dfd850 minor modif on find BLAS 2010-12-15 18:08:26 +00:00
julie fc27aaf2d3 Removed leftover debug messages from FindBLAS.cmake 2010-12-15 16:58:32 +00:00
julie bbc02626a5 Added support for external BLAS libraries in the CMake build. 2010-12-15 16:48:25 +00:00
langou ea0abcb747 undoing my check, sorry 2010-12-14 07:17:24 +00:00
langou 94a5959f16 this is a test 2010-12-14 07:16:58 +00:00
langou 1e88537186 New license file as agreed by email.
NB: license does not change. Copyright holders change. 
(Adding UCDenver and UCBerkeley.)
2010-12-13 19:10:19 +00:00
julie 8ca3c51357 Follow rencang's recommendation to fix bug 0064, set MAXIT to 64
Email from rencang:
"I have to clarify that the code does not do strict bisection. It uses bisection as the fall back when the computed approximation somehow gets out of the interval that the approximation should be in. Then one step of bisection is taken and then it goes back to the usual Newton-like method again (because that's faster). The interval is updated every step and thus shrinking. Xlasd4 was handled similarly.

Setting MAXIT=20 was too aggressive by my side as we know now. MAXIT=64 may be too conservative. Perhaps we should set MAXIT=40. If that breaks in the future, I'd really like to revisit the code. But if we'd like to play it safe, your suggested 64 would be the best bet."
2010-11-29 20:17:43 +00:00
julie bf1f0449f1 Fix line length 2010-11-17 22:57:18 +00:00
julie 1fdf39f499 Fix typo in external routine name 2010-11-17 22:10:50 +00:00
langou f502912258 correct indentation 2010-11-14 15:46:03 +00:00
langou b0f66356a7 imporve (?) comments 2010-11-14 15:35:07 +00:00
langou 1f36608a7a typos 2010-11-14 15:21:05 +00:00
julie 34e045d01d Correct memory access in CSD found with -fbounds-check flag 2010-11-13 15:50:45 +00:00
julie fcebd69730 polish comments
correct final iteration in the lower case.
Teststing are fine now with the  -fbounds-check options.
2010-11-13 11:04:49 +00:00
brian 84d4f2a616 2010-11-10 23:11:43 +00:00
langou 0d8a6de04b update 2009 to 2010 in some files 2010-11-10 22:33:07 +00:00
julie f084f12180 Start getting ready for the release 2010-11-08 20:15:23 +00:00
julie ae40eacfe6 Update CMake build 2010-11-08 11:02:29 +00:00
julie 5f269f9f64 fix again some COMPLEX instead of CMPLX 2010-11-07 20:15:40 +00:00
julie 3df789059a fix again some COMPLEX instead of CMPLX 2010-11-07 19:50:01 +00:00
julie 811fbdb838 Fix a minor problem on csd - intrinsic function is CMPLX and not COMPLEX (same for double precision) 2010-11-07 18:30:58 +00:00
julie e9718dbb16 Correct bug0064 :: got a bug in divide and conquer (non convergence)
o see http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=529 (forum topic 529)
    o Increase MAXIT to 200 (was 20 before)
    o Add some XERBLA calls when INFO is not zero.
2010-11-07 18:08:29 +00:00
brian 33cb046512 Incorporated CSD source and testing routines into SRC/Makefile, TESTING/Makefile, TESTING/EIG/Makefile, TESTING/EIG/xchkee.f; changes to comments in CSD routines 2010-11-04 02:11:45 +00:00
brian 736b6a7ff1 Removed nonexistent fourth matrix type from CSD test routines and csd.in 2010-11-04 01:12:34 +00:00
brian 508277c0ba Modified TESTING/EIG/alahdg.f to test CS decomposition code 2010-11-04 00:46:07 +00:00
brian 21041e7b49 Added CS decomposition test files to TESTING 2010-11-03 23:07:29 +00:00
brian 4ca2feaf79 Added CS decomposition source files to SRC/ 2010-11-03 23:02:29 +00:00
julie 1237a0d5b7 Commiting the 3 other precisions (single, complex, dcomplex) for sytri using Level BLAS 3.
Update testing accordingly
2010-11-03 17:55:43 +00:00
julie 9205713fbc [xSYTRS/xSYSV] Hide the call to syconv inside trs2 to avoid changing the SYTRS interface.
Update the testing accordingly

 [DSYTRI2]      Comit dsytri2 to get some feedback
                Update the testing accordingly
                
DSYTRI2 is the Level 3 blas Version of DSYTRI
The actual routine that does the work is DSYTRI2X (name can be changed)
DSYTRI2 is just a wrapper to allow to hide the 2D Workspace required by the routine.
The interface had to be changed to integrate the possibility of doing a workspace query.
DSYTRI2x implementation will be documented in a LAWN. This algorithm was inspired by the following paper:
"Families of Algorithms Related to the Inversion of a Symmetric Positive Definite Matrix"
PAOLO BIENTINESI Duke University and BRIAN GUNTER Delft University of Technology and ROBERT A. VAN DE GEIJN The University of Texas at Austin
2010-11-02 18:53:38 +00:00
julie a4462006fa Add hetrs2 for c and z, a Level BLAS 3 version of hetrs (same than rev 751) 2010-09-30 06:58:55 +00:00
julie f327dddb7f Included bug fix provided by Zlatco on Jacobi SVD
Email from Zlatco on August 24th 2010:
The problem that was reported (with zero matrix) is caused by bad initialization to xLASSQ.
It should be ZERO, ONE and not ZERO, ZERO. In fact, I had it ZERO, ONE throughout
the complete development of the code and decided to change it to ZERO, ZERO a the very
end to make it "more elegant". That was stupid, because xLASSQ does not touch those
variables in case of zero vector, leaving scaling at ZERO, and in the nonzero case the scaling
is between ONE and SQRT(N). So, in case of zero vector, division by a variable that
 is normally bigger than ONE causes division by zero.
I have corrected that and few other things, stress tested the code and it should be OK now.


README:
i)   In xgejsv.f and xgesvj.f input parameters SCALE and
     SUMSQ in xlassq.f are now initially set as SCALE = ZERO, SUMSQ=ONE.
     Setting them both to zero (without carefully reading xlassq.f) caused 
     problems with exactly zero columns.
ii)  There was a problem in the branch that computes only SIGMA and U of a
     rank deficient matrix. The computed numerical rank (NR) was incorrectly
     written as N in parameter lists of the corresponding calls.
iii) In xgsvj0.f, xgsvj1.f testing the input parameters is changed to prevent
     unnecessarily negative INFO in some situations.
iv) Minor changes, renaming some variables etc.
2010-08-25 15:59:11 +00:00
langou 150cd6266c Array out-of-bounds reference in xLAQR5.
Bug report and fix from Mathew Cross (NAG) on Sat Aug 14 2010:

In the section of the code "Special case: 2-by-2 reflection (if needed)" the logical test
IF( BMP22 .AND. ( V( 1, M22 ).NE.ZERO ) )
must be split into a nested test
IF (BMP22) THEN, IF (V(1,M22).NE.ZERO) THEN...
If .NOT. BMP22 then M22 can exceed the second extent of V (and recall that logical expressions can be evaluated in any order in Fortran).

See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=1949.
2010-08-17 15:45:24 +00:00
julie 4ff24babc1 Patch provided by the kitware team on Aug 5th (Brad King and Bill Hoffman)
Add the install rules and exports the targets.
Now one can write

find_package(LAPACK 3.2.2)

in another project to find either the LAPACK build tree or the
install tree.
2010-08-10 16:57:20 +00:00
julie 067bfbf159 Various comment fixes 2010-08-10 16:22:10 +00:00
langou db2a14bcf9 Adding a hint on the data storage required for band matrices in xLASCL. 2010-08-09 16:19:34 +00:00
julie c3940ac596 Split some lines (continue) 2010-07-07 17:27:28 +00:00
julie 96ac4279b4 Split some lines 2010-07-07 17:24:08 +00:00
julie c405a58673 Add static/dynamic library, package support and rearrange source files 2010-07-07 16:16:15 +00:00
julie 0752530232 Time has come to have the fortran90 slamch and dlamch in the lapack package.
Jason (Riedy) wrote our ( ... his? :) ) ideas about it three years ago:
http://www.netlib.org/lapack-dev/lapack-coding/program-style.html#id2537289
Piotr (Luszczek) has written two subroutines, tested them on few platforms, collected the result on his webpage, and sent emails to the lapackers a few times. See:
http://www.cs.utk.edu/~luszczek/lapack/lamch.html
Theses slamch.f and dlamch.f subroutines were taken from PLASMA-2.1.0. 

Change to the LAPACK library:
* move the current LAPACK subroutine slamch.f (resp dlamch.f) as
 slamchf77.f (resp. dlamchf77.f),
* take the new slamch.f subroutines (resp. dlamch.f), remove the PLASMA
 header, have a LAPACK header, and insert the new routines in the
 library.

Minor:
* I would leave these routines compiled with the NOOPT flag.

Problem:
* CLAPACK: no idea how CLAPACK's going to handle this. CLAPACK can rely on
 IEEE arithmetic, can relay on float.h, or can rely on the previous
 xlamch.f
2010-07-02 23:39:07 +00:00
julie 393209c09f Corrct bug0060: Typo in TESTING/EIG/dchkee.f and TESTING/EIG/zchkee.f (bug report sent by Ake Sandgren to lapackers on July 1st 2010) 2010-07-02 19:19:01 +00:00
julie d50a7d9e6b Fix bug0060 :: Bug in dtgsy2, missing IWORK call
bug report and fix sent by Vasile Sima on 24 Feb 2009 to "lapack@cs.utk.edu".

The error is that "IWORK" must appear in the line 640.  (It was included in the 1999 version.)
Note that the statement IE = ( I+1 ) - 1 is strange;  also, in other similar place, IWORK is used like below.
2010-06-24 18:23:57 +00:00
julie 82f05f2dd3 Fix Bug0059
bug report and fix sent by Alexander Kobotov (Intel) on Wed, 23 June 2010 to "lapack@cs.utk.edu".

ZGELSD crashes on large matrices (eq M=N=NHRS>=88), if real workspace allocated exactly as reported on workspace query.
Root cause is wrong estimation of real workspace size in ZLALSA (on path zgelsd->zlalsd->zlalsa). It assumes that RWORK array length should be max( N, (SMLSZ+1)*NRHS*3 ), where SMLSIZ=25. But in fact the function calls zlals0 which requires RWORK to be ( K*(1+NRHS) + 2*NRHS ), where K could be as large as number of columns in matrix A.
The same is actual for CGELSD.
2010-06-24 14:38:30 +00:00
julie ef920e099d Update date and version for 3.2.2 release 2010-06-23 17:25:30 +00:00
langou 9d2ac5bb4d Corrected a bug in SBDSDC and DBDSDC.
The routine was returning with INFO = 0 while a failure of convergence should
have been reported with INFO > 0.

The bug has been around for quite a while and has been difficult to reproduce.

More information:

(*) bug0025 :: serious problem in DGESDD: DGESDD returns negative singular values with INFO = 0

    o reported by Guy Bencteux on Sat Dec 06 2008
    o see forum topic 847
    o Julie : CANNOT REPRODUCE THE PROBLEM

    o on Sat Jun 19 2010, Bruno Pinçon from ESIAL, reported another matrix with the same problems
    o see forum topic 1868
    o we can reproduce the problem with on MacOS with gfortran reference LAPACK
      and vecLib BLAS, we can not reproduce the problem with reference LAPACK and reference BLAS.
    o A patch has been proposed by Julien Langou. (See forum topic 1868.)
    o Under review by other lapackers.
    o Note: there is strong evidence that the bug of Guy Bencteux and this one
      are the same, although we were never able to reproduce Guy's problem. So
      we assume Guy's problem gone! (And send an email to Guy to inform him.)
2010-06-22 22:08:36 +00:00
julie cc91ce19dc Update CMAKE build with new routines 2010-06-21 22:25:09 +00:00
langou 19ae0b8835 OK. So I got upset and did a
grep "an singular value" *f
in our SRC files to fix them all. 
Here we go.
2010-06-21 21:06:42 +00:00
langou 769ba9a44c another typo 2010-06-21 20:47:23 +00:00
langou 8e087ffd5f typo in the comment 2010-06-21 20:32:41 +00:00
julie 5a837cb48b Step 2 of xlarfp: add new routines and add same test code plus check R(i,i) is nonnegative and real 2010-06-18 22:48:07 +00:00
julie 84e8c51fe1 Step 1 of xlarfp : back out the old changes (need to run testing before going on) 2010-06-18 00:19:59 +00:00
julie 7eff241536 Missing local variable declaration (IINFO) 2010-06-15 17:09:03 +00:00
julie 02036c66f6 Missing local variable declaration 2010-06-15 16:53:28 +00:00
julie 1d9dfd8139 Add SYTRS2 routine - A BLAS 3 version of SYTRS
Add SYCONV routine: convert back and forth the factorization returned by SYTRF to be able to call SYTRS2.
Modify SYSV that now is calling SYTRS2 instead of SYTRS (and also SYCONV to convert and revert the factorization returned by SYTRF).
Modify testing to have TRS but also TRS2 tested in the LIN testing for SY.
2010-06-01 23:12:18 +00:00
langou 8a6f5c968a The variable N0 in xLASQ3 is INPUT/OUTPUT. (The comments said INPUT.)
The bug report and bug fix are from William Gandler (NIH/CIT). The related
emails are on the mailing list dated as follows: October 16, 2009; April 23,
2010; May 01, 2010, May 03, 2010.
2010-05-28 00:35:30 +00:00
langou bcf4ebed7c typo in comments spotted by Jim 2010-05-27 20:03:27 +00:00
langou 7584181b82 .. fixed some comments ..
from comments from A. Buttari, CNRS, France, to Julien Langou on 01/20/2010
2010-05-01 14:19:40 +00:00
julie a892458da1 remove comment to not include xerbla and xerbla_array 2010-04-29 15:37:13 +00:00
julie 594291cfc0 Many comment fix for allowing C Wrapper to work on MATGEN 2010-04-13 19:09:55 +00:00
julie 07c14f97cc Add descriptions of the arguments work and uplo following Paul Roberts[NAG]'s comment sent to lapack@cs.utk.edu 2010-04-13 18:18:00 +00:00
julie 8629ede4de Fix comment following Paul Roberts'email on lapack mailing-list
I was just looking at zgbsvxx.f from LAPACK 3.2.1 and I noticed a small
mistake in some of the argument descriptions. AB, AFB, B and X are all
down as DOUBLE PRECISION rather than COMPLEX*16.
2010-04-12 22:21:12 +00:00
julie 2270ea1545 Fix issue in testing suite found by Michael Chuvelev 2010-04-05 13:44:41 +00:00
julie 956aa8d34e Fix comments in ilaprec and remove some space in Makefile 2010-04-02 19:08:19 +00:00
julie 0bb0871778 Following bug report and fix sent by Michael Chuvelev (Intel) on Fri, 2 Apr 2010 to "lapack@cs.utk.edu".
Issue in LAPACK 3.2.1 *la_{po,sy,he}rfsx_extended.f sources. For instanse, in sla_syrfsx_extended.f:
 
DY is described as
*     DY             (input) REAL array, dimension (N)
*     Workspace to hold the intermediate solution.
 
whereas N-by-NRHS array is referenced at DY due to the following statement (line 384):
 
            CALL SSYTRS( UPLO, N, NRHS, AF, LDAF, IPIV, DY, N, INFO )
 
This may lead to an outside memory corruption. I assume one RHS should be referenced here, because all the RHSs are considered individually in the loop by J. That is, substituting NRHS by 1:
 
            CALL SSYTRS( UPLO, N, 1, AF, LDAF, IPIV, DY, N, INFO )
 
should fix the issue. This is actual for any subroutine mentioned.
2010-04-02 19:06:51 +00:00
langou 26758c2193 &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
"Bug" reported by Ondra Kamenik, confirmed by Julie Langou, fixed by Jim Demmel
and Guillaume Revy. See forum post 1783.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Fix problem in xTGEX2. The threshold value is too stringent and some matrices
are failing. Relax the threshold by a factor 2. More below.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=1783
dgges issue >> by OndraKamenik >> Tue Mar 16, 2010 6:01 am

All,

I have the following problem with dgges. For version 3.1.1 and sooner, I get a
reasonable result, for version 3.2 and 3.2.1 I get info=n+2.

I am separating eigenvalues in the unit circle from one outside the unique
circle.

The two D and E matrices have relatively well separated null spaces, the
minimum angle is acos(0.97). However, if i calculate condition numbers of
E-lambda*D of lambda=[-1:0.01:1], they are quite bad.

The matrices are attached with a small c++ program which calls dgges and sorts
eigenvalues for a better comparison. There is also a Makefile, which links with
different version of lapack.

I use the reference blas.

My question is if it is a bug in Lapack introduced between 3.2. and 3.1.1 or
the matrix is just very bad and in version 3.1.1 I was just lucky to get a
reasonable solution.

Many thanks for any help.

Ondra Kamenik

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Much more conversation on mailing list and forum [ skipped ]

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Date: Wed, 31 Mar 2010 19:53:11 -0600
From: James Demmel

This bug was introduced by changing the routine that computes Householder
transformations in the last release of LAPACK from dlarfg to the new dlarfp,
which makes the diagonal of the R factor in QR nonnegative. The bug was a
failure (INFO = N+3) in the dgges routine for computing selected deflating
subspaces of a matrix pencil A - lambda*B. I will describe the bug, a quick
fix, and implications for the floating point debugging project that Guillaume
and others of us are working on.

The bug occurred in dtgex2, in the swapping of eigenvalues (adjacent 1x1 and/or
2x2 blocks on the diagonal of the generalized Schur form) in order to compute
a selected subspace. The swapping involves QR decompositions of  small (n <= 4)
matrices.

The code in dtgex2 performs two of its own internal correctness tests (a "weak"
one and a "strong" one) to see if the swapping has been performed stably. The
two tests compute a residual in slightly different ways. The weak test passed,
but the strong test  (which can be commented out by setting the internal
parameter WANDS to be .false.)  failed, leading to returning INFO = N+3.
However, it failed by exceeding the threshold THRESH only by a factor like 1.2
or less. THRESH is set to 10*macheps*dnorm, so if we changed the (probably
somewhat arbitrary) factor from 10 to 20, it would work. Or we could set WANDS
= false.

Since Bo's name is on this routine, his comments are particularly welcome.

Guillaume and I spent a while tracking this down, and will continue to find out
why dlarfp led to a (slightly!) larger residual than the old dlarfg.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Date: Thu, 1 Apr 2010 20:01:21 -0600
From: James Demmel <demmel@cs.berkeley.edu>

Actually, on reexamining the data, this example would be fixed by 
changing 10 to 11,
but let's go with 20 to be on the safe side :) . I think it would be 
most efficient
if Julie or you appropriately change the one line of code in DTGEX2:
       
      THRESH = MAX( TEN*EPS*DNORM, SMLNUM )

All versions (S/D/C/Z) have an analogous line of code with the same
constant TEN that I would change.

Sorry, I've lost track of the Mathworks bug report on dlarfp. Can you 
remind me?

Thanks,
Jim

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
2010-04-02 04:55:58 +00:00
julie 4c60ddb0d2 Fix CMakeLists.txt only blas is exported, lapack needs to be exported as well. (From Bill Hoffman) 2010-03-23 19:57:29 +00:00
julie e1551d9145 Fix comments to generate wrapper correctly 2010-03-23 19:55:21 +00:00
julie cf50736dad Correct bug0050 :: An extra argument after matrix A lines 348-249 in STFSM.f causes a crash of SGEMM call sent from Alexander Kobotov (Intel) on Wed, 3 Feb 2010 to lapack@cs.utk.edu 2010-03-18 19:46:42 +00:00
julie 486f708677 bug0049 :: output parameter GIVPTR stays uninitialized in case of quick exit (n.eq.0) or if the rank-1 modifier is small enough in *laed8 sent by Alexander Kobotov (Intel) on Wed, 3 Feb 2010 to lapack@cs.utk.edu 2010-03-18 19:41:50 +00:00
julie 86e2baba6e Fix bug0048-Hanging could occur in *gebal if a NaN is in input matrix sent by Alexander Kobotov(Intel) to lapack on Feb 3rd 2010 2010-03-18 19:31:57 +00:00
julie 40261349ab Fix bug0046-Incorrectly documented RWORK workspace in ZGESDD sent by user Zbigniew on Forum (topic 1779) 2010-03-18 18:33:47 +00:00
julie 3137c2a46f Take off comment to put xerbla back in BLAS lib 2010-03-10 17:48:14 +00:00
julie fe6e273556 Fix buggy comments reported by Intel folowing Jim's recommendation 2010-03-09 21:49:41 +00:00
julie 2919f4e9c8 Shorten long lines 2010-03-04 20:02:50 +00:00
julie f8a57a933e Add testversion and testieee as executables 2010-02-23 22:58:21 +00:00
julie de74a30bba Following Jim and Sven report, sgeqpf and shseqr are computational routines. slanv2 is an auxiliary routine 2010-02-18 15:40:14 +00:00
julie 324a6e61a4 Some minor comments modifications 2010-02-17 17:33:47 +00:00
julie dfd81e08bc Add make.inc for ifort 2010-02-10 21:13:55 +00:00
langou aa6a716cbe Following a complain from John Tellefson (Salina, KS), added the make of the
variant library to the testing of the variants if the variant library is not
present.
2010-02-10 16:09:38 +00:00
langou 9f842ee571 Bug 0046 fixed.
author: Vasile Sima
committer: Julien Langou

Corrected LAPACK routines dlagv2 and slagv2 based on Vasile Sima (National
Institute for Research & Development in Informatics, Bucharest, Romania)'s
email to lapack@cs.utk.edu on Monday 25 January 2010.

> Specifically, the variable WI, which is used in the line 268 (close to the
> end), is not initialized (with ZERO) in the cases "A can be deflated" and "B
> is singular" (i.e., the code segments in the lines 138-144, 148-156, and
> 158-167).  The corrected version is included in the attached archive.
2010-01-29 15:22:58 +00:00
julie 616eee3f2d Polish some comments, etc.. for the C wrapper 2010-01-28 18:44:38 +00:00
langou f020b6fd2f Remove a trailing blank line at the end of dlarfp.f following Andy May (Cardiff
University) 12/31/09's comment.
2009-12-31 16:46:32 +00:00
langou 692d9d23e6 Still working on there subroutines ... I have added a variable SAVEALPHA, I am
not sure whether it is needed or not.  What I am pretty sure of, is that the
code is correct with, the previous code without may be correct as well ...
Anyway, I like it better like this.
2009-12-21 22:37:40 +00:00
langou 4252cf18ce Darned!!! I messed up with my commit r709!!!!
This is 
            " ( 1 - CONJG( TAU ) ) * ( ALPHA ) = ABS( ALPHA ) "
that needs to be true so, indeed, the previous code was correct and r709 is a
mistake. (r710 is good.) So this commit rollbacks r709 and modifies a little
r710.
2009-12-21 21:25:30 +00:00
langou f48dd07dba This is the relevant change. This is the bug fix for the MathWorks/PatQuillen's
bug in xLARFP. The fix seems to work her in Denver ...
2009-12-21 21:16:18 +00:00
langou e43f096772 After three irrelevant commit ( r706, r707, r708), this is the first relevant
modifications. I believe that in the complex case, when NORMX = ZERO but ALPHI
is not ZERO (i.e. ALPHA has a complex imaginary part), then TAU needs to be
such that:

            " ( 1 - TAU ) * ( ALPHA ) = ABS( ALPHA ) "

Since we have
            ALPHR = REAL( ALPHA )
            ALPHI = AIMAG( ALPHA )
            XNORM = DLAPY2( ALPHR, ALPHI )
The way to do this is to set TAU with

            TAU = CMPLX( ONE - ALPHR / XNORM, ALPHI / XNORM )

as opposed to

            TAU = CMPLX( ONE - ALPHR / XNORM, -ALPHI / XNORM )

(Note: XNORM is used as temporary variable here)
2009-12-21 21:11:58 +00:00
langou bdc11e1bcc change SAFMIN with SMLNUM
change RSAFMN with BIGNUM
2009-12-21 20:57:28 +00:00
langou 67b0f4e81e remove the comments on the constraints of TAU
this comment is true for xLARFG, it is not true anymore for xLARFP
2009-12-21 20:54:29 +00:00
langou bb677268e6 start some modification of the xLARFP routines
modification 1: remove the comments starting with ! and start them with *
2009-12-21 20:52:57 +00:00
langou acbecfd1b8 Correct a bug found by Ashutosh Mahajan from Mathematics and Computer Science Division of Argonne National Labs.
Email sent on Thu, 10 Dec 2009 16:53:57 to lapack@cs.utk.edu.

I think we have a bug in dstemr.f for the case when N is 2. The following
block:

392:                   IF (CS.NE.ZERO) THEN
393:                      ISUPPZ(2*M-1) = 1
394:                      ISUPPZ(2*M-1) = 2
395:                   ELSE
396:                      ISUPPZ(2*M-1) = 1
397:                      ISUPPZ(2*M-1) = 1
398:                   END IF

should really be (note lines 394, 397):

392:                   IF (CS.NE.ZERO) THEN
393:                      ISUPPZ(2*M-1) = 1
394:                      ISUPPZ(2*M) = 2
395:                   ELSE
396:                      ISUPPZ(2*M-1) = 1
397:                      ISUPPZ(2*M) = 1
398:                   END IF

similarly the block:
415:                IF (SN.NE.ZERO) THEN
416:                   IF (CS.NE.ZERO) THEN
417:                      ISUPPZ(2*M-1) = 1
418:                      ISUPPZ(2*M-1) = 2
419:                   ELSE
420:                      ISUPPZ(2*M-1) = 1
421:                      ISUPPZ(2*M-1) = 1
422:                   END IF
423:                ELSE

should really be (note lines 418, 421):

415:                IF (SN.NE.ZERO) THEN
416:                   IF (CS.NE.ZERO) THEN
417:                      ISUPPZ(2*M-1) = 1
418:                      ISUPPZ(2*M) = 2
419:                   ELSE
420:                      ISUPPZ(2*M-1) = 1
421:                      ISUPPZ(2*M) = 1
422:                   END IF
423:                ELSE
2009-12-16 01:58:23 +00:00
langou ecf41ea0c0 Correct a bug found by Ashutosh Mahajan from Mathematics and Computer Science Division of Argonne National Labs.
Email sent on Fri, 11 Dec 2009 14:51:07 to lapack@cs.utk.edu.

Subject: [Lapack] bug in dsyevr.f when N = 1

when dsyevr is called with N=1, then it returns without setting up ISUPPZ values.

331:       IF( N.EQ.1 ) THEN
...
342:          IF( WANTZ )
343:      $      Z( 1, 1 ) = ONE
344:          RETURN
345:       END IF

It should rather do

IF( WANTZ )
    Z( 1, 1 ) = ONE
    ISUPPZ(1) = 1
    ISUPPZ(2) = 1
END IF
2009-12-16 01:51:40 +00:00
langou be91663bbc some more typos 2009-11-14 19:22:15 +00:00
langou 745f8f6328 typo in comments 2009-11-14 19:20:08 +00:00
julie 9df4e8308e Fix bug0038 - dgelsd waas not returning iwork size 2009-10-20 21:26:21 +00:00
langou 50f7b60273 Bug report from Michael Chuvelev from Intel on DSYEVR.
======================================================================================
Date: Wed, 14 Oct 2009 02:42:06 -0600
From: "Chuvelev, Michael" <michael.chuvelev@intel.com>
To: "lapack@cs.utk.edu" <lapack@cs.utk.edu>
Subject: [Lapack] VL,   VU are referenced in lapack-3.2.1 dsyevr even if range.ne.'V'

Hello,
 
dsyevr contains this code (lines 360-361):
 
      VLL = VL
      VUU = VU
 
which means VL, VU is accessed regardless of RANGE.
 
Whereas this issue is fixed in ssyevr, for instance (lines 364-367):
 
      IF (VALEIG) THEN
         VLL = VL
         VUU = VU
      END IF
 
Best regards,
 
Michael.
======================================================================================
2009-10-15 14:21:05 +00:00
julie 3e22decd10 Correct problem reported by Kevin Wadleigh to keep compilers from optimizing NAN6 = NAN5*0.0 2009-09-30 15:02:44 +00:00
langou a863b93229 Date: Tue, 29 Sep 2009 06:17:06 -0600
From: "Chuvelev, Michael"
Subject: [Lapack] Bug in lapack-3.2.1/TESTING/EIG/zdrvgbx.f


 Hi,
 
please pay attention to the printing format 9998 misuse in zdrvgbx.f:
 
                              WRITE( NOUT, FMT = 9998 )'ZGBSVXX', FACT,
     $                             TRANS, N, KL, KU, IMAT, 7,
     $                             RESULT( 7 )
...
 
9998 FORMAT( ' *** In ZDRVGB, LAFB=', I5, ' is too small for N=', I5,
     $      ', KU=', I5, ', KL=', I5, /
     $      ' ==> Increase LAFB to at least ', I5 )
 
This would possibly lead to a segmentation fault in case of errors in zgbsvxx.
 
The same issue concerns other precisions too.
 
Best regards,
 
Michael.
2009-09-29 15:17:49 +00:00
julie 5ccb6ae4d4 Fix bug0038 see out of range element access in DLASET when using DGELSS (forum topic 1582) 2009-09-25 18:48:09 +00:00
julie 458bd37a2c Commit Julien's proposed change for bug0019 2009-09-11 21:04:20 +00:00
julie d3b90da243 remove extra definition 2009-09-11 21:01:17 +00:00
julie 783ef3de55 Fix whitespace comments detected from parser 2009-09-11 20:28:33 +00:00
julie 708ac3e2f4 Fix bug0023: SROTMG and DROTMG uses deprecated Fortran ASSIGN statement and assigned GOTO statement, actually fixed ROTM also 2009-09-10 22:59:31 +00:00
julie d22a22f292 Fix ifort flags just for Unix 2009-08-12 19:47:39 +00:00
julie e1aad7ece8 Fix variables used 2009-08-12 19:42:14 +00:00
julie d94845df52 Use try_compile to look for the timing routine 2009-08-12 19:36:19 +00:00
julie 3f9a240d8d Add conf file for submitting machine to LAPACK Dashboard 2009-08-12 17:26:34 +00:00
julie d8770dc3ea Better solution as we set NONE as default...WINDOWS build run great... 2009-08-11 23:06:34 +00:00
julie 3a2e7114fb Need the NONE for Windows... 2009-08-11 22:31:48 +00:00
julie 17112c1f29 Add CMAKE support to LAPACK 2009-08-11 21:58:21 +00:00
deaglanhalligan 8a4a5ccc1e Fixed comments on factorization in refinement routines. Found when coding in C++ 2009-07-17 09:01:45 +00:00
deaglanhalligan 4b6a6b3b23 In refinement routines, err_bnds initialization if-else statements should be if statements, found when coding in C++ 2009-07-17 08:27:04 +00:00
langou 7064e84298 thru -> through 2009-07-15 13:36:27 +00:00
du 9d0ac2bb4f fixed the variants_testing Makefile problem 2009-06-04 20:24:24 +00:00
langou ef9635b71e Bug report sent by Alexander V. Kobotov (from Intel) on Mon, 6 Apr 2009 to "lapack@cs.utk.edu".
"c(he/sy)equb: no slamch in external lists and lsame, intrinsics not described"
2009-05-10 21:01:41 +00:00
langou 5a71683a1a [[ I did not really want to commit the previous commit, this is the follow-up commit ... ]]
Bug report sent by Alexander V. Kobotov (from Intel) on Mon, 6 Apr 2009 to "lapack@cs.utk.edu".

"(d/s)tgsen.f: iwork(1) always referenced: line 455: iwork( 1 ) = LIWMIN, 
documentation says that if IJOB=0 it shouldn't, so NULL pointer causes a
sigfault."

(There is indeed the same problem for the WORK array and the IWORK array in the
complex routines.)

I have changed the header of the routines ctgsen.f, dtgsen.f, stgsen.f, and
ztgsen.f. A Fortran array needs to be of size at least 1. So IWORK is of size
at least 1. It was indeed written in the header of the routine: 
"IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))"
So since IWORK is of size at least 1, there is no reason not to reference it.
When there is a workspace query with IJOB.EQ.0, WORK(1) and IWORK(1) are both
set to 1.
2009-05-10 20:59:05 +00:00
langou 9c2e9f0bca Bug report sent by Alexander V. Kobotov (from Intel) on Mon, 6 Apr 2009 to "lapack@cs.utk.edu".
"(d/s)tgsen.f: iwork(1) always referenced: line 455: iwork( 1 ) = LIWMIN,
documentation says that if IJOB=0 it shouldn't, so NULL pointer causes a
sigfault."

There is indeed the same problem for array work.

I have changed the header of the routines ctgsen.f, dtgsen.f, stgsen.f, and
ztgsen.f. No matter what an array needs to be of size at least 1. So
IWORK is of size at least 1. It was written in the header of the routine:
"IWORK   (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))"
So since IWORK is of size at least 1, there is no reason not to reference it.
When there is a workspace query with IJOB.EQ.0, IWORK(1) is set to 1.
2009-05-10 20:51:42 +00:00
langou 12483e500f Bug report sent by Alexander V. Kobotov (from Intel) on Mon, 6 Apr 2009 to "lapack@cs.utk.edu".
"(c/z)geesx: no lwork=-1 branch at all, info = -15 is returned while doing lquery."
I noticed that the S and D version where not exiting after WORKSPACE query as well.
Thanks Alexander. Bug corrected.
2009-05-10 20:45:07 +00:00
langou 7e19748f6c Patch from Lawrence Mulholland (NAG) on Wednesday May 6th 2009.
See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=1408.
Thanks Lawrence.
2009-05-10 18:10:23 +00:00
langou 225b036020 Bug reported by Julie Langou on Th. 04/30/09 thanks to the Intel Fortran
compiler on Windows.  I messed up the workspace types needed by CPOT01 and
ZPOT01, they need to be REAL (or DOUBLE PRECISION) and not COMPLEX (or DOUBLE
COMPLEX). Everything works fine on my machine with these changes. Julien.
2009-05-04 03:08:48 +00:00
julie be91086043 Big commit before 3.2.1 release.
Those are just cosmetic changes to update version number and various other minor change.
2009-04-16 18:10:16 +00:00
langou cd6bf77891 Some debug write statements were present in slafts.f and dlafts.f => removed. 2009-04-08 21:16:17 +00:00
deaglanhalligan 47e45705b2 Updated documentation for EPIR routines. Changed ERRS_{N,C} variable names. Other cosmetic changes. 2009-04-08 00:05:18 +00:00
julie 1d4ed33a5c fix bug :: in DGESDD, workspace query gives a value smaller than the minimal value given in the header to run the routine
o reported by  Guy Bencteux on Sat Dec 06 2008
    o see forum topic 846 : https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=846

remove a min(M,N) in the minimal workspace formula when JOBZ='O' and  JOBZ = 'S' or 'A'.

Note Julie on minimal value:
Case: M > N

IF( M > N*5.0D0  ) THEN
PATH 1 -> FOR JOBZ=N : MINWORK = 7*N + N
PATH 2 -> FOR JOBZ=O: MINWORK = 5*N*N + 7*N
PATH 3 -> FOR JOBZ=S: MINWORK = 4*N*N + 7*N	
PATH 4 -> FOR JOBZ=A:  MINWORK = 4*N*N + 7*N


IF M>N (but not too large)
PATH 5 -> FOR JOBZ=N : MINWORK = MAX(7*N,M) + 3*N
PATH 6 -> FOR JOBZ=O: MINWORK = 3*N + MAX (M,4*N*N + 4*N)
PATH 7 -> FOR JOBZ=S : MINWORK = 3*N + MAX (M,3*N*N + 4*N)
PATH 8 -> FOR JOBZ=A :  MINWORK = 3*N + MAX (M,3*N*N + 4*N)
			
GENERAL FORMULA FROM THE TWO CASES WHEN M>N
FOR N LWORK >= 3*N + max (M,7*N)	
FOR O LWORK >= 3*N + max (M,5*N*N + 4*N) [instead of 3*N*N + max (M,5*N*N + 4*N) ]
FOR S ET A LWORK >= 3*N + max(M,4*N*N + 4*N) [instead of 3*N*N + max(M,4*N*N + 4*N) ]
2009-03-17 19:12:22 +00:00
jason 81026de8b0 Add xSYEQUB bibliographic reference citing Livne & Golub.
Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
DOI 10.1023/B:NUMA.0000016606.32820.69
Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-03-14 20:17:33 +00:00
jason b7a2e4b12f Fix ZLARFP and CLARFP optimizations when the vector is zero.
The x == zero branch ignored complex alphas.  The code still
functioned, but it scaled the entire zero vector.  Now that I think of
it, I should scan upwards for the scaling, too.  That will be a
separate enhancement patch; this is just the bug fix.

This patch also fixes an accidental precision shortening in ZLARFP,
which used CMPLX in the dead branch.

Reported by Igor Zhuravlov on the LAPACK web goo thingy, currently at
  http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=924
Also lead to finding a related (but different) error in the LAWN and
(accepted, still in editing) SISC paper.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-03-14 20:06:19 +00:00
langou 10b4e113aa The description of LDA in the header was number 8 in the header, while
LDA is the 4th argument in the interface.
=> 
Rearrange the header accordingly.
2009-03-11 01:54:40 +00:00
jason 26da0604ee Change routines to xLARFP that were missed in the first round.
Thanks to Michael Chuvelev <michael.chuvelev@intel.com> for noting
that the following routines still called xLARFG rather than xLARFP:
  cgeqpf.f   slaqp2.f   claqp2.f  claqps.f   clatrz.f   ctzrqf.f

Bug reported in message
<A43BE3D8E247E440AF3477B3CDCB0A694A132639@irsmsx504.ger.corp.intel.com> .

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-03-06 18:22:09 +00:00
jason bee89c9991 Return SCALE = ONE in xTRSYL for zero-dimension matrices.
I doubt if LAPACK is consistent about zero-dim matrices, but it's
worth a shot.  Plenty of discussion about their semantics on the
GNU Octave development lists.

Reported by Vasile Sima <vsima@ici.ro> in message
<1575.193.230.3.167.1235984292.squirrel@webmail.ici.ro>.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-03-03 17:16:37 +00:00
jason b0479776e2 Only touch Q in {d,s}tgsen.f if WANTQ is true.
Reported by Daniel Waggoner <dwaggoner@frbatlanta.org> in message
<49AA2617.4060900@frbatlanta.org>.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-03-03 17:12:04 +00:00
deaglanhalligan 46e09e3c99 Restructured loops in {c,z}la_yyrcond_{x,c} and {s,c,d,z}la_yyamv to do less comparisons. 2009-02-13 23:58:46 +00:00
deaglanhalligan 165a76fe3b Should call {c,z}la_heamv, not {c,z}la_syamv, from {c,z}la_porfsx_extended. 2009-02-11 09:20:58 +00:00
deaglanhalligan d4378b1884 Modified {c,z}syequb to use 2*N WORK rather than 3*N. 2009-02-11 07:13:27 +00:00
deaglanhalligan 1f07923064 Added Jasons patches to bring work and rwork down to 2*N in the complex refinement routines. 2009-02-11 06:06:54 +00:00
deaglanhalligan e9454e224e cgesvxx and zgesvxx need at least 3*N WORK space after changes from last bug fix 2009-02-10 12:17:14 +00:00
deaglanhalligan 7a34efe526 Fixed WORK/RWORK bug in complex iterative refinement routines. 2009-02-10 03:14:40 +00:00
langou 2e3389623f 2009-02-09 22:08:05 +00:00
langou 2d7bbcf1a5 2009-02-09 21:37:20 +00:00
langou e0c20c327a 2009-02-01 19:51:40 +00:00
jason aef53f27ef Fix scaling in the transpose case of extra-precise refinement.
The row-scaling factors need passed in the transpose case.  Apparently,
none of our release tests include ill-scaled matrices.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2009-01-28 20:34:18 +00:00
langou 4bf24e63d8 ==============================================================================
Patch from Christof Voemel, ETH Zurich.
==============================================================================
I would like to make a small change  in dlarrd/slarrd/_larrd.f.base so that the
code deals better with certain matrices from Godunov.

Could you please replace in those files the lines, after label 40,
            GL = GL - FUDGE*SPDIAM*EPS*IN - FUDGE*PIVMIN
            GU = GU + FUDGE*SPDIAM*EPS*IN + FUDGE*PIVMIN

by
            GL = GL - FUDGE*TNORM*EPS*IN - FUDGE*PIVMIN
            GU = GU + FUDGE*TNORM*EPS*IN + FUDGE*PIVMIN

(Exchange SPDIAM to TNORM).
==============================================================================
2009-01-28 16:11:32 +00:00
deaglanhalligan 4bb58882ff Set ithresh to 10, not 100. Removed la_linrx_max_n_errs. 2009-01-26 03:51:22 +00:00
deaglanhalligan ce91deebd4 Fixed typos and variable types in testing files. 2009-01-22 23:28:13 +00:00
deaglanhalligan 749c032e26 Added the rest of the extra precise iterative refinement testing. 2009-01-22 10:40:59 +00:00
julie ef14562140 Fix out of bound access in LIN TESTING with XBLAS found with -fcheck-bounds with gfortran.
"Error in DLA_GBAMV.f line 226: forrtl: severe (408): fort: (2): Subscript #1 of the array AB has value 2 which is greater than the upper bound of 1"

Reported in http://icl.cs.utk.edu/trac/lapack-dev/ticket/45
2009-01-16 22:27:20 +00:00
julie 1a86352338 Following a out-of-bound complaint by gfortran
Modify size in declaration of DX and DY.
It was set to 1, and 5 or N in the comments !!!!!
Put * in the declaration and N in the comments

This routine may need to be double-checked.
2009-01-12 22:16:18 +00:00
langou 3cff0c0c7d ============================================================================
Bug in RFP routines xTFSM for N=1 independently reported by Jason and Julie.
============================================================================

See Jason's email DEC/27/2009: "Similar problem in xTFSM".
Jason used gfortran with -fbounds-check and got:
> At line 328 of file stfsm.f
> Fortran runtime error: Array reference out of bounds for array 'b', upper bound of dimension 1 exceeded (1 > 0)

Julie also observed the bug with MS Visual Studio.
See ticket http://icl.cs.utk.edu/trac/lapack-dev/ticket/46

The problem is the following. Sometimes in the RFP routines, we 
call routines like for example
   DGEMM ( M, N, K, ... A( I, J), ...)
where M or N is 0 and A( I, J ) is out-of-bound.  The rationale was since M or
N is 0, DGEMM simply exits without doing anything, therefore the out-of-bound
A(I,J) is not an issue. Well, this is not Fortran correct.

In this commit, I have fix the problem for xTFSM. This is a fix. This is not
rocket-science and one can certainly do something more elegant ... This bug is
blocking Julie from porting on Windows so the matter was urgent.

Now RFP + ( gfortan -fbounds-check ) works fine.

TODO: find a cleaner way to fix this,

TODO: Unfortunately I believe there are other bugs like this one in other RFP
routines, always when N=1. See for example xPFTRF. I do not understand why the
TESTING with gfortran -fbounds-check do not trigger an error though ...
2009-01-12 05:17:21 +00:00
julie dc20e83826 Fix some minors errors found while porting under Windows 2009-01-08 19:58:17 +00:00
julie a0d64643e4 Last round of modifications to the comments for the generation of the manpages 2009-01-02 21:57:02 +00:00
jason 61e82a389d Merged revisions 609-614 via svnmerge from
https://jason@icl.cs.utk.edu/svn/lapack-dev/lapack/branches/SC08-release

........
  r609 | julie | 2008-12-16 17:17:52 -0500 (Tue, 16 Dec 2008) | 1 line
  
  Polish routines to fit the LAPACK framework and allow manpages generation
........
  r610 | langou | 2008-12-19 12:12:38 -0500 (Fri, 19 Dec 2008) | 30 lines
  
  
  bug reported on the forum
  https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=854
  
  the complete thread is available at
  http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/635192e11beadb93#
  
  Tobias Burnus also sent us an email:
  
  > Hello,
  > 
  > this was reported at
  > http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/635192e11beadb93#
  > 
  > The problem is the line 47:
  > 
  > 47:       IF( M.EQ.0 .OR. A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN
  > 
  > If M == 0 the one accesses A(0,1) which is invalid as the lower bound is 1
  > and not 0.
  > 
  > Note: Contrary to C there is no left-to-right evaluation of expressions in
  > Fortran; the order is left to the compiler. One might assume that a smart
  > compiler does not evaluate "A(M,1)" if "M==0", however, there is nothing in
  > the standard guarantees this.
  > 
  > If bounds checks are turned on (see post at the URL above), gfortran aborts
  > with an out-of-bounds error.
........
  r611 | julie | 2008-12-19 15:00:58 -0500 (Fri, 19 Dec 2008) | 5 lines
  
  Modify the formatting of the comments.
  Replace Note and Notes section by Further Details
  This allow the manpages to be generated corectly.
........
  r612 | julie | 2008-12-19 16:29:21 -0500 (Fri, 19 Dec 2008) | 3 lines
  
  Reformat the xblas routines comments to be able to generate the manpages
   
........
  r613 | julie | 2008-12-19 16:30:31 -0500 (Fri, 19 Dec 2008) | 1 line
  
  Update version number
........
  r614 | jason | 2008-12-27 09:44:45 -0500 (Sat, 27 Dec 2008) | 13 lines
  
  Fix non-short-circuited tests in ILAxL{C,R}.
  
  Fortran doesn't short-circuit logical operators, so the check that the leading
  dimension /= 0 may not prevent indexing into a 0-length array.
  
  Reported by "hes selex" in
    http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/635192e11beadb93
  and forwarded to the LAPACK maintainers by Tobias Burnus <burnus@net-b.de>.
  
  Chalk up more bugs found by gfortran's diagnostics!
  
  Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
  Cc: Tobias Burnus <burnus@net-b.de>
........
2008-12-30 21:27:12 +00:00
julie ff981f106b 2008-12-16 17:06:58 +00:00
yozo e58b61578b XBLAS: Added gbmv2 (including test codes).
This routines computes the matrix product:

    y  <-  alpha * op(A) * (x_head + x_tail) + beta * y

where A is a general banded matrix.
2008-11-11 19:57:27 +00:00
yozo 79e53018aa XBLAS: Added hemv2 (including test codes).
This routines computes the matrix product:

  y  <-  alpha * A * (x_head + x_tail) + beta * y

where A is a complex Hermitian matrix.
2008-11-11 19:56:54 +00:00
yozo 1ed5904f67 XBLAS: Added symv2 (including tests).
symv2 performs

  y  <-  alpha * A * (x_head + x_tail) + beta * y

where A is a symmetric matrix.
2008-11-11 19:56:25 +00:00
yozo 81d88e5dca XBLAS: Fix increment adjustment in do_test_axpby.
We need to double the increment for complex cases.
2008-11-11 19:56:07 +00:00
yozo 618b358bfd XBLAS: Fix bug in testgen_BLAS_[cz]dot2.
Wrong parameter was being passed to gen_y_to_cancel.
Should pass n_fix2+1 instead of k+1, since k and n_fix2
differ by factor of two for complex case.
2008-11-11 19:55:57 +00:00
yozo f17b84a7d3 XBLAS: Fix bug in testing/test-dot2/testgen_BLAS_[sd]dot2.
Scaling factor to compute x_tail was being rounded to integer,
and thus was producing all zeros for x_tail (and hence didn't
test whether *mv2 routines were looking at x_tail at all).
2008-11-11 19:55:50 +00:00
yozo 6b84138531 XBLAS: Removed unused variable x_vec in testing/test-symv/do_test_symv.c. 2008-11-11 19:55:41 +00:00
yozo e0f9192bdc XBLAS: Make argument error return codes more specific in gbmv.
Should return -k if the k-th argument is in error, instead of just 0.
2008-11-11 19:55:32 +00:00
yozo 8e585979e9 XBLAS: Fix lda check in gbmv.
For banded storage lda can be smaller than n or m.
2008-11-11 19:55:11 +00:00
yozo bdb14718ef XBLAS: Fix lda check in gemv.
We need to raise error if lda < m for column major format,
and lda < n for row major format.  Previously it was checking
for lda < leny.

Also test lda in do_test_gemv more carefully.
2008-11-11 19:54:53 +00:00
7309 changed files with 1029682 additions and 1448692 deletions
+9
View File
@@ -0,0 +1,9 @@
add_subdirectory(SRC)
if(BUILD_TESTING)
add_subdirectory(TESTING)
endif(BUILD_TESTING)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/blas.pc
DESTINATION ${PKG_CONFIG_DIR}
)
+149
View File
@@ -0,0 +1,149 @@
#######################################################################
# This is the makefile to create a library for the BLAS.
# The files are grouped as follows:
#
# SBLAS1 -- Single precision real BLAS routines
# CBLAS1 -- Single precision complex BLAS routines
# DBLAS1 -- Double precision real BLAS routines
# ZBLAS1 -- Double precision complex BLAS routines
#
# CB1AUX -- Real BLAS routines called by complex routines
# ZB1AUX -- D.P. real BLAS routines called by d.p. complex
# routines
#
# ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS
#
# SBLAS2 -- Single precision real BLAS2 routines
# CBLAS2 -- Single precision complex BLAS2 routines
# DBLAS2 -- Double precision real BLAS2 routines
# ZBLAS2 -- Double precision complex BLAS2 routines
#
# SBLAS3 -- Single precision real BLAS3 routines
# CBLAS3 -- Single precision complex BLAS3 routines
# DBLAS3 -- Double precision real BLAS3 routines
# ZBLAS3 -- Double precision complex BLAS3 routines
#
# The library can be set up to include routines for any combination
# of the four precisions. To create or add to the library, enter make
# followed by one or more of the precisions desired. Some examples:
# make single
# make single complex
# make single double complex complex16
# Note that these commands are not safe for parallel builds.
#
# Alternatively, the commands
# make all
# or
# make
# without any arguments creates a library of all four precisions.
# The name of the library is held in BLASLIB, which is set in the
# top-level make.inc
#
# To remove the object files after the library is created, enter
# make clean
# To force the source files to be recompiled, enter, for example,
# make single FRC=FRC
#
#---------------------------------------------------------------------
#
# Edward Anderson, University of Tennessee
# March 26, 1990
# Susan Ostrouchov, Last updated September 30, 1994
# ejr, May 2006.
#
#######################################################################
#---------------------------------------------------------
# Comment out the next 6 definitions if you already have
# the Level 1 BLAS.
#---------------------------------------------------------
set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f
srot.f srotg.f sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
set(CBLAS1 scabs1.f scasum.f scnrm2.f icamax.f caxpy.f ccopy.f
cdotc.f cdotu.f csscal.f crotg.f cscal.f cswap.f csrot.f)
set(DBLAS1 idamax.f dasum.f daxpy.f dcopy.f ddot.f dnrm2.f
drot.f drotg.f dscal.f dsdot.f dswap.f drotmg.f drotm.f)
set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f izamax.f zaxpy.f zcopy.f
zdotc.f zdotu.f zdscal.f zrotg.f zscal.f zswap.f zdrot.f)
set(CB1AUX isamax.f sasum.f saxpy.f scopy.f snrm2.f sscal.f)
set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f)
#---------------------------------------------------------------------
# The following line defines auxiliary routines needed by both the
# Level 2 and Level 3 BLAS. Comment it out only if you already have
# both the Level 2 and 3 BLAS.
#---------------------------------------------------------------------
set(ALLBLAS lsame.f xerbla.f xerbla_array.f)
#---------------------------------------------------------
# Comment out the next 4 definitions if you already have
# the Level 2 BLAS.
#---------------------------------------------------------
set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f
strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f
sger.f ssyr.f sspr.f ssyr2.f sspr2.f)
set(CBLAS2 cgemv.f cgbmv.f chemv.f chbmv.f chpmv.f
ctrmv.f ctbmv.f ctpmv.f ctrsv.f ctbsv.f ctpsv.f
cgerc.f cgeru.f cher.f chpr.f cher2.f chpr2.f)
set(DBLAS2 dgemv.f dgbmv.f dsymv.f dsbmv.f dspmv.f
dtrmv.f dtbmv.f dtpmv.f dtrsv.f dtbsv.f dtpsv.f
dger.f dsyr.f dspr.f dsyr2.f dspr2.f)
set(ZBLAS2 zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f
ztrmv.f ztbmv.f ztpmv.f ztrsv.f ztbsv.f ztpsv.f
zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f)
#---------------------------------------------------------
# Comment out the next 4 definitions if you already have
# the Level 3 BLAS.
#---------------------------------------------------------
set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f )
set(CBLAS3 cgemm.f csymm.f csyrk.f csyr2k.f ctrmm.f ctrsm.f
chemm.f cherk.f cher2k.f)
set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f)
set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f
zhemm.f zherk.f zher2k.f)
# default build all of it
set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3}
${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1}
${ZBLAS2} ${ZBLAS3} ${ALLBLAS})
if(BLAS_SINGLE)
set(ALLOBJ ${SBLAS1} ${ALLBLAS}
${SBLAS2} ${SBLAS3})
endif()
if(BLAS_DOUBLE)
set(ALLOBJ ${DBLAS1} ${ALLBLAS}
${DBLAS2} ${DBLAS3})
endif()
if(BLAS_COMPLEX)
set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX}
${ALLBLAS} ${CBLAS2})
endif()
if(BLAS_COMPLEX16)
set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX}
${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
endif()
add_library(blas ${ALLOBJ})
#if(UNIX)
# target_link_libraries(blas m)
#endif()
set_target_properties(
blas PROPERTIES
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
target_link_libraries(blas)
lapack_install_library(blas)
+3 -3
View File
@@ -70,7 +70,7 @@ CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o ccopy.o \
$(CBLAS1): $(FRC)
DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \
drot.o drotg.o dscal.o dswap.o drotmg.o drotm.o
drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o
$(DBLAS1): $(FRC)
ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zcopy.o \
@@ -88,7 +88,7 @@ $(ZB1AUX): $(FRC)
# Level 2 and Level 3 BLAS. Comment it out only if you already have
# both the Level 2 and 3 BLAS.
#---------------------------------------------------------------------
ALLBLAS = lsame.o xerbla.o xerbla_array.o ila_len_trim.o
ALLBLAS = lsame.o xerbla.o xerbla_array.o
$(ALLBLAS) : $(FRC)
#---------------------------------------------------------
@@ -134,7 +134,7 @@ ZBLAS3 = zgemm.o zsymm.o zsyrk.o zsyr2k.o ztrmm.o ztrsm.o \
$(ZBLAS3): $(FRC)
ALLOBJ=$(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \
$(CBLAS1) $(CB1AUX) $(CBLAS2) $(CBLAS3) $(ZBLAS1) $(ZB1AUX) \
$(CBLAS1) $(CBLAS2) $(CBLAS3) $(ZBLAS1) \
$(ZBLAS2) $(ZBLAS3) $(ALLBLAS)
$(BLASLIB): $(ALLOBJ)
+76 -26
View File
@@ -1,4 +1,61 @@
*> \brief \b CAXPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
*
* .. Scalar Arguments ..
* COMPLEX CA
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CAXPY constant times a vector plus a vector.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX CA
INTEGER INCX,INCY,N
@@ -7,16 +64,7 @@
COMPLEX CX(*),CY(*)
* ..
*
* Purpose
* =======
*
* CAXPY constant times a vector plus a vector.
*
* Further Details
* ===============
*
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY
@@ -27,26 +75,28 @@
* ..
IF (N.LE.0) RETURN
IF (SCABS1(CA).EQ.0.0E+0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CY(I) = CY(I) + CA*CX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
CY(IY) = CY(IY) + CA*CX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CY(IY) = CY(IY) + CA*CX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
CY(I) = CY(I) + CA*CX(I)
30 CONTINUE
RETURN
END
+75 -27
View File
@@ -1,4 +1,60 @@
*> \brief \b CCOPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CCOPY copies a vector x to a vector y.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,41 +62,33 @@
COMPLEX CX(*),CY(*)
* ..
*
* Purpose
* =======
*
* CCOPY copies a vector x to a vector y.
*
* Further Details
* ===============
*
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CY(I) = CX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
CY(IY) = CX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
CY(I) = CX(I)
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CY(IY) = CX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+77 -29
View File
@@ -1,4 +1,62 @@
*> \brief \b CDOTC
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CDOTC forms the dot product of two complex vectors
*> CDOTC = X^H * Y
*>
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,17 +64,7 @@
COMPLEX CX(*),CY(*)
* ..
*
* Purpose
* =======
*
* forms the dot product of two vectors, conjugating the first
* vector.
*
* Further Details
* ===============
*
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
* =====================================================================
*
* .. Local Scalars ..
COMPLEX CTEMP
@@ -28,28 +76,28 @@
CTEMP = (0.0,0.0)
CDOTC = (0.0,0.0)
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CTEMP = CTEMP + CONJG(CX(I))*CY(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
CTEMP = CTEMP + CONJG(CX(IX))*CY(IY)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
CDOTC = CTEMP
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
CTEMP = CTEMP + CONJG(CX(I))*CY(I)
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CTEMP = CTEMP + CONJG(CX(IX))*CY(IY)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
CDOTC = CTEMP
RETURN
END
+77 -28
View File
@@ -1,4 +1,62 @@
*> \brief \b CDOTU
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CDOTU forms the dot product of two complex vectors
*> CDOTU = X^T * Y
*>
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,16 +64,7 @@
COMPLEX CX(*),CY(*)
* ..
*
* Purpose
* =======
*
* CDOTU forms the dot product of two vectors.
*
* Further Details
* ===============
*
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
* =====================================================================
*
* .. Local Scalars ..
COMPLEX CTEMP
@@ -24,28 +73,28 @@
CTEMP = (0.0,0.0)
CDOTU = (0.0,0.0)
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CTEMP = CTEMP + CX(I)*CY(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
CTEMP = CTEMP + CX(IX)*CY(IY)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
CDOTU = CTEMP
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
CTEMP = CTEMP + CX(I)*CY(I)
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CTEMP = CTEMP + CX(IX)*CY(IY)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
CDOTU = CTEMP
RETURN
END
+207 -136
View File
@@ -1,4 +1,197 @@
*> \brief \b CGBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER INCX,INCY,KL,KU,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CGBMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
*>
*> y := alpha*A**H*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] KL
*> \verbatim
*> KL is INTEGER
*> On entry, KL specifies the number of sub-diagonals of the
*> matrix A. KL must satisfy 0 .le. KL.
*> \endverbatim
*>
*> \param[in] KU
*> \verbatim
*> KU is INTEGER
*> On entry, KU specifies the number of super-diagonals of the
*> matrix A. KU must satisfy 0 .le. KU.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry, the leading ( kl + ku + 1 ) by n part of the
*> array A must contain the matrix of coefficients, supplied
*> column by column, with the leading diagonal of the matrix in
*> row ( ku + 1 ) of the array, the first super-diagonal
*> starting at position 2 in row ku, the first sub-diagonal
*> starting at position 1 in row ( ku + 2 ), and so on.
*> Elements in the array A that do not correspond to elements
*> in the band matrix (such as the top left ku by ku triangle)
*> are not referenced.
*> The following program segment will transfer a band matrix
*> from conventional full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> K = KU + 1 - J
*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
*> A( K + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( kl + ku + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX 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.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is COMPLEX 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, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,KL,KU,LDA,M,N
@@ -8,125 +201,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CGBMV 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 band matrix, with kl sub-diagonals and ku super-diagonals.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* KL - INTEGER.
* On entry, KL specifies the number of sub-diagonals of the
* matrix A. KL must satisfy 0 .le. KL.
* Unchanged on exit.
*
* KU - INTEGER.
* On entry, KU specifies the number of super-diagonals of the
* matrix A. KU must satisfy 0 .le. KU.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry, the leading ( kl + ku + 1 ) by n part of the
* array A must contain the matrix of coefficients, supplied
* column by column, with the leading diagonal of the matrix in
* row ( ku + 1 ) of the array, the first super-diagonal
* starting at position 2 in row ku, the first sub-diagonal
* starting at position 1 in row ( ku + 2 ), and so on.
* Elements in the array A that do not correspond to elements
* in the band matrix (such as the top left ku by ku triangle)
* are not referenced.
* The following program segment will transfer a band matrix
* from conventional full matrix storage to band storage:
*
* DO 20, J = 1, N
* K = KU + 1 - J
* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
* A( K + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( kl + ku + 1 ).
* Unchanged on exit.
*
* X - COMPLEX 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 - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - COMPLEX 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, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ONE
@@ -244,33 +319,29 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
IF (J.GT.KU) KY = KY + INCY
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y.
* Form y := alpha*A**T*x + y or y := alpha*A**H*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+214 -145
View File
@@ -1,4 +1,197 @@
*> \brief \b CGEMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,M,N
* CHARACTER TRANSA,TRANSB
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CGEMM performs one of the matrix-matrix operations
*>
*> C := alpha*op( A )*op( B ) + beta*C,
*>
*> where op( X ) is one of
*>
*> op( X ) = X or op( X ) = X**T or op( X ) = X**H,
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n', op( A ) = A.
*>
*> TRANSA = 'T' or 't', op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c', op( A ) = A**H.
*> \endverbatim
*>
*> \param[in] TRANSB
*> \verbatim
*> TRANSB is CHARACTER*1
*> On entry, TRANSB specifies the form of op( B ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSB = 'N' or 'n', op( B ) = B.
*>
*> TRANSB = 'T' or 't', op( B ) = B**T.
*>
*> TRANSB = 'C' or 'c', op( B ) = B**H.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix
*> op( A ) and of the matrix C. M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix
*> op( B ) and the number of columns of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of columns of the matrix
*> op( A ) and the number of rows of the matrix op( B ). K must
*> be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is 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 A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as 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 ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is 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 contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
*> LDB must be at least max( 1, k ), otherwise LDB must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is 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.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER K,LDA,LDB,LDC,M,N
@@ -8,125 +201,7 @@
COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CGEMM performs one of the matrix-matrix operations
*
* C := alpha*op( A )*op( B ) + beta*C,
*
* where op( X ) is one of
*
* op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ),
*
* alpha and beta are scalars, and A, B and C are matrices, with op( A )
* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*
* Arguments
* ==========
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n', op( A ) = A.
*
* TRANSA = 'T' or 't', op( A ) = A'.
*
* TRANSA = 'C' or 'c', op( A ) = conjg( A' ).
*
* Unchanged on exit.
*
* TRANSB - CHARACTER*1.
* On entry, TRANSB specifies the form of op( B ) to be used in
* the matrix multiplication as follows:
*
* TRANSB = 'N' or 'n', op( B ) = B.
*
* TRANSB = 'T' or 't', op( B ) = B'.
*
* TRANSB = 'C' or 'c', op( B ) = conjg( B' ).
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix
* op( A ) and of the matrix C. M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix
* op( B ) and the number of columns of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of columns of the matrix
* op( A ) and the number of rows of the matrix op( B ). K must
* be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* 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 A, otherwise
* the leading k by m part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as 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 ).
* Unchanged on exit.
*
* 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 contain the matrix B, otherwise
* the leading n by k part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANSB = 'N' or 'n' then
* LDB must be at least max( 1, k ), otherwise LDB must be at
* least max( 1, n ).
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* 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.
* On exit, the array C is overwritten by the m by n matrix
* ( alpha*op( A )*op( B ) + beta*C ).
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -242,17 +317,15 @@
60 CONTINUE
END IF
DO 80 L = 1,K
IF (B(L,J).NE.ZERO) THEN
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
END IF
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
80 CONTINUE
90 CONTINUE
ELSE IF (CONJA) THEN
*
* Form C := alpha*conjg( A' )*B + beta*C.
* Form C := alpha*A**H*B + beta*C.
*
DO 120 J = 1,N
DO 110 I = 1,M
@@ -269,7 +342,7 @@
120 CONTINUE
ELSE
*
* Form C := alpha*A'*B + beta*C
* Form C := alpha*A**T*B + beta*C
*
DO 150 J = 1,N
DO 140 I = 1,M
@@ -288,7 +361,7 @@
ELSE IF (NOTA) THEN
IF (CONJB) THEN
*
* Form C := alpha*A*conjg( B' ) + beta*C.
* Form C := alpha*A*B**H + beta*C.
*
DO 200 J = 1,N
IF (BETA.EQ.ZERO) THEN
@@ -301,17 +374,15 @@
170 CONTINUE
END IF
DO 190 L = 1,K
IF (B(J,L).NE.ZERO) THEN
TEMP = ALPHA*CONJG(B(J,L))
DO 180 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
180 CONTINUE
END IF
TEMP = ALPHA*CONJG(B(J,L))
DO 180 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
180 CONTINUE
190 CONTINUE
200 CONTINUE
ELSE
*
* Form C := alpha*A*B' + beta*C
* Form C := alpha*A*B**T + beta*C
*
DO 250 J = 1,N
IF (BETA.EQ.ZERO) THEN
@@ -324,19 +395,17 @@
220 CONTINUE
END IF
DO 240 L = 1,K
IF (B(J,L).NE.ZERO) THEN
TEMP = ALPHA*B(J,L)
DO 230 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
230 CONTINUE
END IF
TEMP = ALPHA*B(J,L)
DO 230 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
230 CONTINUE
240 CONTINUE
250 CONTINUE
END IF
ELSE IF (CONJA) THEN
IF (CONJB) THEN
*
* Form C := alpha*conjg( A' )*conjg( B' ) + beta*C.
* Form C := alpha*A**H*B**H + beta*C.
*
DO 280 J = 1,N
DO 270 I = 1,M
@@ -353,7 +422,7 @@
280 CONTINUE
ELSE
*
* Form C := alpha*conjg( A' )*B' + beta*C
* Form C := alpha*A**H*B**T + beta*C
*
DO 310 J = 1,N
DO 300 I = 1,M
@@ -372,7 +441,7 @@
ELSE
IF (CONJB) THEN
*
* Form C := alpha*A'*conjg( B' ) + beta*C
* Form C := alpha*A**T*B**H + beta*C
*
DO 340 J = 1,N
DO 330 I = 1,M
@@ -389,7 +458,7 @@
340 CONTINUE
ELSE
*
* Form C := alpha*A'*B' + beta*C
* Form C := alpha*A**T*B**T + beta*C
*
DO 370 J = 1,N
DO 360 I = 1,M
+176 -107
View File
@@ -1,4 +1,168 @@
*> \brief \b CGEMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER INCX,INCY,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CGEMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
*>
*> y := alpha*A**H*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry, the leading m by n part of the array A must
*> contain the matrix of coefficients.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX 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.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is COMPLEX 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.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
@@ -8,98 +172,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CGEMV 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.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX 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 - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
* X - COMPLEX 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 - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - COMPLEX 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 - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ONE
@@ -212,30 +285,26 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y.
* Form y := alpha*A**T*x + y or y := alpha*A**H*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+137 -69
View File
@@ -1,4 +1,140 @@
*> \brief \b CGERC
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER INCX,INCY,LDA,M,N
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CGERC performs the rank 1 operation
*>
*> A := alpha*x*y**H + A,
*>
*> where alpha is a scalar, x is an m element vector, y is an n element
*> vector and A is an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( m - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the m
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, 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.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER INCX,INCY,LDA,M,N
@@ -7,75 +143,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CGERC performs the rank 1 operation
*
* A := alpha*x*conjg( y' ) + A,
*
* where alpha is a scalar, x is an m element vector, y is an n element
* vector and A is an m by n matrix.
*
* Arguments
* ==========
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( m - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the m
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, 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.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+137 -69
View File
@@ -1,4 +1,140 @@
*> \brief \b CGERU
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER INCX,INCY,LDA,M,N
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CGERU performs the rank 1 operation
*>
*> A := alpha*x*y**T + A,
*>
*> where alpha is a scalar, x is an m element vector, y is an n element
*> vector and A is an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( m - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the m
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, 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.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER INCX,INCY,LDA,M,N
@@ -7,75 +143,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CGERU performs the rank 1 operation
*
* A := alpha*x*y' + A,
*
* where alpha is a scalar, x is an m element vector, y is an n element
* vector and A is an m by n matrix.
*
* Arguments
* ==========
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( m - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the m
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, 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.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+194 -121
View File
@@ -1,4 +1,197 @@
*> \brief \b CHBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER INCX,INCY,K,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHBMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n hermitian band matrix, with k super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the band matrix A is being supplied as
*> follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> being supplied.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> being supplied.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of super-diagonals of the
*> matrix A. K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the hermitian matrix, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer the upper
*> triangular part of a hermitian band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the hermitian matrix, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer the lower
*> triangular part of a hermitian band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Note that the imaginary parts of the diagonal elements need
*> not be set and are assumed to be zero.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the
*> vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is COMPLEX array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,K,LDA,N
@@ -8,127 +201,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CHBMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n hermitian band matrix, with k super-diagonals.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the band matrix A is being supplied as
* follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* being supplied.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* being supplied.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of super-diagonals of the
* matrix A. K must satisfy 0 .le. K.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the hermitian matrix, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer the upper
* triangular part of a hermitian band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the hermitian matrix, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer the lower
* triangular part of a hermitian band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Note that the imaginary parts of the diagonal elements need
* not be set and are assumed to be zero.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - COMPLEX array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the
* vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* Y - COMPLEX array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ONE
+198 -125
View File
@@ -1,4 +1,201 @@
*> \brief \b CHEMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER LDA,LDB,LDC,M,N
* CHARACTER SIDE,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHEMM performs one of the matrix-matrix operations
*>
*> C := alpha*A*B + beta*C,
*>
*> or
*>
*> C := alpha*B*A + beta*C,
*>
*> where alpha and beta are scalars, A is an hermitian matrix and B and
*> C are m by n matrices.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether the hermitian matrix A
*> appears on the left or right in the operation as follows:
*>
*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*>
*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the hermitian matrix A is to be
*> referenced as follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of the
*> hermitian matrix is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of the
*> hermitian matrix is to be referenced.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix C.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix C.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> m when SIDE = 'L' or 'l' and is n otherwise.
*> Before entry with SIDE = 'L' or 'l', the m by m part of
*> the array A must contain the hermitian matrix, such that
*> when UPLO = 'U' or 'u', the leading m by m upper triangular
*> part of the array A must contain the upper triangular part
*> of the hermitian matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading m by m lower triangular part of the array A
*> must contain the lower triangular part of the hermitian
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> Before entry with SIDE = 'R' or 'r', the n by n part of
*> the array A must contain the hermitian matrix, such that
*> when UPLO = 'U' or 'u', the leading n by n upper triangular
*> part of the array A must contain the upper triangular part
*> of the hermitian matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading n by n lower triangular part of the array A
*> must contain the lower triangular part of the hermitian
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), otherwise LDA must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is 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.
*> On exit, the array C is overwritten by the m by n updated
*> matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER LDA,LDB,LDC,M,N
@@ -8,131 +205,7 @@
COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CHEMM performs one of the matrix-matrix operations
*
* C := alpha*A*B + beta*C,
*
* or
*
* C := alpha*B*A + beta*C,
*
* where alpha and beta are scalars, A is an hermitian matrix and B and
* C are m by n matrices.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether the hermitian matrix A
* appears on the left or right in the operation as follows:
*
* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*
* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the hermitian matrix A is to be
* referenced as follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of the
* hermitian matrix is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of the
* hermitian matrix is to be referenced.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix C.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix C.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* m when SIDE = 'L' or 'l' and is n otherwise.
* Before entry with SIDE = 'L' or 'l', the m by m part of
* the array A must contain the hermitian matrix, such that
* when UPLO = 'U' or 'u', the leading m by m upper triangular
* part of the array A must contain the upper triangular part
* of the hermitian matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading m by m lower triangular part of the array A
* must contain the lower triangular part of the hermitian
* matrix and the strictly upper triangular part of A is not
* referenced.
* Before entry with SIDE = 'R' or 'r', the n by n part of
* the array A must contain the hermitian matrix, such that
* when UPLO = 'U' or 'u', the leading n by n upper triangular
* part of the array A must contain the upper triangular part
* of the hermitian matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading n by n lower triangular part of the array A
* must contain the lower triangular part of the hermitian
* matrix and the strictly upper triangular part of A is not
* referenced.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), otherwise LDA must be at
* least max( 1, n ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* 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.
* On exit, the array C is overwritten by the m by n updated
* matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
+161 -90
View File
@@ -1,4 +1,164 @@
*> \brief \b CHEMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHEMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n hermitian matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the hermitian matrix and the strictly
*> lower triangular part of A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the hermitian matrix and the strictly
*> upper triangular part of A is not referenced.
*> Note that the imaginary parts of the diagonal elements need
*> not be set and are assumed to be zero.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y. On exit, Y is overwritten by the updated
*> vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,LDA,N
@@ -8,96 +168,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CHEMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n hermitian matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the hermitian matrix and the strictly
* lower triangular part of A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the hermitian matrix and the strictly
* upper triangular part of A is not referenced.
* Note that the imaginary parts of the diagonal elements need
* not be set and are assumed to be zero.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y. On exit, Y is overwritten by the updated
* vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ONE
+142 -78
View File
@@ -1,4 +1,145 @@
*> \brief \b CHER
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* .. Scalar Arguments ..
* REAL ALPHA
* INTEGER INCX,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHER performs the hermitian rank 1 operation
*>
*> A := alpha*x*x**H + A,
*>
*> where alpha is a real scalar, x is an n element vector and A is an
*> n by n hermitian matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the hermitian matrix and the strictly
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the hermitian matrix and the strictly
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL ALPHA
INTEGER INCX,LDA,N
@@ -8,84 +149,7 @@
COMPLEX A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* CHER performs the hermitian rank 1 operation
*
* A := alpha*x*conjg( x' ) + A,
*
* where alpha is a real scalar, x is an n element vector and A is an
* n by n hermitian matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the hermitian matrix and the strictly
* lower triangular part of A is not referenced. On exit, the
* upper triangular part of the array A is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the hermitian matrix and the strictly
* upper triangular part of A is not referenced. On exit, the
* lower triangular part of the array A is overwritten by the
* lower triangular part of the updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to zero.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+157 -89
View File
@@ -1,4 +1,160 @@
*> \brief \b CHER2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHER2 performs the hermitian rank 2 operation
*>
*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
*>
*> where alpha is a scalar, x and y are n element vectors and A is an n
*> by n hermitian matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the hermitian matrix and the strictly
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the hermitian matrix and the strictly
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER INCX,INCY,LDA,N
@@ -8,95 +164,7 @@
COMPLEX A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CHER2 performs the hermitian rank 2 operation
*
* A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,
*
* where alpha is a scalar, x and y are n element vectors and A is an n
* by n hermitian matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the hermitian matrix and the strictly
* lower triangular part of A is not referenced. On exit, the
* upper triangular part of the array A is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the hermitian matrix and the strictly
* upper triangular part of A is not referenced. On exit, the
* lower triangular part of the array A is overwritten by the
* lower triangular part of the updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to zero.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+206 -132
View File
@@ -1,4 +1,207 @@
*> \brief \b CHER2K
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* REAL BETA
* INTEGER K,LDA,LDB,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHER2K performs one of the hermitian rank 2k operations
*>
*> C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
*>
*> or
*>
*> C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
*>
*> where alpha and beta are scalars with beta real, C is an n by n
*> hermitian matrix and A and B are n by k matrices in the first case
*> and k by n matrices in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*B**H +
*> conjg( alpha )*B*A**H +
*> beta*C.
*>
*> TRANS = 'C' or 'c' C := alpha*A**H*B +
*> conjg( alpha )*B**H*A +
*> beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrices A and B, and on entry with
*> TRANS = 'C' or 'c', K specifies the number of rows of the
*> matrices A and B. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array B must contain the matrix B, otherwise
*> the leading k by n part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDB must be at least max( 1, n ), otherwise LDB must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is COMPLEX array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the hermitian matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the hermitian matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*>
*> -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
*> Ed Anderson, Cray Research Inc.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
REAL BETA
@@ -9,136 +212,7 @@
COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CHER2K performs one of the hermitian rank 2k operations
*
* C := alpha*A*conjg( B' ) + conjg( alpha )*B*conjg( A' ) + beta*C,
*
* or
*
* C := alpha*conjg( A' )*B + conjg( alpha )*conjg( B' )*A + beta*C,
*
* where alpha and beta are scalars with beta real, C is an n by n
* hermitian matrix and A and B are n by k matrices in the first case
* and k by n matrices in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*conjg( B' ) +
* conjg( alpha )*B*conjg( A' ) +
* beta*C.
*
* TRANS = 'C' or 'c' C := alpha*conjg( A' )*B +
* conjg( alpha )*conjg( B' )*A +
* beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrices A and B, and on entry with
* TRANS = 'C' or 'c', K specifies the number of rows of the
* matrices A and B. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, kb ), where kb is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array B must contain the matrix B, otherwise
* the leading k by n part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDB must be at least max( 1, n ), otherwise LDB must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - COMPLEX array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the hermitian matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the hermitian matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to zero.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
* Ed Anderson, Cray Research Inc.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -239,7 +313,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*conjg( B' ) + conjg( alpha )*B*conjg( A' ) +
* Form C := alpha*A*B**H + conjg( alpha )*B*A**H +
* C.
*
IF (UPPER) THEN
@@ -299,7 +373,7 @@
END IF
ELSE
*
* Form C := alpha*conjg( A' )*B + conjg( alpha )*conjg( B' )*A +
* Form C := alpha*A**H*B + conjg( alpha )*B**H*A +
* C.
*
IF (UPPER) THEN
+182 -113
View File
@@ -1,4 +1,183 @@
*> \brief \b CHERK
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* .. Scalar Arguments ..
* REAL ALPHA,BETA
* INTEGER K,LDA,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHERK performs one of the hermitian rank k operations
*>
*> C := alpha*A*A**H + beta*C,
*>
*> or
*>
*> C := alpha*A**H*A + beta*C,
*>
*> where alpha and beta are real scalars, C is an n by n hermitian
*> matrix and A is an n by k matrix in the first case and a k by n
*> matrix in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
*>
*> TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrix A, and on entry with
*> TRANS = 'C' or 'c', K specifies the number of rows of the
*> matrix A. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is COMPLEX array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the hermitian matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the hermitian matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*>
*> -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
*> Ed Anderson, Cray Research Inc.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
INTEGER K,LDA,LDC,N
@@ -8,117 +187,7 @@
COMPLEX A(LDA,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CHERK performs one of the hermitian rank k operations
*
* C := alpha*A*conjg( A' ) + beta*C,
*
* or
*
* C := alpha*conjg( A' )*A + beta*C,
*
* where alpha and beta are real scalars, C is an n by n hermitian
* matrix and A is an n by k matrix in the first case and a k by n
* matrix in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*conjg( A' ) + beta*C.
*
* TRANS = 'C' or 'c' C := alpha*conjg( A' )*A + beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrix A, and on entry with
* TRANS = 'C' or 'c', K specifies the number of rows of the
* matrix A. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - COMPLEX array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the hermitian matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the hermitian matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to zero.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
* Ed Anderson, Cray Research Inc.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -216,7 +285,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*conjg( A' ) + beta*C.
* Form C := alpha*A*A**H + beta*C.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -269,7 +338,7 @@
END IF
ELSE
*
* Form C := alpha*conjg( A' )*A + beta*C.
* Form C := alpha*A**H*A + beta*C.
*
IF (UPPER) THEN
DO 220 J = 1,N
+156 -87
View File
@@ -1,4 +1,159 @@
*> \brief \b CHPMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER INCX,INCY,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX AP(*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHPMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n hermitian matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is COMPLEX array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on.
*> Note that the imaginary parts of the diagonal elements need
*> not be set and are assumed to be zero.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y. On exit, Y is overwritten by the updated
*> vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER INCX,INCY,N
@@ -8,93 +163,7 @@
COMPLEX AP(*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CHPMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n hermitian matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* AP - COMPLEX array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on.
* Note that the imaginary parts of the diagonal elements need
* not be set and are assumed to be zero.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y. On exit, Y is overwritten by the updated
* vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ONE
+137 -75
View File
@@ -1,4 +1,140 @@
*> \brief \b CHPR
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
*
* .. Scalar Arguments ..
* REAL ALPHA
* INTEGER INCX,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHPR performs the hermitian rank 1 operation
*>
*> A := alpha*x*x**H + A,
*>
*> where alpha is a real scalar, x is an n element vector and A is an
*> n by n hermitian matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] AP
*> \verbatim
*> AP is COMPLEX array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on. On exit, the array
*> AP is overwritten by the upper triangular part of the
*> updated matrix.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on. On exit, the array
*> AP is overwritten by the lower triangular part of the
*> updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL ALPHA
INTEGER INCX,N
@@ -8,81 +144,7 @@
COMPLEX AP(*),X(*)
* ..
*
* Purpose
* =======
*
* CHPR performs the hermitian rank 1 operation
*
* A := alpha*x*conjg( x' ) + A,
*
* where alpha is a real scalar, x is an n element vector and A is an
* n by n hermitian matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* AP - COMPLEX array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on. On exit, the array
* AP is overwritten by the upper triangular part of the
* updated matrix.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on. On exit, the array
* AP is overwritten by the lower triangular part of the
* updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+152 -86
View File
@@ -1,4 +1,155 @@
*> \brief \b CHPR2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER INCX,INCY,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* COMPLEX AP(*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CHPR2 performs the hermitian rank 2 operation
*>
*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
*>
*> where alpha is a scalar, x and y are n element vectors and A is an
*> n by n hermitian matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] AP
*> \verbatim
*> AP is COMPLEX array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on. On exit, the array
*> AP is overwritten by the upper triangular part of the
*> updated matrix.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the hermitian matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on. On exit, the array
*> AP is overwritten by the lower triangular part of the
*> updated matrix.
*> Note that the imaginary parts of the diagonal elements need
*> not be set, they are assumed to be zero, and on exit they
*> are set to zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER INCX,INCY,N
@@ -8,92 +159,7 @@
COMPLEX AP(*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* CHPR2 performs the hermitian rank 2 operation
*
* A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,
*
* where alpha is a scalar, x and y are n element vectors and A is an
* n by n hermitian matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* AP - COMPLEX array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on. On exit, the array
* AP is overwritten by the upper triangular part of the
* updated matrix.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the hermitian matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on. On exit, the array
* AP is overwritten by the lower triangular part of the
* updated matrix.
* Note that the imaginary parts of the diagonal elements need
* not be set, they are assumed to be zero, and on exit they
* are set to 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
+58 -17
View File
@@ -1,13 +1,55 @@
*> \brief \b CROTG
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CROTG(CA,CB,C,S)
*
* .. Scalar Arguments ..
* COMPLEX CA,CB,S
* REAL C
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CROTG determines a complex Givens rotation.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
* =====================================================================
SUBROUTINE CROTG(CA,CB,C,S)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX CA,CB,S
REAL C
* ..
*
* Purpose
* =======
*
* CROTG determines a complex Givens rotation.
* =====================================================================
*
* .. Local Scalars ..
COMPLEX ALPHA
@@ -16,18 +58,17 @@
* .. Intrinsic Functions ..
INTRINSIC CABS,CONJG,SQRT
* ..
IF (CABS(CA).NE.0.) GO TO 10
C = 0.
S = (1.,0.)
CA = CB
GO TO 20
10 CONTINUE
SCALE = CABS(CA) + CABS(CB)
NORM = SCALE*SQRT((CABS(CA/SCALE))**2+ (CABS(CB/SCALE))**2)
ALPHA = CA/CABS(CA)
C = CABS(CA)/NORM
S = ALPHA*CONJG(CB)/NORM
CA = ALPHA*NORM
20 CONTINUE
IF (CABS(CA).EQ.0.) THEN
C = 0.
S = (1.,0.)
CA = CB
ELSE
SCALE = CABS(CA) + CABS(CB)
NORM = SCALE*SQRT((CABS(CA/SCALE))**2+ (CABS(CB/SCALE))**2)
ALPHA = CA/CABS(CA)
C = CABS(CA)/NORM
S = ALPHA*CONJG(CB)/NORM
CA = ALPHA*NORM
END IF
RETURN
END
+72 -20
View File
@@ -1,4 +1,62 @@
*> \brief \b CSCAL
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSCAL(N,CA,CX,INCX)
*
* .. Scalar Arguments ..
* COMPLEX CA
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSCAL scales a vector by a constant.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSCAL(N,CA,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX CA
INTEGER INCX,N
@@ -7,33 +65,27 @@
COMPLEX CX(*)
* ..
*
* Purpose
* =======
*
* scales a vector by a constant.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,NINCX
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
CX(I) = CA*CX(I)
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 DO 30 I = 1,N
CX(I) = CA*CX(I)
30 CONTINUE
DO I = 1,N
CX(I) = CA*CX(I)
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
CX(I) = CA*CX(I)
END DO
END IF
RETURN
END
+127 -69
View File
@@ -1,5 +1,108 @@
*> \brief \b CSROT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
*
* .. Scalar Arguments ..
* INTEGER INCX, INCY, N
* REAL C, S
* ..
* .. Array Arguments ..
* COMPLEX CX( * ), CY( * )
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSROT applies a plane rotation, where the cos and sin (c and s) are real
*> and the vectors cx and cy are complex.
*> jack dongarra, linpack, 3/11/78.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the vectors cx and cy.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in,out] CX
*> \verbatim
*> CX is COMPLEX array, dimension at least
*> ( 1 + ( N - 1 )*abs( INCX ) ).
*> Before entry, the incremented array CX must contain the n
*> element vector cx. On exit, CX is overwritten by the updated
*> vector cx.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> CX. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] CY
*> \verbatim
*> CY is COMPLEX array, dimension at least
*> ( 1 + ( N - 1 )*abs( INCY ) ).
*> Before entry, the incremented array CY must contain the n
*> element vector cy. On exit, CY is overwritten by the updated
*> vector cy.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> CY. INCY must not be zero.
*> \endverbatim
*>
*> \param[in] C
*> \verbatim
*> C is REAL
*> On entry, C specifies the cosine, cos.
*> \endverbatim
*>
*> \param[in] S
*> \verbatim
*> S is REAL
*> On entry, S specifies the sine, sin.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
* =====================================================================
SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
REAL C, S
@@ -8,51 +111,6 @@
COMPLEX CX( * ), CY( * )
* ..
*
* Purpose
* =======
*
* Applies a plane rotation, where the cos and sin (c and s) are real
* and the vectors cx and cy are complex.
* jack dongarra, linpack, 3/11/78.
*
* Arguments
* ==========
*
* N (input) INTEGER
* On entry, N specifies the order of the vectors cx and cy.
* N must be at least zero.
* Unchanged on exit.
*
* CX (input) COMPLEX array, dimension at least
* ( 1 + ( N - 1 )*abs( INCX ) ).
* Before entry, the incremented array CX must contain the n
* element vector cx. On exit, CX is overwritten by the updated
* vector cx.
*
* INCX (input) INTEGER
* On entry, INCX specifies the increment for the elements of
* CX. INCX must not be zero.
* Unchanged on exit.
*
* CY (input) COMPLEX array, dimension at least
* ( 1 + ( N - 1 )*abs( INCY ) ).
* Before entry, the incremented array CY must contain the n
* element vector cy. On exit, CY is overwritten by the updated
* vector cy.
*
* INCY (input) INTEGER
* On entry, INCY specifies the increment for the elements of
* CY. INCY must not be zero.
* Unchanged on exit.
*
* C (input) REAL
* On entry, C specifies the cosine, cos.
* Unchanged on exit.
*
* S (input) REAL
* On entry, S specifies the sine, sin.
* Unchanged on exit.
*
* =====================================================================
*
* .. Local Scalars ..
@@ -63,33 +121,33 @@
*
IF( N.LE.0 )
$ RETURN
IF( INCX.EQ.1 .AND. INCY.EQ.1 )
$ GO TO 20
IF( INCX.EQ.1 .AND. INCY.EQ.1 ) THEN
*
* code for both increments equal to 1
*
DO I = 1, N
CTEMP = C*CX( I ) + S*CY( I )
CY( I ) = C*CY( I ) - S*CX( I )
CX( I ) = CTEMP
END DO
ELSE
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF( INCX.LT.0 )
$ IX = ( -N+1 )*INCX + 1
IF( INCY.LT.0 )
$ IY = ( -N+1 )*INCY + 1
DO 10 I = 1, N
CTEMP = C*CX( IX ) + S*CY( IY )
CY( IY ) = C*CY( IY ) - S*CX( IX )
CX( IX ) = CTEMP
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1, N
CTEMP = C*CX( I ) + S*CY( I )
CY( I ) = C*CY( I ) - S*CX( I )
CX( I ) = CTEMP
30 CONTINUE
IX = 1
IY = 1
IF( INCX.LT.0 )
$ IX = ( -N+1 )*INCX + 1
IF( INCY.LT.0 )
$ IY = ( -N+1 )*INCY + 1
DO I = 1, N
CTEMP = C*CX( IX ) + S*CY( IY )
CY( IY ) = C*CY( IY ) - S*CX( IX )
CX( IX ) = CTEMP
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+72 -20
View File
@@ -1,4 +1,62 @@
*> \brief \b CSSCAL
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSSCAL(N,SA,CX,INCX)
*
* .. Scalar Arguments ..
* REAL SA
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSSCAL scales a complex vector by a real constant.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSSCAL(N,SA,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL SA
INTEGER INCX,N
@@ -7,14 +65,7 @@
COMPLEX CX(*)
* ..
*
* Purpose
* =======
*
* scales a complex vector by a real constant.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,NINCX
@@ -23,20 +74,21 @@
INTRINSIC AIMAG,CMPLX,REAL
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 DO 30 I = 1,N
CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
30 CONTINUE
DO I = 1,N
CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
END DO
END IF
RETURN
END
+78 -27
View File
@@ -1,4 +1,60 @@
*> \brief \b CSWAP
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSWAP interchanges two vectors.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,42 +62,37 @@
COMPLEX CX(*),CY(*)
* ..
*
* Purpose
* =======
*
* interchanges two vectors.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
COMPLEX CTEMP
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
DO I = 1,N
CTEMP = CX(I)
CX(I) = CY(I)
CY(I) = CTEMP
END DO
ELSE
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
CTEMP = CX(IX)
CX(IX) = CY(IY)
CY(IY) = CTEMP
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
*
* code for both increments equal to 1
20 DO 30 I = 1,N
CTEMP = CX(I)
CX(I) = CY(I)
CY(I) = CTEMP
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CTEMP = CX(IX)
CX(IX) = CY(IY)
CY(IY) = CTEMP
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+196 -123
View File
@@ -1,4 +1,199 @@
*> \brief \b CSYMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER LDA,LDB,LDC,M,N
* CHARACTER SIDE,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSYMM performs one of the matrix-matrix operations
*>
*> C := alpha*A*B + beta*C,
*>
*> or
*>
*> C := alpha*B*A + beta*C,
*>
*> where alpha and beta are scalars, A is a symmetric matrix and B and
*> C are m by n matrices.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether the symmetric matrix A
*> appears on the left or right in the operation as follows:
*>
*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*>
*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the symmetric matrix A is to be
*> referenced as follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of the
*> symmetric matrix is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of the
*> symmetric matrix is to be referenced.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix C.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix C.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> m when SIDE = 'L' or 'l' and is n otherwise.
*> Before entry with SIDE = 'L' or 'l', the m by m part of
*> the array A must contain the symmetric matrix, such that
*> when UPLO = 'U' or 'u', the leading m by m upper triangular
*> part of the array A must contain the upper triangular part
*> of the symmetric matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading m by m lower triangular part of the array A
*> must contain the lower triangular part of the symmetric
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> Before entry with SIDE = 'R' or 'r', the n by n part of
*> the array A must contain the symmetric matrix, such that
*> when UPLO = 'U' or 'u', the leading n by n upper triangular
*> part of the array A must contain the upper triangular part
*> of the symmetric matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading n by n lower triangular part of the array A
*> must contain the lower triangular part of the symmetric
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), otherwise LDA must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is 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.
*> On exit, the array C is overwritten by the m by n updated
*> matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER LDA,LDB,LDC,M,N
@@ -8,129 +203,7 @@
COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CSYMM performs one of the matrix-matrix operations
*
* C := alpha*A*B + beta*C,
*
* or
*
* C := alpha*B*A + beta*C,
*
* where alpha and beta are scalars, A is a symmetric matrix and B and
* C are m by n matrices.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether the symmetric matrix A
* appears on the left or right in the operation as follows:
*
* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*
* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the symmetric matrix A is to be
* referenced as follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of the
* symmetric matrix is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of the
* symmetric matrix is to be referenced.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix C.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix C.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* m when SIDE = 'L' or 'l' and is n otherwise.
* Before entry with SIDE = 'L' or 'l', the m by m part of
* the array A must contain the symmetric matrix, such that
* when UPLO = 'U' or 'u', the leading m by m upper triangular
* part of the array A must contain the upper triangular part
* of the symmetric matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading m by m lower triangular part of the array A
* must contain the lower triangular part of the symmetric
* matrix and the strictly upper triangular part of A is not
* referenced.
* Before entry with SIDE = 'R' or 'r', the n by n part of
* the array A must contain the symmetric matrix, such that
* when UPLO = 'U' or 'u', the leading n by n upper triangular
* part of the array A must contain the upper triangular part
* of the symmetric matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading n by n lower triangular part of the array A
* must contain the lower triangular part of the symmetric
* matrix and the strictly upper triangular part of A is not
* referenced.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), otherwise LDA must be at
* least max( 1, n ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* 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.
* On exit, the array C is overwritten by the m by n updated
* matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
+197 -124
View File
@@ -1,4 +1,198 @@
*> \brief \b CSYR2K
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSYR2K performs one of the symmetric rank 2k operations
*>
*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
*>
*> or
*>
*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
*>
*> where alpha and beta are scalars, C is an n by n symmetric matrix
*> and A and B are n by k matrices in the first case and k by n
*> matrices in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
*> beta*C.
*>
*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
*> beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrices A and B, and on entry with
*> TRANS = 'T' or 't', K specifies the number of rows of the
*> matrices A and B. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array B must contain the matrix B, otherwise
*> the leading k by n part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDB must be at least max( 1, n ), otherwise LDB must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is COMPLEX array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER K,LDA,LDB,LDC,N
@@ -8,128 +202,7 @@
COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CSYR2K performs one of the symmetric rank 2k operations
*
* C := alpha*A*B' + alpha*B*A' + beta*C,
*
* or
*
* C := alpha*A'*B + alpha*B'*A + beta*C,
*
* where alpha and beta are scalars, C is an n by n symmetric matrix
* and A and B are n by k matrices in the first case and k by n
* matrices in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' +
* beta*C.
*
* TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A +
* beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrices A and B, and on entry with
* TRANS = 'T' or 't', K specifies the number of rows of the
* matrices A and B. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, kb ), where kb is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array B must contain the matrix B, otherwise
* the leading k by n part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDB must be at least max( 1, n ), otherwise LDB must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - COMPLEX array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -228,7 +301,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*B' + alpha*B*A' + C.
* Form C := alpha*A*B**T + alpha*B*A**T + C.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -277,7 +350,7 @@
END IF
ELSE
*
* Form C := alpha*A'*B + alpha*B'*A + C.
* Form C := alpha*A**T*B + alpha*B**T*A + C.
*
IF (UPPER) THEN
DO 210 J = 1,N
+176 -107
View File
@@ -1,4 +1,177 @@
*> \brief \b CSYRK
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA,BETA
* INTEGER K,LDA,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CSYRK performs one of the symmetric rank k operations
*>
*> C := alpha*A*A**T + beta*C,
*>
*> or
*>
*> C := alpha*A**T*A + beta*C,
*>
*> where alpha and beta are scalars, C is an n by n symmetric matrix
*> and A is an n by k matrix in the first case and a k by n matrix
*> in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
*>
*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrix A, and on entry with
*> TRANS = 'T' or 't', K specifies the number of rows of the
*> matrix A. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is COMPLEX array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
INTEGER K,LDA,LDC,N
@@ -8,111 +181,7 @@
COMPLEX A(LDA,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* CSYRK performs one of the symmetric rank k operations
*
* C := alpha*A*A' + beta*C,
*
* or
*
* C := alpha*A'*A + beta*C,
*
* where alpha and beta are scalars, C is an n by n symmetric matrix
* and A is an n by k matrix in the first case and a k by n matrix
* in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*A' + beta*C.
*
* TRANS = 'T' or 't' C := alpha*A'*A + beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrix A, and on entry with
* TRANS = 'T' or 't', K specifies the number of rows of the
* matrix A. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - COMPLEX .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - COMPLEX array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -209,7 +278,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*A' + beta*C.
* Form C := alpha*A*A**T + beta*C.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -254,7 +323,7 @@
END IF
ELSE
*
* Form C := alpha*A'*A + beta*C.
* Form C := alpha*A**T*A + beta*C.
*
IF (UPPER) THEN
DO 210 J = 1,N
+194 -128
View File
@@ -1,4 +1,196 @@
*> \brief \b CTBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,K,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTBMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x, or x := A**H*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**H*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with UPLO = 'U' or 'u', K specifies the number of
*> super-diagonals of the matrix A.
*> On entry with UPLO = 'L' or 'l', K specifies the number of
*> sub-diagonals of the matrix A.
*> K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer an upper
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer a lower
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Note that when DIAG = 'U' or 'u' the elements of the array A
*> corresponding to the diagonal elements of the matrix are not
*> referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,133 +199,7 @@
COMPLEX A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* CTBMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x, or x := conjg( A' )*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := conjg( A' )*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with UPLO = 'U' or 'u', K specifies the number of
* super-diagonals of the matrix A.
* On entry with UPLO = 'L' or 'l', K specifies the number of
* sub-diagonals of the matrix A.
* K must satisfy 0 .le. K.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer an upper
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer a lower
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Note that when DIAG = 'U' or 'u' the elements of the array A
* corresponding to the diagonal elements of the matrix are not
* referenced, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -265,7 +331,7 @@
END IF
ELSE
*
* Form x := A'*x or x := conjg( A' )*x.
* Form x := A**T*x or x := A**H*x.
*
IF (LSAME(UPLO,'U')) THEN
KPLUS1 = K + 1
+197 -132
View File
@@ -1,4 +1,199 @@
*> \brief \b CTBSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,K,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTBSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b, or A**H*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
*> diagonals.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**H*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with UPLO = 'U' or 'u', K specifies the number of
*> super-diagonals of the matrix A.
*> On entry with UPLO = 'L' or 'l', K specifies the number of
*> sub-diagonals of the matrix A.
*> K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer an upper
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer a lower
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Note that when DIAG = 'U' or 'u' the elements of the array A
*> corresponding to the diagonal elements of the matrix are not
*> referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,137 +202,7 @@
COMPLEX A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* CTBSV solves one of the systems of equations
*
* A*x = b, or A'*x = b, or conjg( A' )*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular band matrix, with ( k + 1 )
* diagonals.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' conjg( A' )*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with UPLO = 'U' or 'u', K specifies the number of
* super-diagonals of the matrix A.
* On entry with UPLO = 'L' or 'l', K specifies the number of
* sub-diagonals of the matrix A.
* K must satisfy 0 .le. K.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer an upper
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer a lower
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Note that when DIAG = 'U' or 'u' the elements of the array A
* corresponding to the diagonal elements of the matrix are not
* referenced, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -269,7 +334,7 @@
END IF
ELSE
*
* Form x := inv( A' )*x or x := inv( conjg( A') )*x.
* Form x := inv( A**T )*x or x := inv( A**H )*x.
*
IF (LSAME(UPLO,'U')) THEN
KPLUS1 = K + 1
+150 -88
View File
@@ -1,4 +1,152 @@
*> \brief \b CTPMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTPMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x, or x := A**H*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**H*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is COMPLEX array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
*> respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
*> respectively, and so on.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,93 +155,7 @@
COMPLEX AP(*),X(*)
* ..
*
* Purpose
* =======
*
* CTPMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x, or x := conjg( A' )*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := conjg( A' )*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* AP - COMPLEX array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
* respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
* respectively, and so on.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced, but are assumed to be unity.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -224,7 +286,7 @@
END IF
ELSE
*
* Form x := A'*x or x := conjg( A' )*x.
* Form x := A**T*x or x := A**H*x.
*
IF (LSAME(UPLO,'U')) THEN
KK = (N* (N+1))/2
+152 -91
View File
@@ -1,4 +1,154 @@
*> \brief \b CTPSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTPSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b, or A**H*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular matrix, supplied in packed form.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**H*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is COMPLEX array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
*> respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
*> respectively, and so on.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,96 +157,7 @@
COMPLEX AP(*),X(*)
* ..
*
* Purpose
* =======
*
* CTPSV solves one of the systems of equations
*
* A*x = b, or A'*x = b, or conjg( A' )*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular matrix, supplied in packed form.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' conjg( A' )*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* AP - COMPLEX array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
* respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
* respectively, and so on.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced, but are assumed to be unity.
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -226,7 +287,7 @@
END IF
ELSE
*
* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x.
* Form x := inv( A**T )*x or x := inv( A**H )*x.
*
IF (LSAME(UPLO,'U')) THEN
KK = 1
+186 -117
View File
@@ -1,4 +1,187 @@
*> \brief \b CTRMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER LDA,LDB,M,N
* CHARACTER DIAG,SIDE,TRANSA,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTRMM performs one of the matrix-matrix operations
*>
*> B := alpha*op( A )*B, or B := alpha*B*op( A )
*>
*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
*> non-unit, upper or lower triangular matrix and op( A ) is one of
*>
*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether op( A ) multiplies B from
*> the left or right as follows:
*>
*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
*>
*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix A is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n' op( A ) = A.
*>
*> TRANSA = 'T' or 't' op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c' op( A ) = A**H.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit triangular
*> as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of B. M must be at
*> least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of B. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha. When alpha is
*> zero then A is not referenced and B need not be set before
*> entry.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, k ), where k is m
*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
*> Before entry with UPLO = 'U' or 'u', the leading k by k
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading k by k
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
*> then LDA must be at least max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B, and on exit is overwritten by the
*> transformed matrix.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER LDA,LDB,M,N
@@ -8,121 +191,7 @@
COMPLEX A(LDA,*),B(LDB,*)
* ..
*
* Purpose
* =======
*
* CTRMM performs one of the matrix-matrix operations
*
* B := alpha*op( A )*B, or B := alpha*B*op( A )
*
* where alpha is a scalar, B is an m by n matrix, A is a unit, or
* non-unit, upper or lower triangular matrix and op( A ) is one of
*
* op( A ) = A or op( A ) = A' or op( A ) = conjg( A' ).
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether op( A ) multiplies B from
* the left or right as follows:
*
* SIDE = 'L' or 'l' B := alpha*op( A )*B.
*
* SIDE = 'R' or 'r' B := alpha*B*op( A ).
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix A is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n' op( A ) = A.
*
* TRANSA = 'T' or 't' op( A ) = A'.
*
* TRANSA = 'C' or 'c' op( A ) = conjg( A' ).
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit triangular
* as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of B. M must be at
* least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of B. N must be
* at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha. When alpha is
* zero then A is not referenced and B need not be set before
* entry.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, k ), where k is m
* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
* Before entry with UPLO = 'U' or 'u', the leading k by k
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading k by k
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
* then LDA must be at least max( 1, n ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the matrix B, and on exit is overwritten by the
* transformed matrix.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -234,7 +303,7 @@
END IF
ELSE
*
* Form B := alpha*A'*B or B := alpha*conjg( A' )*B.
* Form B := alpha*A**T*B or B := alpha*A**H*B.
*
IF (UPPER) THEN
DO 120 J = 1,N
@@ -314,7 +383,7 @@
END IF
ELSE
*
* Form B := alpha*B*A' or B := alpha*B*conjg( A' ).
* Form B := alpha*B*A**T or B := alpha*B*A**H.
*
IF (UPPER) THEN
DO 280 K = 1,N
+155 -91
View File
@@ -1,4 +1,157 @@
*> \brief \b CTRMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTRMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x, or x := A**H*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**H*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,96 +160,7 @@
COMPLEX A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* CTRMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x, or x := conjg( A' )*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := conjg( A' )*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -219,7 +283,7 @@
END IF
ELSE
*
* Form x := A'*x or x := conjg( A' )*x.
* Form x := A**T*x or x := A**H*x.
*
IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN
+191 -121
View File
@@ -1,4 +1,190 @@
*> \brief \b CTRSM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* .. Scalar Arguments ..
* COMPLEX ALPHA
* INTEGER LDA,LDB,M,N
* CHARACTER DIAG,SIDE,TRANSA,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),B(LDB,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTRSM solves one of the matrix equations
*>
*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
*>
*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
*> non-unit, upper or lower triangular matrix and op( A ) is one of
*>
*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
*>
*> The matrix X is overwritten on B.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether op( A ) appears on the left
*> or right of X as follows:
*>
*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
*>
*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix A is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n' op( A ) = A.
*>
*> TRANSA = 'T' or 't' op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c' op( A ) = A**H.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit triangular
*> as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of B. M must be at
*> least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of B. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha. When alpha is
*> zero then A is not referenced and B need not be set before
*> entry.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, k ),
*> where k is m when SIDE = 'L' or 'l'
*> and k is n when SIDE = 'R' or 'r'.
*> Before entry with UPLO = 'U' or 'u', the leading k by k
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading k by k
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
*> then LDA must be at least max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] B
*> \verbatim
*> B is COMPLEX array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the right-hand side matrix B, and on exit is
*> overwritten by the solution matrix X.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
COMPLEX ALPHA
INTEGER LDA,LDB,M,N
@@ -8,123 +194,7 @@
COMPLEX A(LDA,*),B(LDB,*)
* ..
*
* Purpose
* =======
*
* CTRSM solves one of the matrix equations
*
* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
*
* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
* non-unit, upper or lower triangular matrix and op( A ) is one of
*
* op( A ) = A or op( A ) = A' or op( A ) = conjg( A' ).
*
* The matrix X is overwritten on B.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether op( A ) appears on the left
* or right of X as follows:
*
* SIDE = 'L' or 'l' op( A )*X = alpha*B.
*
* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix A is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n' op( A ) = A.
*
* TRANSA = 'T' or 't' op( A ) = A'.
*
* TRANSA = 'C' or 'c' op( A ) = conjg( A' ).
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit triangular
* as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of B. M must be at
* least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of B. N must be
* at least zero.
* Unchanged on exit.
*
* ALPHA - COMPLEX .
* On entry, ALPHA specifies the scalar alpha. When alpha is
* zero then A is not referenced and B need not be set before
* entry.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, k ), where k is m
* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
* Before entry with UPLO = 'U' or 'u', the leading k by k
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading k by k
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
* then LDA must be at least max( 1, n ).
* Unchanged on exit.
*
* B - COMPLEX array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the right-hand side matrix B, and on exit is
* overwritten by the solution matrix X.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -242,8 +312,8 @@
END IF
ELSE
*
* Form B := alpha*inv( A' )*B
* or B := alpha*inv( conjg( A' ) )*B.
* Form B := alpha*inv( A**T )*B
* or B := alpha*inv( A**H )*B.
*
IF (UPPER) THEN
DO 140 J = 1,N
@@ -333,8 +403,8 @@
END IF
ELSE
*
* Form B := alpha*B*inv( A' )
* or B := alpha*B*inv( conjg( A' ) ).
* Form B := alpha*B*inv( A**T )
* or B := alpha*B*inv( A**H ).
*
IF (UPPER) THEN
DO 330 K = N,1,-1
+157 -94
View File
@@ -1,4 +1,159 @@
*> \brief \b CTRSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* COMPLEX A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CTRSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b, or A**H*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular matrix.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**H*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is COMPLEX array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is COMPLEX array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,99 +162,7 @@
COMPLEX A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* CTRSV solves one of the systems of equations
*
* A*x = b, or A'*x = b, or conjg( A' )*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular matrix.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' conjg( A' )*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* A - COMPLEX array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - COMPLEX array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
@@ -221,7 +284,7 @@
END IF
ELSE
*
* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x.
* Form x := inv( A**T )*x or x := inv( A**H )*x.
*
IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN
+85 -31
View File
@@ -1,4 +1,61 @@
*> \brief \b DASUM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DASUM takes the sum of the absolute values.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,14 +63,7 @@
DOUBLE PRECISION DX(*)
* ..
*
* Purpose
* =======
*
* takes the sum of the absolute values.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DTEMP
@@ -25,33 +75,37 @@
DASUM = 0.0d0
DTEMP = 0.0d0
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
DTEMP = DTEMP + DABS(DX(I))
10 CONTINUE
DASUM = DTEMP
RETURN
*
IF (INCX.EQ.1) THEN
* code for increment equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,6)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DTEMP = DTEMP + DABS(DX(I))
30 CONTINUE
IF (N.LT.6) GO TO 60
40 MP1 = M + 1
DO 50 I = MP1,N,6
DTEMP = DTEMP + DABS(DX(I)) + DABS(DX(I+1)) + DABS(DX(I+2)) +
+ DABS(DX(I+3)) + DABS(DX(I+4)) + DABS(DX(I+5))
50 CONTINUE
60 DASUM = DTEMP
M = MOD(N,6)
IF (M.NE.0) THEN
DO I = 1,M
DTEMP = DTEMP + DABS(DX(I))
END DO
IF (N.LT.6) THEN
DASUM = DTEMP
RETURN
END IF
END IF
MP1 = M + 1
DO I = MP1,N,6
DTEMP = DTEMP + DABS(DX(I)) + DABS(DX(I+1)) +
$ DABS(DX(I+2)) + DABS(DX(I+3)) +
$ DABS(DX(I+4)) + DABS(DX(I+5))
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
DTEMP = DTEMP + DABS(DX(I))
END DO
END IF
DASUM = DTEMP
RETURN
END
+89 -36
View File
@@ -1,4 +1,62 @@
*> \brief \b DAXPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION DA
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DAXPY constant times a vector plus a vector.
*> uses unrolled loops for increments equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA
INTEGER INCX,INCY,N
@@ -7,14 +65,7 @@
DOUBLE PRECISION DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* constant times a vector plus a vector.
* uses unrolled loops for increments equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
@@ -24,39 +75,41 @@
* ..
IF (N.LE.0) RETURN
IF (DA.EQ.0.0d0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
DY(IY) = DY(IY) + DA*DX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,4)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DY(I) = DY(I) + DA*DX(I)
30 CONTINUE
IF (N.LT.4) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,4
DY(I) = DY(I) + DA*DX(I)
DY(I+1) = DY(I+1) + DA*DX(I+1)
DY(I+2) = DY(I+2) + DA*DX(I+2)
DY(I+3) = DY(I+3) + DA*DX(I+3)
50 CONTINUE
M = MOD(N,4)
IF (M.NE.0) THEN
DO I = 1,M
DY(I) = DY(I) + DA*DX(I)
END DO
END IF
IF (N.LT.4) RETURN
MP1 = M + 1
DO I = MP1,N,4
DY(I) = DY(I) + DA*DX(I)
DY(I+1) = DY(I+1) + DA*DX(I+1)
DY(I+2) = DY(I+2) + DA*DX(I+2)
DY(I+3) = DY(I+3) + DA*DX(I+3)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DY(IY) = DY(IY) + DA*DX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+50 -8
View File
@@ -1,12 +1,54 @@
DOUBLE PRECISION FUNCTION DCABS1(Z)
* .. Scalar Arguments ..
DOUBLE COMPLEX Z
* ..
* ..
* Purpose
* =======
*> \brief \b DCABS1
*
* DCABS1 computes absolute value of a double complex number
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DCABS1(Z)
*
* .. Scalar Arguments ..
* COMPLEX*16 Z
* ..
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DCABS1 computes |Re(.)| + |Im(.)| of a double complex number
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup double_blas_level1
*
* =====================================================================
DOUBLE PRECISION FUNCTION DCABS1(Z)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
COMPLEX*16 Z
* ..
* ..
* =====================================================================
*
* .. Intrinsic Functions ..
INTRINSIC ABS,DBLE,DIMAG
+91 -39
View File
@@ -1,4 +1,61 @@
*> \brief \b DCOPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DCOPY copies a vector, x, to a vector, y.
*> uses unrolled loops for increments equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,14 +63,7 @@
DOUBLE PRECISION DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* copies a vector, x, to a vector, y.
* uses unrolled loops for increments equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
@@ -22,42 +72,44 @@
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
DY(IY) = DX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,7)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DY(I) = DX(I)
30 CONTINUE
IF (N.LT.7) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,7
DY(I) = DX(I)
DY(I+1) = DX(I+1)
DY(I+2) = DX(I+2)
DY(I+3) = DX(I+3)
DY(I+4) = DX(I+4)
DY(I+5) = DX(I+5)
DY(I+6) = DX(I+6)
50 CONTINUE
M = MOD(N,7)
IF (M.NE.0) THEN
DO I = 1,M
DY(I) = DX(I)
END DO
IF (N.LT.7) RETURN
END IF
MP1 = M + 1
DO I = MP1,N,7
DY(I) = DX(I)
DY(I+1) = DX(I+1)
DY(I+2) = DX(I+2)
DY(I+3) = DX(I+3)
DY(I+4) = DX(I+4)
DY(I+5) = DX(I+5)
DY(I+6) = DX(I+6)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DY(IY) = DX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+89 -35
View File
@@ -1,4 +1,61 @@
*> \brief \b DDOT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DDOT forms the dot product of two vectors.
*> uses unrolled loops for increments equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,14 +63,7 @@
DOUBLE PRECISION DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* forms the dot product of two vectors.
* uses unrolled loops for increments equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DTEMP
@@ -25,39 +75,43 @@
DDOT = 0.0d0
DTEMP = 0.0d0
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
DTEMP = DTEMP + DX(IX)*DY(IY)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
DDOT = DTEMP
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,5)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DTEMP = DTEMP + DX(I)*DY(I)
30 CONTINUE
IF (N.LT.5) GO TO 60
40 MP1 = M + 1
DO 50 I = MP1,N,5
M = MOD(N,5)
IF (M.NE.0) THEN
DO I = 1,M
DTEMP = DTEMP + DX(I)*DY(I)
END DO
IF (N.LT.5) THEN
DDOT=DTEMP
RETURN
END IF
END IF
MP1 = M + 1
DO I = MP1,N,5
DTEMP = DTEMP + DX(I)*DY(I) + DX(I+1)*DY(I+1) +
+ DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
50 CONTINUE
60 DDOT = DTEMP
$ DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DTEMP = DTEMP + DX(IX)*DY(IY)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
DDOT = DTEMP
RETURN
END
+205 -132
View File
@@ -1,4 +1,195 @@
*> \brief \b DGBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,KL,KU,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DGBMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] KL
*> \verbatim
*> KL is INTEGER
*> On entry, KL specifies the number of sub-diagonals of the
*> matrix A. KL must satisfy 0 .le. KL.
*> \endverbatim
*>
*> \param[in] KU
*> \verbatim
*> KU is INTEGER
*> On entry, KU specifies the number of super-diagonals of the
*> matrix A. KU must satisfy 0 .le. KU.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry, the leading ( kl + ku + 1 ) by n part of the
*> array A must contain the matrix of coefficients, supplied
*> column by column, with the leading diagonal of the matrix in
*> row ( ku + 1 ) of the array, the first super-diagonal
*> starting at position 2 in row ku, the first sub-diagonal
*> starting at position 1 in row ( ku + 2 ), and so on.
*> Elements in the array A that do not correspond to elements
*> in the band matrix (such as the top left ku by ku triangle)
*> are not referenced.
*> The following program segment will transfer a band matrix
*> from conventional full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> K = KU + 1 - J
*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
*> A( K + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( kl + ku + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION 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.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION 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, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,KL,KU,LDA,M,N
@@ -8,121 +199,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DGBMV performs one of the matrix-vector operations
*
* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
*
* where alpha and beta are scalars, x and y are vectors and A is an
* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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*A'*x + beta*y.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* KL - INTEGER.
* On entry, KL specifies the number of sub-diagonals of the
* matrix A. KL must satisfy 0 .le. KL.
* Unchanged on exit.
*
* KU - INTEGER.
* On entry, KU specifies the number of super-diagonals of the
* matrix A. KU must satisfy 0 .le. KU.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry, the leading ( kl + ku + 1 ) by n part of the
* array A must contain the matrix of coefficients, supplied
* column by column, with the leading diagonal of the matrix in
* row ( ku + 1 ) of the array, the first super-diagonal
* starting at position 2 in row ku, the first sub-diagonal
* starting at position 1 in row ( ku + 2 ), and so on.
* Elements in the array A that do not correspond to elements
* in the band matrix (such as the top left ku by ku triangle)
* are not referenced.
* The following program segment will transfer a band matrix
* from conventional full matrix storage to band storage:
*
* DO 20, J = 1, N
* K = KU + 1 - J
* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
* A( K + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( kl + ku + 1 ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION 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 - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION 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, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
@@ -235,33 +312,29 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
IF (J.GT.KU) KY = KY + INCY
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y.
* Form y := alpha*A**T*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+205 -134
View File
@@ -1,4 +1,197 @@
*> \brief \b DGEMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,M,N
* CHARACTER TRANSA,TRANSB
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DGEMM performs one of the matrix-matrix operations
*>
*> C := alpha*op( A )*op( B ) + beta*C,
*>
*> where op( X ) is one of
*>
*> op( X ) = X or op( X ) = X**T,
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n', op( A ) = A.
*>
*> TRANSA = 'T' or 't', op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c', op( A ) = A**T.
*> \endverbatim
*>
*> \param[in] TRANSB
*> \verbatim
*> TRANSB is CHARACTER*1
*> On entry, TRANSB specifies the form of op( B ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSB = 'N' or 'n', op( B ) = B.
*>
*> TRANSB = 'T' or 't', op( B ) = B**T.
*>
*> TRANSB = 'C' or 'c', op( B ) = B**T.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix
*> op( A ) and of the matrix C. M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix
*> op( B ) and the number of columns of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of columns of the matrix
*> op( A ) and the number of rows of the matrix op( B ). K must
*> be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION 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 A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as 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 ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is DOUBLE PRECISION 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 contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
*> LDB must be at least max( 1, k ), otherwise LDB must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION 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.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER K,LDA,LDB,LDC,M,N
@@ -8,125 +201,7 @@
DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* DGEMM performs one of the matrix-matrix operations
*
* C := alpha*op( A )*op( B ) + beta*C,
*
* where op( X ) is one of
*
* op( X ) = X or op( X ) = X',
*
* alpha and beta are scalars, and A, B and C are matrices, with op( A )
* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*
* Arguments
* ==========
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n', op( A ) = A.
*
* TRANSA = 'T' or 't', op( A ) = A'.
*
* TRANSA = 'C' or 'c', op( A ) = A'.
*
* Unchanged on exit.
*
* TRANSB - CHARACTER*1.
* On entry, TRANSB specifies the form of op( B ) to be used in
* the matrix multiplication as follows:
*
* TRANSB = 'N' or 'n', op( B ) = B.
*
* TRANSB = 'T' or 't', op( B ) = B'.
*
* TRANSB = 'C' or 'c', op( B ) = B'.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix
* op( A ) and of the matrix C. M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix
* op( B ) and the number of columns of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of columns of the matrix
* op( A ) and the number of rows of the matrix op( B ). K must
* be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION 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 A, otherwise
* the leading k by m part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as 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 ).
* Unchanged on exit.
*
* B - DOUBLE PRECISION 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 contain the matrix B, otherwise
* the leading n by k part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANSB = 'N' or 'n' then
* LDB must be at least max( 1, k ), otherwise LDB must be at
* least max( 1, n ).
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* C - DOUBLE PRECISION 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.
* On exit, the array C is overwritten by the m by n matrix
* ( alpha*op( A )*op( B ) + beta*C ).
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -236,17 +311,15 @@
60 CONTINUE
END IF
DO 80 L = 1,K
IF (B(L,J).NE.ZERO) THEN
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
END IF
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
80 CONTINUE
90 CONTINUE
ELSE
*
* Form C := alpha*A'*B + beta*C
* Form C := alpha*A**T*B + beta*C
*
DO 120 J = 1,N
DO 110 I = 1,M
@@ -265,7 +338,7 @@
ELSE
IF (NOTA) THEN
*
* Form C := alpha*A*B' + beta*C
* Form C := alpha*A*B**T + beta*C
*
DO 170 J = 1,N
IF (BETA.EQ.ZERO) THEN
@@ -278,17 +351,15 @@
140 CONTINUE
END IF
DO 160 L = 1,K
IF (B(J,L).NE.ZERO) THEN
TEMP = ALPHA*B(J,L)
DO 150 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
150 CONTINUE
END IF
TEMP = ALPHA*B(J,L)
DO 150 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
150 CONTINUE
160 CONTINUE
170 CONTINUE
ELSE
*
* Form C := alpha*A'*B' + beta*C
* Form C := alpha*A**T*B**T + beta*C
*
DO 200 J = 1,N
DO 190 I = 1,M
+174 -105
View File
@@ -1,4 +1,166 @@
*> \brief \b DGEMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DGEMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry, the leading m by n part of the array A must
*> contain the matrix of coefficients.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION 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.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION 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.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
@@ -8,96 +170,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DGEMV performs one of the matrix-vector operations
*
* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
*
* where alpha and beta are scalars, x and y are vectors and A is an
* m by n matrix.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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*A'*x + beta*y.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION 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 - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION 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 - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION 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 - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
@@ -205,30 +278,26 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y.
* Form y := alpha*A**T*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+137 -69
View File
@@ -1,4 +1,140 @@
*> \brief \b DGER
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,INCY,LDA,M,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DGER performs the rank 1 operation
*>
*> A := alpha*x*y**T + A,
*>
*> where alpha is a scalar, x is an m element vector, y is an n element
*> vector and A is an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( m - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the m
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, 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.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,INCY,LDA,M,N
@@ -7,75 +143,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DGER performs the rank 1 operation
*
* A := alpha*x*y' + A,
*
* where alpha is a scalar, x is an m element vector, y is an n element
* vector and A is an m by n matrix.
*
* Arguments
* ==========
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( m - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the m
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, 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.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
+61 -13
View File
@@ -1,4 +1,64 @@
*> \brief \b DNRM2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DNRM2 returns the euclidean norm of a vector via the function
*> name, so that
*>
*> DNRM2 := sqrt( x'*x )
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> -- This version written on 25-October-1982.
*> Modified on 14-October-1993 to inline the call to DLASSQ.
*> Sven Hammarling, Nag Ltd.
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,19 +66,7 @@
DOUBLE PRECISION X(*)
* ..
*
* Purpose
* =======
*
* DNRM2 returns the euclidean norm of a vector via the function
* name, so that
*
* DNRM2 := sqrt( x'*x )
*
*
* -- This version written on 25-October-1982.
* Modified on 14-October-1993 to inline the call to DLASSQ.
* Sven Hammarling, Nag Ltd.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
+80 -28
View File
@@ -1,4 +1,61 @@
*> \brief \b DROT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION C,S
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DROT applies a plane rotation.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION C,S
INTEGER INCX,INCY,N
@@ -7,43 +64,38 @@
DOUBLE PRECISION DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* applies a plane rotation.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DTEMP
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
DTEMP = C*DX(I) + S*DY(I)
DY(I) = C*DY(I) - S*DX(I)
DX(I) = DTEMP
END DO
ELSE
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
DTEMP = C*DX(IX) + S*DY(IY)
DY(IY) = C*DY(IY) - S*DX(IX)
DX(IX) = DTEMP
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
DTEMP = C*DX(I) + S*DY(I)
DY(I) = C*DY(I) - S*DX(I)
DX(I) = DTEMP
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DTEMP = C*DX(IX) + S*DY(IY)
DY(IY) = C*DY(IY) - S*DX(IX)
DX(IX) = DTEMP
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+68 -20
View File
@@ -1,14 +1,61 @@
*> \brief \b DROTG
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DROTG(DA,DB,C,S)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION C,DA,DB,S
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DROTG construct givens plane rotation.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DROTG(DA,DB,C,S)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION C,DA,DB,S
* ..
*
* Purpose
* =======
*
* construct givens plane rotation.
* jack dongarra, linpack, 3/11/78.
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION R,ROE,SCALE,Z
@@ -19,20 +66,21 @@
ROE = DB
IF (DABS(DA).GT.DABS(DB)) ROE = DA
SCALE = DABS(DA) + DABS(DB)
IF (SCALE.NE.0.0d0) GO TO 10
C = 1.0d0
S = 0.0d0
R = 0.0d0
Z = 0.0d0
GO TO 20
10 R = SCALE*DSQRT((DA/SCALE)**2+ (DB/SCALE)**2)
R = DSIGN(1.0d0,ROE)*R
C = DA/R
S = DB/R
Z = 1.0d0
IF (DABS(DA).GT.DABS(DB)) Z = S
IF (DABS(DB).GE.DABS(DA) .AND. C.NE.0.0d0) Z = 1.0d0/C
20 DA = R
IF (SCALE.EQ.0.0d0) THEN
C = 1.0d0
S = 0.0d0
R = 0.0d0
Z = 0.0d0
ELSE
R = SCALE*DSQRT((DA/SCALE)**2+ (DB/SCALE)**2)
R = DSIGN(1.0d0,ROE)*R
C = DA/R
S = DB/R
Z = 1.0d0
IF (DABS(DA).GT.DABS(DB)) Z = S
IF (DABS(DB).GE.DABS(DA) .AND. C.NE.0.0d0) Z = 1.0d0/C
END IF
DA = R
DB = Z
RETURN
END
+180 -125
View File
@@ -1,55 +1,115 @@
*> \brief \b DROTM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DPARAM(5),DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
*>
*> (DX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF DX ARE IN
*> (DY**T)
*>
*> DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
*> LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY.
*> WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*>
*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
*>
*> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
*> H=( ) ( ) ( ) ( )
*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
*> SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in,out] DX
*> \verbatim
*> DX is DOUBLE PRECISION array, dimension N
*> double precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of DX
*> \endverbatim
*>
*> \param[in,out] DY
*> \verbatim
*> DY is DOUBLE PRECISION array, dimension N
*> double precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of DY
*> \endverbatim
*>
*> \param[in,out] DPARAM
*> \verbatim
*> DPARAM is DOUBLE PRECISION array, dimension 5
*> DPARAM(1)=DFLAG
*> DPARAM(2)=DH11
*> DPARAM(3)=DH21
*> DPARAM(4)=DH12
*> DPARAM(5)=DH22
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
DOUBLE PRECISION DPARAM(5),DX(1),DY(1)
DOUBLE PRECISION DPARAM(5),DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
*
* (DX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF DX ARE IN
* (DY**T)
*
* DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
* LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY.
* WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*
* DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
*
* (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
* H=( ) ( ) ( ) ( )
* (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
* SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
*
* Arguments
* =========
*
* N (input) INTEGER
* number of elements in input vector(s)
*
* DX (input/output) DOUBLE PRECISION array, dimension N
* double precision vector with 5 elements
*
* INCX (input) INTEGER
* storage spacing between elements of DX
*
* DY (input/output) DOUBLE PRECISION array, dimension N
* double precision vector with N elements
*
* INCY (input) INTEGER
* storage spacing between elements of DY
*
* DPARAM (input/output) DOUBLE PRECISION array, dimension 5
* DPARAM(1)=DFLAG
* DPARAM(2)=DH11
* DPARAM(3)=DH21
* DPARAM(4)=DH12
* DPARAM(5)=DH22
*
* =====================================================================
*
* .. Local Scalars ..
@@ -61,87 +121,82 @@
* ..
*
DFLAG = DPARAM(1)
IF (N.LE.0 .OR. (DFLAG+TWO.EQ.ZERO)) GO TO 140
IF (.NOT. (INCX.EQ.INCY.AND.INCX.GT.0)) GO TO 70
IF (N.LE.0 .OR. (DFLAG+TWO.EQ.ZERO)) RETURN
IF (INCX.EQ.INCY.AND.INCX.GT.0) THEN
*
NSTEPS = N*INCX
IF (DFLAG) 50,10,30
10 CONTINUE
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DO 20 I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W + Z*DH12
DY(I) = W*DH21 + Z
20 CONTINUE
GO TO 140
30 CONTINUE
DH11 = DPARAM(2)
DH22 = DPARAM(5)
DO 40 I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W*DH11 + Z
DY(I) = -W + DH22*Z
40 CONTINUE
GO TO 140
50 CONTINUE
DH11 = DPARAM(2)
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DH22 = DPARAM(5)
DO 60 I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W*DH11 + Z*DH12
DY(I) = W*DH21 + Z*DH22
60 CONTINUE
GO TO 140
70 CONTINUE
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
NSTEPS = N*INCX
IF (DFLAG.LT.ZERO) THEN
DH11 = DPARAM(2)
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DH22 = DPARAM(5)
DO I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W*DH11 + Z*DH12
DY(I) = W*DH21 + Z*DH22
END DO
ELSE IF (DFLAG.EQ.ZERO) THEN
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DO I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W + Z*DH12
DY(I) = W*DH21 + Z
END DO
ELSE
DH11 = DPARAM(2)
DH22 = DPARAM(5)
DO I = 1,NSTEPS,INCX
W = DX(I)
Z = DY(I)
DX(I) = W*DH11 + Z
DY(I) = -W + DH22*Z
END DO
END IF
ELSE
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
*
IF (DFLAG) 120,80,100
80 CONTINUE
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DO 90 I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W + Z*DH12
DY(KY) = W*DH21 + Z
KX = KX + INCX
KY = KY + INCY
90 CONTINUE
GO TO 140
100 CONTINUE
DH11 = DPARAM(2)
DH22 = DPARAM(5)
DO 110 I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W*DH11 + Z
DY(KY) = -W + DH22*Z
KX = KX + INCX
KY = KY + INCY
110 CONTINUE
GO TO 140
120 CONTINUE
DH11 = DPARAM(2)
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DH22 = DPARAM(5)
DO 130 I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W*DH11 + Z*DH12
DY(KY) = W*DH21 + Z*DH22
KX = KX + INCX
KY = KY + INCY
130 CONTINUE
140 CONTINUE
IF (DFLAG.LT.ZERO) THEN
DH11 = DPARAM(2)
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DH22 = DPARAM(5)
DO I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W*DH11 + Z*DH12
DY(KY) = W*DH21 + Z*DH22
KX = KX + INCX
KY = KY + INCY
END DO
ELSE IF (DFLAG.EQ.ZERO) THEN
DH12 = DPARAM(4)
DH21 = DPARAM(3)
DO I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W + Z*DH12
DY(KY) = W*DH21 + Z
KX = KX + INCX
KY = KY + INCY
END DO
ELSE
DH11 = DPARAM(2)
DH22 = DPARAM(5)
DO I = 1,N
W = DX(KX)
Z = DY(KY)
DX(KX) = W*DH11 + Z
DY(KY) = -W + DH22*Z
KX = KX + INCX
KY = KY + INCY
END DO
END IF
END IF
RETURN
END
+220 -175
View File
@@ -1,4 +1,100 @@
*> \brief \b DROTMG
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION DD1,DD2,DX1,DY1
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DPARAM(5)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
*> THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*> DY2)**T.
*> WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*>
*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
*>
*> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
*> H=( ) ( ) ( ) ( )
*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
*> LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
*> RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
*> VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
*>
*> THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
*> INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
*> OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in,out] DD1
*> \verbatim
*> DD1 is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[in,out] DD2
*> \verbatim
*> DD2 is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[in,out] DX1
*> \verbatim
*> DX1 is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[in] DY1
*> \verbatim
*> DY1 is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[in,out] DPARAM
*> \verbatim
*> DPARAM is DOUBLE PRECISION array, dimension 5
*> DPARAM(1)=DFLAG
*> DPARAM(2)=DH11
*> DPARAM(3)=DH21
*> DPARAM(4)=DH12
*> DPARAM(5)=DH22
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION DD1,DD2,DX1,DY1
* ..
@@ -6,52 +102,11 @@
DOUBLE PRECISION DPARAM(5)
* ..
*
* Purpose
* =======
*
* CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
* THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*
* DY2)**T.
* WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*
* DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
*
* (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
* H=( ) ( ) ( ) ( )
* (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
* LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
* RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
* VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
*
* THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
* INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
* OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
*
*
* Arguments
* =========
*
* DD1 (input/output) DOUBLE PRECISION
*
* DD2 (input/output) DOUBLE PRECISION
*
* DX1 (input/output) DOUBLE PRECISION
*
* DY1 (input) DOUBLE PRECISION
*
* DPARAM (input/output) DOUBLE PRECISION array, dimension 5
* DPARAM(1)=DFLAG
* DPARAM(2)=DH11
* DPARAM(3)=DH21
* DPARAM(4)=DH12
* DPARAM(5)=DH22
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DFLAG,DH11,DH12,DH21,DH22,DP1,DP2,DQ1,DQ2,DTEMP,
+ DU,GAM,GAMSQ,ONE,RGAMSQ,TWO,ZERO
INTEGER IGO
$ DU,GAM,GAMSQ,ONE,RGAMSQ,TWO,ZERO
* ..
* .. Intrinsic Functions ..
INTRINSIC DABS
@@ -62,145 +117,135 @@
DATA GAM,GAMSQ,RGAMSQ/4096.D0,16777216.D0,5.9604645D-8/
* ..
IF (.NOT.DD1.LT.ZERO) GO TO 10
* GO ZERO-H-D-AND-DX1..
GO TO 60
10 CONTINUE
* CASE-DD1-NONNEGATIVE
DP2 = DD2*DY1
IF (.NOT.DP2.EQ.ZERO) GO TO 20
DFLAG = -TWO
GO TO 260
* REGULAR-CASE..
20 CONTINUE
DP1 = DD1*DX1
DQ2 = DP2*DY1
DQ1 = DP1*DX1
IF (DD1.LT.ZERO) THEN
* GO ZERO-H-D-AND-DX1..
DFLAG = -ONE
DH11 = ZERO
DH12 = ZERO
DH21 = ZERO
DH22 = ZERO
*
IF (.NOT.DABS(DQ1).GT.DABS(DQ2)) GO TO 40
DH21 = -DY1/DX1
DH12 = DP2/DP1
DD1 = ZERO
DD2 = ZERO
DX1 = ZERO
ELSE
* CASE-DD1-NONNEGATIVE
DP2 = DD2*DY1
IF (DP2.EQ.ZERO) THEN
DFLAG = -TWO
DPARAM(1) = DFLAG
RETURN
END IF
* REGULAR-CASE..
DP1 = DD1*DX1
DQ2 = DP2*DY1
DQ1 = DP1*DX1
*
DU = ONE - DH12*DH21
IF (DABS(DQ1).GT.DABS(DQ2)) THEN
DH21 = -DY1/DX1
DH12 = DP2/DP1
*
IF (.NOT.DU.LE.ZERO) GO TO 30
* GO ZERO-H-D-AND-DX1..
GO TO 60
30 CONTINUE
DFLAG = ZERO
DD1 = DD1/DU
DD2 = DD2/DU
DX1 = DX1*DU
* GO SCALE-CHECK..
GO TO 100
40 CONTINUE
IF (.NOT.DQ2.LT.ZERO) GO TO 50
* GO ZERO-H-D-AND-DX1..
GO TO 60
50 CONTINUE
DFLAG = ONE
DH11 = DP1/DP2
DH22 = DX1/DY1
DU = ONE + DH11*DH22
DTEMP = DD2/DU
DD2 = DD1/DU
DD1 = DTEMP
DX1 = DY1*DU
* GO SCALE-CHECK
GO TO 100
* PROCEDURE..ZERO-H-D-AND-DX1..
60 CONTINUE
DFLAG = -ONE
DH11 = ZERO
DH12 = ZERO
DH21 = ZERO
DH22 = ZERO
DU = ONE - DH12*DH21
*
DD1 = ZERO
DD2 = ZERO
DX1 = ZERO
* RETURN..
GO TO 220
* PROCEDURE..FIX-H..
70 CONTINUE
IF (.NOT.DFLAG.GE.ZERO) GO TO 90
IF (DU.GT.ZERO) THEN
DFLAG = ZERO
DD1 = DD1/DU
DD2 = DD2/DU
DX1 = DX1*DU
END IF
ELSE
IF (DQ2.LT.ZERO) THEN
* GO ZERO-H-D-AND-DX1..
DFLAG = -ONE
DH11 = ZERO
DH12 = ZERO
DH21 = ZERO
DH22 = ZERO
*
IF (.NOT.DFLAG.EQ.ZERO) GO TO 80
DH11 = ONE
DH22 = ONE
DFLAG = -ONE
GO TO 90
80 CONTINUE
DH21 = -ONE
DH12 = ONE
DFLAG = -ONE
90 CONTINUE
GO TO IGO(120,150,180,210)
DD1 = ZERO
DD2 = ZERO
DX1 = ZERO
ELSE
DFLAG = ONE
DH11 = DP1/DP2
DH22 = DX1/DY1
DU = ONE + DH11*DH22
DTEMP = DD2/DU
DD2 = DD1/DU
DD1 = DTEMP
DX1 = DY1*DU
END IF
END IF
* PROCEDURE..SCALE-CHECK
100 CONTINUE
110 CONTINUE
IF (.NOT.DD1.LE.RGAMSQ) GO TO 130
IF (DD1.EQ.ZERO) GO TO 160
ASSIGN 120 TO IGO
* FIX-H..
GO TO 70
120 CONTINUE
DD1 = DD1*GAM**2
DX1 = DX1/GAM
DH11 = DH11/GAM
DH12 = DH12/GAM
GO TO 110
130 CONTINUE
140 CONTINUE
IF (.NOT.DD1.GE.GAMSQ) GO TO 160
ASSIGN 150 TO IGO
* FIX-H..
GO TO 70
150 CONTINUE
DD1 = DD1/GAM**2
DX1 = DX1*GAM
DH11 = DH11*GAM
DH12 = DH12*GAM
GO TO 140
160 CONTINUE
170 CONTINUE
IF (.NOT.DABS(DD2).LE.RGAMSQ) GO TO 190
IF (DD2.EQ.ZERO) GO TO 220
ASSIGN 180 TO IGO
* FIX-H..
GO TO 70
180 CONTINUE
DD2 = DD2*GAM**2
DH21 = DH21/GAM
DH22 = DH22/GAM
GO TO 170
190 CONTINUE
200 CONTINUE
IF (.NOT.DABS(DD2).GE.GAMSQ) GO TO 220
ASSIGN 210 TO IGO
* FIX-H..
GO TO 70
210 CONTINUE
DD2 = DD2/GAM**2
DH21 = DH21*GAM
DH22 = DH22*GAM
GO TO 200
220 CONTINUE
IF (DFLAG) 250,230,240
230 CONTINUE
DPARAM(3) = DH21
DPARAM(4) = DH12
GO TO 260
240 CONTINUE
DPARAM(2) = DH11
DPARAM(5) = DH22
GO TO 260
250 CONTINUE
DPARAM(2) = DH11
DPARAM(3) = DH21
DPARAM(4) = DH12
DPARAM(5) = DH22
260 CONTINUE
IF (DD1.NE.ZERO) THEN
DO WHILE ((DD1.LE.RGAMSQ) .OR. (DD1.GE.GAMSQ))
IF (DFLAG.EQ.ZERO) THEN
DH11 = ONE
DH22 = ONE
DFLAG = -ONE
ELSE
DH21 = -ONE
DH12 = ONE
DFLAG = -ONE
END IF
IF (DD1.LE.RGAMSQ) THEN
DD1 = DD1*GAM**2
DX1 = DX1/GAM
DH11 = DH11/GAM
DH12 = DH12/GAM
ELSE
DD1 = DD1/GAM**2
DX1 = DX1*GAM
DH11 = DH11*GAM
DH12 = DH12*GAM
END IF
ENDDO
END IF
IF (DD2.NE.ZERO) THEN
DO WHILE ( (DABS(DD2).LE.RGAMSQ) .OR. (DABS(DD2).GE.GAMSQ) )
IF (DFLAG.EQ.ZERO) THEN
DH11 = ONE
DH22 = ONE
DFLAG = -ONE
ELSE
DH21 = -ONE
DH12 = ONE
DFLAG = -ONE
END IF
IF (DABS(DD2).LE.RGAMSQ) THEN
DD2 = DD2*GAM**2
DH21 = DH21/GAM
DH22 = DH22/GAM
ELSE
DD2 = DD2/GAM**2
DH21 = DH21*GAM
DH22 = DH22*GAM
END IF
END DO
END IF
END IF
IF (DFLAG.LT.ZERO) THEN
DPARAM(2) = DH11
DPARAM(3) = DH21
DPARAM(4) = DH12
DPARAM(5) = DH22
ELSE IF (DFLAG.EQ.ZERO) THEN
DPARAM(3) = DH21
DPARAM(4) = DH12
ELSE
DPARAM(2) = DH11
DPARAM(5) = DH22
END IF
DPARAM(1) = DFLAG
RETURN
END
+191 -119
View File
@@ -1,4 +1,194 @@
*> \brief \b DSBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,K,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSBMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n symmetric band matrix, with k super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the band matrix A is being supplied as
*> follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> being supplied.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> being supplied.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of super-diagonals of the
*> matrix A. K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the symmetric matrix, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer the upper
*> triangular part of a symmetric band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the symmetric matrix, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer the lower
*> triangular part of a symmetric band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the
*> vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,K,LDA,N
@@ -8,125 +198,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DSBMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n symmetric band matrix, with k super-diagonals.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the band matrix A is being supplied as
* follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* being supplied.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* being supplied.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of super-diagonals of the
* matrix A. K must satisfy 0 .le. K.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the symmetric matrix, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer the upper
* triangular part of a symmetric band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the symmetric matrix, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer the lower
* triangular part of a symmetric band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the
* vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
+85 -32
View File
@@ -1,4 +1,63 @@
*> \brief \b DSCAL
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSCAL(N,DA,DX,INCX)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION DA
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSCAL scales a vector by a constant.
*> uses unrolled loops for increment equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSCAL(N,DA,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA
INTEGER INCX,N
@@ -7,15 +66,7 @@
DOUBLE PRECISION DX(*)
* ..
*
* Purpose
* =======
**
* scales a vector by a constant.
* uses unrolled loops for increment equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,M,MP1,NINCX
@@ -24,34 +75,36 @@
INTRINSIC MOD
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
DX(I) = DA*DX(I)
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,5)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DX(I) = DA*DX(I)
30 CONTINUE
IF (N.LT.5) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,5
DX(I) = DA*DX(I)
DX(I+1) = DA*DX(I+1)
DX(I+2) = DA*DX(I+2)
DX(I+3) = DA*DX(I+3)
DX(I+4) = DA*DX(I+4)
50 CONTINUE
M = MOD(N,5)
IF (M.NE.0) THEN
DO I = 1,M
DX(I) = DA*DX(I)
END DO
IF (N.LT.5) RETURN
END IF
MP1 = M + 1
DO I = MP1,N,5
DX(I) = DA*DX(I)
DX(I+1) = DA*DX(I+1)
DX(I+2) = DA*DX(I+2)
DX(I+3) = DA*DX(I+3)
DX(I+4) = DA*DX(I+4)
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
DX(I) = DA*DX(I)
END DO
END IF
RETURN
END
+146 -70
View File
@@ -1,4 +1,129 @@
*> \brief \b DSDOT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
* AUTHORS
* =======
* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> Compute the inner product of two vectors with extended
*> precision accumulation and result.
*>
*> Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
*> DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY),
*> where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
*> defined in a similar way using INCY.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] SX
*> \verbatim
*> SX is REAL array, dimension(N)
*> single precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of SX
*> \endverbatim
*>
*> \param[in] SY
*> \verbatim
*> SY is REAL array, dimension(N)
*> single precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of SY
*> \endverbatim
*>
*> \result DSDOT
*> \verbatim
*> DSDOT is DOUBLE PRECISION
*> DSDOT double precision dot product (zero if N.LE.0)
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*> \endverbatim
*
*> \par References:
* ================
*>
*> \verbatim
*>
*>
*> C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
*> Krogh, Basic linear algebra subprograms for Fortran
*> usage, Algorithm No. 539, Transactions on Mathematical
*> Software 5, 3 (September 1979), pp. 308-323.
*>
*> REVISION HISTORY (YYMMDD)
*>
*> 791001 DATE WRITTEN
*> 890831 Modified array declarations. (WRB)
*> 890831 REVISION DATE from Version 3.2
*> 891214 Prologue converted to Version 4.0 format. (BAB)
*> 920310 Corrected definition of LX in DESCRIPTION. (WRB)
*> 920501 Reformatted the REFERENCES section. (WRB)
*> 070118 Reformat to LAPACK style (JL)
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,61 +131,11 @@
REAL SX(*),SY(*)
* ..
*
* AUTHORS
* =======
* Authors:
* ========
* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
*
* Purpose
* =======
* Compute the inner product of two vectors with extended
* precision accumulation and result.
*
* Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
* DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY),
* where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
* defined in a similar way using INCY.
*
* Arguments
* =========
*
* N (input) INTEGER
* number of elements in input vector(s)
*
* SX (input) REAL array, dimension(N)
* single precision vector with N elements
*
* INCX (input) INTEGER
* storage spacing between elements of SX
*
* SY (input) REAL array, dimension(N)
* single precision vector with N elements
*
* INCY (input) INTEGER
* storage spacing between elements of SY
*
* DSDOT (output) DOUBLE PRECISION
* DSDOT double precision dot product (zero if N.LE.0)
*
* REFERENCES
* ==========
*
* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
* Krogh, Basic linear algebra subprograms for Fortran
* usage, Algorithm No. 539, Transactions on Mathematical
* Software 5, 3 (September 1979), pp. 308-323.
*
* REVISION HISTORY (YYMMDD)
* ==========================
*
* 791001 DATE WRITTEN
* 890831 Modified array declarations. (WRB)
* 890831 REVISION DATE from Version 3.2
* 891214 Prologue converted to Version 4.0 format. (BAB)
* 920310 Corrected definition of LX in DESCRIPTION. (WRB)
* 920501 Reformatted the REFERENCES section. (WRB)
* 070118 Reformat to LAPACK style (JL)
*
* =====================================================================
*
* .. Local Scalars ..
@@ -71,26 +146,27 @@
* ..
DSDOT = 0.0D0
IF (N.LE.0) RETURN
IF (INCX.EQ.INCY .AND. INCX.GT.0) GO TO 20
*
* Code for unequal or nonpositive increments.
*
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
DO 10 I = 1,N
DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
KX = KX + INCX
KY = KY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
*
* Code for equal, positive, non-unit increments.
*
20 NS = N*INCX
DO 30 I = 1,NS,INCX
DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
30 CONTINUE
NS = N*INCX
DO I = 1,NS,INCX
DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
END DO
ELSE
*
* Code for unequal or nonpositive increments.
*
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
DO I = 1,N
DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
KX = KX + INCX
KY = KY + INCY
END DO
END IF
RETURN
END
+154 -85
View File
@@ -1,4 +1,157 @@
*> \brief \b DSPMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION AP(*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSPMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n symmetric matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is DOUBLE PRECISION array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y. On exit, Y is overwritten by the updated
*> vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,N
@@ -8,91 +161,7 @@
DOUBLE PRECISION AP(*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DSPMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n symmetric matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* AP - DOUBLE PRECISION array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y. On exit, Y is overwritten by the updated
* vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
+134 -72
View File
@@ -1,4 +1,137 @@
*> \brief \b DSPR
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSPR performs the symmetric rank 1 operation
*>
*> A := alpha*x*x**T + A,
*>
*> where alpha is a real scalar, x is an n element vector and A is an
*> n by n symmetric matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] AP
*> \verbatim
*> AP is DOUBLE PRECISION array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on. On exit, the array
*> AP is overwritten by the upper triangular part of the
*> updated matrix.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on. On exit, the array
*> AP is overwritten by the lower triangular part of the
*> updated matrix.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,N
@@ -8,78 +141,7 @@
DOUBLE PRECISION AP(*),X(*)
* ..
*
* Purpose
* =======
*
* DSPR performs the symmetric rank 1 operation
*
* A := alpha*x*x' + A,
*
* where alpha is a real scalar, x is an n element vector and A is an
* n by n symmetric matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* AP - DOUBLE PRECISION array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on. On exit, the array
* AP is overwritten by the upper triangular part of the
* updated matrix.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on. On exit, the array
* AP is overwritten by the lower triangular part of the
* updated matrix.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
+149 -83
View File
@@ -1,4 +1,152 @@
*> \brief \b DSPR2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,INCY,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION AP(*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSPR2 performs the symmetric rank 2 operation
*>
*> A := alpha*x*y**T + alpha*y*x**T + A,
*>
*> where alpha is a scalar, x and y are n element vectors and A is an
*> n by n symmetric matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the matrix A is supplied in the packed
*> array AP as follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> supplied in AP.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> supplied in AP.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] AP
*> \verbatim
*> AP is DOUBLE PRECISION array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
*> and a( 2, 2 ) respectively, and so on. On exit, the array
*> AP is overwritten by the upper triangular part of the
*> updated matrix.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular part of the symmetric matrix
*> packed sequentially, column by column, so that AP( 1 )
*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
*> and a( 3, 1 ) respectively, and so on. On exit, the array
*> AP is overwritten by the lower triangular part of the
*> updated matrix.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,INCY,N
@@ -8,89 +156,7 @@
DOUBLE PRECISION AP(*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DSPR2 performs the symmetric rank 2 operation
*
* A := alpha*x*y' + alpha*y*x' + A,
*
* where alpha is a scalar, x and y are n element vectors and A is an
* n by n symmetric matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the matrix A is supplied in the packed
* array AP as follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* supplied in AP.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* supplied in AP.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* AP - DOUBLE PRECISION array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
* and a( 2, 2 ) respectively, and so on. On exit, the array
* AP is overwritten by the upper triangular part of the
* updated matrix.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular part of the symmetric matrix
* packed sequentially, column by column, so that AP( 1 )
* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
* and a( 3, 1 ) respectively, and so on. On exit, the array
* AP is overwritten by the lower triangular part of the
* updated matrix.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
+97 -45
View File
@@ -1,4 +1,61 @@
*> \brief \b DSWAP
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> interchanges two vectors.
*> uses unrolled loops for increments equal one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,14 +63,7 @@
DOUBLE PRECISION DX(*),DY(*)
* ..
*
* Purpose
* =======
*
* interchanges two vectors.
* uses unrolled loops for increments equal one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DTEMP
@@ -23,48 +73,50 @@
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
DTEMP = DX(IX)
DX(IX) = DY(IY)
DY(IY) = DTEMP
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,3)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DTEMP = DX(I)
DX(I) = DY(I)
DY(I) = DTEMP
30 CONTINUE
IF (N.LT.3) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,3
DTEMP = DX(I)
DX(I) = DY(I)
DY(I) = DTEMP
DTEMP = DX(I+1)
DX(I+1) = DY(I+1)
DY(I+1) = DTEMP
DTEMP = DX(I+2)
DX(I+2) = DY(I+2)
DY(I+2) = DTEMP
50 CONTINUE
M = MOD(N,3)
IF (M.NE.0) THEN
DO I = 1,M
DTEMP = DX(I)
DX(I) = DY(I)
DY(I) = DTEMP
END DO
IF (N.LT.3) RETURN
END IF
MP1 = M + 1
DO I = MP1,N,3
DTEMP = DX(I)
DX(I) = DY(I)
DY(I) = DTEMP
DTEMP = DX(I+1)
DX(I+1) = DY(I+1)
DY(I+1) = DTEMP
DTEMP = DX(I+2)
DX(I+2) = DY(I+2)
DY(I+2) = DTEMP
END DO
ELSE
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DTEMP = DX(IX)
DX(IX) = DY(IY)
DY(IY) = DTEMP
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+196 -123
View File
@@ -1,4 +1,199 @@
*> \brief \b DSYMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER LDA,LDB,LDC,M,N
* CHARACTER SIDE,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYMM performs one of the matrix-matrix operations
*>
*> C := alpha*A*B + beta*C,
*>
*> or
*>
*> C := alpha*B*A + beta*C,
*>
*> where alpha and beta are scalars, A is a symmetric matrix and B and
*> C are m by n matrices.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether the symmetric matrix A
*> appears on the left or right in the operation as follows:
*>
*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*>
*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the symmetric matrix A is to be
*> referenced as follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of the
*> symmetric matrix is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of the
*> symmetric matrix is to be referenced.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix C.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix C.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
*> m when SIDE = 'L' or 'l' and is n otherwise.
*> Before entry with SIDE = 'L' or 'l', the m by m part of
*> the array A must contain the symmetric matrix, such that
*> when UPLO = 'U' or 'u', the leading m by m upper triangular
*> part of the array A must contain the upper triangular part
*> of the symmetric matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading m by m lower triangular part of the array A
*> must contain the lower triangular part of the symmetric
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> Before entry with SIDE = 'R' or 'r', the n by n part of
*> the array A must contain the symmetric matrix, such that
*> when UPLO = 'U' or 'u', the leading n by n upper triangular
*> part of the array A must contain the upper triangular part
*> of the symmetric matrix and the strictly lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the leading n by n lower triangular part of the array A
*> must contain the lower triangular part of the symmetric
*> matrix and the strictly upper triangular part of A is not
*> referenced.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), otherwise LDA must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION 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.
*> On exit, the array C is overwritten by the m by n updated
*> matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER LDA,LDB,LDC,M,N
@@ -8,129 +203,7 @@
DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* DSYMM performs one of the matrix-matrix operations
*
* C := alpha*A*B + beta*C,
*
* or
*
* C := alpha*B*A + beta*C,
*
* where alpha and beta are scalars, A is a symmetric matrix and B and
* C are m by n matrices.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether the symmetric matrix A
* appears on the left or right in the operation as follows:
*
* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*
* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the symmetric matrix A is to be
* referenced as follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of the
* symmetric matrix is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of the
* symmetric matrix is to be referenced.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix C.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix C.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
* m when SIDE = 'L' or 'l' and is n otherwise.
* Before entry with SIDE = 'L' or 'l', the m by m part of
* the array A must contain the symmetric matrix, such that
* when UPLO = 'U' or 'u', the leading m by m upper triangular
* part of the array A must contain the upper triangular part
* of the symmetric matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading m by m lower triangular part of the array A
* must contain the lower triangular part of the symmetric
* matrix and the strictly upper triangular part of A is not
* referenced.
* Before entry with SIDE = 'R' or 'r', the n by n part of
* the array A must contain the symmetric matrix, such that
* when UPLO = 'U' or 'u', the leading n by n upper triangular
* part of the array A must contain the upper triangular part
* of the symmetric matrix and the strictly lower triangular
* part of A is not referenced, and when UPLO = 'L' or 'l',
* the leading n by n lower triangular part of the array A
* must contain the lower triangular part of the symmetric
* matrix and the strictly upper triangular part of A is not
* referenced.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), otherwise LDA must be at
* least max( 1, n ).
* Unchanged on exit.
*
* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* C - DOUBLE PRECISION 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.
* On exit, the array C is overwritten by the m by n updated
* matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
+159 -88
View File
@@ -1,4 +1,162 @@
*> \brief \b DSYMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of A is not referenced.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y. On exit, Y is overwritten by the updated
*> vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,LDA,N
@@ -8,94 +166,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DSYMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n symmetric matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of A is not referenced.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y. On exit, Y is overwritten by the updated
* vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
+139 -75
View File
@@ -1,4 +1,142 @@
*> \brief \b DSYR
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYR performs the symmetric rank 1 operation
*>
*> A := alpha*x*x**T + A,
*>
*> where alpha is a real scalar, x is an n element vector and A is an
*> n by n symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,LDA,N
@@ -8,81 +146,7 @@
DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* DSYR performs the symmetric rank 1 operation
*
* A := alpha*x*x' + A,
*
* where alpha is a real scalar, x is an n element vector and A is an
* n by n symmetric matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of A is not referenced. On exit, the
* upper triangular part of the array A is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of A is not referenced. On exit, the
* lower triangular part of the array A is overwritten by the
* lower triangular part of the updated matrix.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
+154 -86
View File
@@ -1,4 +1,157 @@
*> \brief \b DSYR2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYR2 performs the symmetric rank 2 operation
*>
*> A := alpha*x*y**T + alpha*y*x**T + A,
*>
*> where alpha is a scalar, x and y are n element vectors and A is an n
*> by n symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,INCY,LDA,N
@@ -8,92 +161,7 @@
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* DSYR2 performs the symmetric rank 2 operation
*
* A := alpha*x*y' + alpha*y*x' + A,
*
* where alpha is a scalar, x and y are n element vectors and A is an n
* by n symmetric matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array A is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of A
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of A
* is to be referenced.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of A is not referenced. On exit, the
* upper triangular part of the array A is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of A is not referenced. On exit, the
* lower triangular part of the array A is overwritten by the
* lower triangular part of the updated matrix.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
+201 -128
View File
@@ -1,4 +1,202 @@
*> \brief \b DSYR2K
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYR2K performs one of the symmetric rank 2k operations
*>
*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
*>
*> or
*>
*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
*>
*> where alpha and beta are scalars, C is an n by n symmetric matrix
*> and A and B are n by k matrices in the first case and k by n
*> matrices in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
*> beta*C.
*>
*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
*> beta*C.
*>
*> TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
*> beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrices A and B, and on entry with
*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
*> of rows of the matrices A and B. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array B must contain the matrix B, otherwise
*> the leading k by n part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDB must be at least max( 1, n ), otherwise LDB must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER K,LDA,LDB,LDC,N
@@ -8,132 +206,7 @@
DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* DSYR2K performs one of the symmetric rank 2k operations
*
* C := alpha*A*B' + alpha*B*A' + beta*C,
*
* or
*
* C := alpha*A'*B + alpha*B'*A + beta*C,
*
* where alpha and beta are scalars, C is an n by n symmetric matrix
* and A and B are n by k matrices in the first case and k by n
* matrices in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' +
* beta*C.
*
* TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A +
* beta*C.
*
* TRANS = 'C' or 'c' C := alpha*A'*B + alpha*B'*A +
* beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrices A and B, and on entry with
* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
* of rows of the matrices A and B. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array B must contain the matrix B, otherwise
* the leading k by n part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDB must be at least max( 1, n ), otherwise LDB must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -231,7 +304,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*B' + alpha*B*A' + C.
* Form C := alpha*A*B**T + alpha*B*A**T + C.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -280,7 +353,7 @@
END IF
ELSE
*
* Form C := alpha*A'*B + alpha*B'*A + C.
* Form C := alpha*A**T*B + alpha*B**T*A + C.
*
IF (UPPER) THEN
DO 210 J = 1,N
+178 -109
View File
@@ -1,4 +1,179 @@
*> \brief \b DSYRK
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER K,LDA,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSYRK performs one of the symmetric rank k operations
*>
*> C := alpha*A*A**T + beta*C,
*>
*> or
*>
*> C := alpha*A**T*A + beta*C,
*>
*> where alpha and beta are scalars, C is an n by n symmetric matrix
*> and A is an n by k matrix in the first case and a k by n matrix
*> in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
*>
*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
*>
*> TRANS = 'C' or 'c' C := alpha*A**T*A + beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrix A, and on entry with
*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
*> of rows of the matrix A. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the symmetric matrix and the strictly
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the symmetric matrix and the strictly
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER K,LDA,LDC,N
@@ -8,113 +183,7 @@
DOUBLE PRECISION A(LDA,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* DSYRK performs one of the symmetric rank k operations
*
* C := alpha*A*A' + beta*C,
*
* or
*
* C := alpha*A'*A + beta*C,
*
* where alpha and beta are scalars, C is an n by n symmetric matrix
* and A is an n by k matrix in the first case and a k by n matrix
* in the second case.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the array C is to be referenced as
* follows:
*
* UPLO = 'U' or 'u' Only the upper triangular part of C
* is to be referenced.
*
* UPLO = 'L' or 'l' Only the lower triangular part of C
* is to be referenced.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' C := alpha*A*A' + beta*C.
*
* TRANS = 'T' or 't' C := alpha*A'*A + beta*C.
*
* TRANS = 'C' or 'c' C := alpha*A'*A + beta*C.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with TRANS = 'N' or 'n', K specifies the number
* of columns of the matrix A, and on entry with
* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
* of rows of the matrix A. K must be at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
* k when TRANS = 'N' or 'n', and is n otherwise.
* Before entry with TRANS = 'N' or 'n', the leading n by k
* part of the array A must contain the matrix A, otherwise
* the leading k by n part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When TRANS = 'N' or 'n'
* then LDA must be at least max( 1, n ), otherwise LDA must
* be at least max( 1, k ).
* Unchanged on exit.
*
* BETA - DOUBLE PRECISION.
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array C must contain the upper
* triangular part of the symmetric matrix and the strictly
* lower triangular part of C is not referenced. On exit, the
* upper triangular part of the array C is overwritten by the
* upper triangular part of the updated matrix.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array C must contain the lower
* triangular part of the symmetric matrix and the strictly
* upper triangular part of C is not referenced. On exit, the
* lower triangular part of the array C is overwritten by the
* lower triangular part of the updated matrix.
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, n ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -210,7 +279,7 @@
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*A' + beta*C.
* Form C := alpha*A*A**T + beta*C.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -255,7 +324,7 @@
END IF
ELSE
*
* Form C := alpha*A'*A + beta*C.
* Form C := alpha*A**T*A + beta*C.
*
IF (UPPER) THEN
DO 210 J = 1,N
+194 -128
View File
@@ -1,4 +1,196 @@
*> \brief \b DTBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,K,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTBMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**T*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with UPLO = 'U' or 'u', K specifies the number of
*> super-diagonals of the matrix A.
*> On entry with UPLO = 'L' or 'l', K specifies the number of
*> sub-diagonals of the matrix A.
*> K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer an upper
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer a lower
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Note that when DIAG = 'U' or 'u' the elements of the array A
*> corresponding to the diagonal elements of the matrix are not
*> referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,133 +199,7 @@
DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* DTBMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := A'*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with UPLO = 'U' or 'u', K specifies the number of
* super-diagonals of the matrix A.
* On entry with UPLO = 'L' or 'l', K specifies the number of
* sub-diagonals of the matrix A.
* K must satisfy 0 .le. K.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer an upper
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer a lower
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Note that when DIAG = 'U' or 'u' the elements of the array A
* corresponding to the diagonal elements of the matrix are not
* referenced, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -264,7 +330,7 @@
END IF
ELSE
*
* Form x := A'*x.
* Form x := A**T*x.
*
IF (LSAME(UPLO,'U')) THEN
KPLUS1 = K + 1
+197 -132
View File
@@ -1,4 +1,199 @@
*> \brief \b DTBSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,K,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTBSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
*> diagonals.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**T*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with UPLO = 'U' or 'u', K specifies the number of
*> super-diagonals of the matrix A.
*> On entry with UPLO = 'L' or 'l', K specifies the number of
*> sub-diagonals of the matrix A.
*> K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer an upper
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the matrix of coefficients, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer a lower
*> triangular band matrix from conventional full matrix storage
*> to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Note that when DIAG = 'U' or 'u' the elements of the array A
*> corresponding to the diagonal elements of the matrix are not
*> referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,137 +202,7 @@
DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* DTBSV solves one of the systems of equations
*
* A*x = b, or A'*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular band matrix, with ( k + 1 )
* diagonals.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' A'*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry with UPLO = 'U' or 'u', K specifies the number of
* super-diagonals of the matrix A.
* On entry with UPLO = 'L' or 'l', K specifies the number of
* sub-diagonals of the matrix A.
* K must satisfy 0 .le. K.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer an upper
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the matrix of coefficients, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer a lower
* triangular band matrix from conventional full matrix storage
* to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Note that when DIAG = 'U' or 'u' the elements of the array A
* corresponding to the diagonal elements of the matrix are not
* referenced, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -268,7 +333,7 @@
END IF
ELSE
*
* Form x := inv( A')*x.
* Form x := inv( A**T)*x.
*
IF (LSAME(UPLO,'U')) THEN
KPLUS1 = K + 1
+150 -88
View File
@@ -1,4 +1,152 @@
*> \brief \b DTPMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTPMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular matrix, supplied in packed form.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**T*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is DOUBLE PRECISION array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
*> respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
*> respectively, and so on.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,93 +155,7 @@
DOUBLE PRECISION AP(*),X(*)
* ..
*
* Purpose
* =======
*
* DTPMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular matrix, supplied in packed form.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := A'*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* AP - DOUBLE PRECISION array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
* respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
* respectively, and so on.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced, but are assumed to be unity.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -220,7 +282,7 @@
END IF
ELSE
*
* Form x := A'*x.
* Form x := A**T*x.
*
IF (LSAME(UPLO,'U')) THEN
KK = (N* (N+1))/2
+152 -91
View File
@@ -1,4 +1,154 @@
*> \brief \b DTPSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION AP(*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTPSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular matrix, supplied in packed form.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**T*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] AP
*> \verbatim
*> AP is DOUBLE PRECISION array of DIMENSION at least
*> ( ( n*( n + 1 ) )/2 ).
*> Before entry with UPLO = 'U' or 'u', the array AP must
*> contain the upper triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
*> respectively, and so on.
*> Before entry with UPLO = 'L' or 'l', the array AP must
*> contain the lower triangular matrix packed sequentially,
*> column by column, so that AP( 1 ) contains a( 1, 1 ),
*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
*> respectively, and so on.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,96 +157,7 @@
DOUBLE PRECISION AP(*),X(*)
* ..
*
* Purpose
* =======
*
* DTPSV solves one of the systems of equations
*
* A*x = b, or A'*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular matrix, supplied in packed form.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' A'*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* AP - DOUBLE PRECISION array of DIMENSION at least
* ( ( n*( n + 1 ) )/2 ).
* Before entry with UPLO = 'U' or 'u', the array AP must
* contain the upper triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
* respectively, and so on.
* Before entry with UPLO = 'L' or 'l', the array AP must
* contain the lower triangular matrix packed sequentially,
* column by column, so that AP( 1 ) contains a( 1, 1 ),
* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
* respectively, and so on.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced, but are assumed to be unity.
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -222,7 +283,7 @@
END IF
ELSE
*
* Form x := inv( A' )*x.
* Form x := inv( A**T )*x.
*
IF (LSAME(UPLO,'U')) THEN
KK = 1
+186 -117
View File
@@ -1,4 +1,187 @@
*> \brief \b DTRMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER LDA,LDB,M,N
* CHARACTER DIAG,SIDE,TRANSA,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTRMM performs one of the matrix-matrix operations
*>
*> B := alpha*op( A )*B, or B := alpha*B*op( A ),
*>
*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
*> non-unit, upper or lower triangular matrix and op( A ) is one of
*>
*> op( A ) = A or op( A ) = A**T.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether op( A ) multiplies B from
*> the left or right as follows:
*>
*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
*>
*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix A is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n' op( A ) = A.
*>
*> TRANSA = 'T' or 't' op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c' op( A ) = A**T.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit triangular
*> as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of B. M must be at
*> least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of B. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha. When alpha is
*> zero then A is not referenced and B need not be set before
*> entry.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
*> Before entry with UPLO = 'U' or 'u', the leading k by k
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading k by k
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
*> then LDA must be at least max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] B
*> \verbatim
*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B, and on exit is overwritten by the
*> transformed matrix.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER LDA,LDB,M,N
@@ -8,121 +191,7 @@
DOUBLE PRECISION A(LDA,*),B(LDB,*)
* ..
*
* Purpose
* =======
*
* DTRMM performs one of the matrix-matrix operations
*
* B := alpha*op( A )*B, or B := alpha*B*op( A ),
*
* where alpha is a scalar, B is an m by n matrix, A is a unit, or
* non-unit, upper or lower triangular matrix and op( A ) is one of
*
* op( A ) = A or op( A ) = A'.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether op( A ) multiplies B from
* the left or right as follows:
*
* SIDE = 'L' or 'l' B := alpha*op( A )*B.
*
* SIDE = 'R' or 'r' B := alpha*B*op( A ).
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix A is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n' op( A ) = A.
*
* TRANSA = 'T' or 't' op( A ) = A'.
*
* TRANSA = 'C' or 'c' op( A ) = A'.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit triangular
* as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of B. M must be at
* least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of B. N must be
* at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha. When alpha is
* zero then A is not referenced and B need not be set before
* entry.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
* Before entry with UPLO = 'U' or 'u', the leading k by k
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading k by k
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
* then LDA must be at least max( 1, n ).
* Unchanged on exit.
*
* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the matrix B, and on exit is overwritten by the
* transformed matrix.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -231,7 +300,7 @@
END IF
ELSE
*
* Form B := alpha*A'*B.
* Form B := alpha*A**T*B.
*
IF (UPPER) THEN
DO 110 J = 1,N
@@ -297,7 +366,7 @@
END IF
ELSE
*
* Form B := alpha*B*A'.
* Form B := alpha*B*A**T.
*
IF (UPPER) THEN
DO 260 K = 1,N
+155 -91
View File
@@ -1,4 +1,157 @@
*> \brief \b DTRMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTRMV performs one of the matrix-vector operations
*>
*> x := A*x, or x := A**T*x,
*>
*> where x is an n element vector and A is an n by n unit, or non-unit,
*> upper or lower triangular matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' x := A*x.
*>
*> TRANS = 'T' or 't' x := A**T*x.
*>
*> TRANS = 'C' or 'c' x := A**T*x.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x. On exit, X is overwritten with the
*> tranformed vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,96 +160,7 @@
DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* DTRMV performs one of the matrix-vector operations
*
* x := A*x, or x := A'*x,
*
* where x is an n element vector and A is an n by n unit, or non-unit,
* upper or lower triangular matrix.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the operation to be performed as
* follows:
*
* TRANS = 'N' or 'n' x := A*x.
*
* TRANS = 'T' or 't' x := A'*x.
*
* TRANS = 'C' or 'c' x := A'*x.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element vector x. On exit, X is overwritten with the
* tranformed vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -218,7 +282,7 @@
END IF
ELSE
*
* Form x := A'*x.
* Form x := A**T*x.
*
IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN
+190 -120
View File
@@ -1,4 +1,191 @@
*> \brief \b DTRSM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER LDA,LDB,M,N
* CHARACTER DIAG,SIDE,TRANSA,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTRSM solves one of the matrix equations
*>
*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
*>
*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
*> non-unit, upper or lower triangular matrix and op( A ) is one of
*>
*> op( A ) = A or op( A ) = A**T.
*>
*> The matrix X is overwritten on B.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether op( A ) appears on the left
*> or right of X as follows:
*>
*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
*>
*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix A is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n' op( A ) = A.
*>
*> TRANSA = 'T' or 't' op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c' op( A ) = A**T.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit triangular
*> as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of B. M must be at
*> least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of B. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha. When alpha is
*> zero then A is not referenced and B need not be set before
*> entry.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, k ),
*> where k is m when SIDE = 'L' or 'l'
*> and k is n when SIDE = 'R' or 'r'.
*> Before entry with UPLO = 'U' or 'u', the leading k by k
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading k by k
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
*> then LDA must be at least max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] B
*> \verbatim
*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
*> Before entry, the leading m by n part of the array B must
*> contain the right-hand side matrix B, and on exit is
*> overwritten by the solution matrix X.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER LDA,LDB,M,N
@@ -8,124 +195,7 @@
DOUBLE PRECISION A(LDA,*),B(LDB,*)
* ..
*
* Purpose
* =======
*
* DTRSM solves one of the matrix equations
*
* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
*
* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
* non-unit, upper or lower triangular matrix and op( A ) is one of
*
* op( A ) = A or op( A ) = A'.
*
* The matrix X is overwritten on B.
*
* Arguments
* ==========
*
* SIDE - CHARACTER*1.
* On entry, SIDE specifies whether op( A ) appears on the left
* or right of X as follows:
*
* SIDE = 'L' or 'l' op( A )*X = alpha*B.
*
* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
*
* Unchanged on exit.
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix A is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n' op( A ) = A.
*
* TRANSA = 'T' or 't' op( A ) = A'.
*
* TRANSA = 'C' or 'c' op( A ) = A'.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit triangular
* as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of B. M must be at
* least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of B. N must be
* at least zero.
* Unchanged on exit.
*
* ALPHA - DOUBLE PRECISION.
* On entry, ALPHA specifies the scalar alpha. When alpha is
* zero then A is not referenced and B need not be set before
* entry.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
* Before entry with UPLO = 'U' or 'u', the leading k by k
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading k by k
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. When SIDE = 'L' or 'l' then
* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
* then LDA must be at least max( 1, n ).
* Unchanged on exit.
*
* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
* Before entry, the leading m by n part of the array B must
* contain the right-hand side matrix B, and on exit is
* overwritten by the solution matrix X.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. LDB must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -240,7 +310,7 @@
END IF
ELSE
*
* Form B := alpha*inv( A' )*B.
* Form B := alpha*inv( A**T )*B.
*
IF (UPPER) THEN
DO 130 J = 1,N
@@ -316,7 +386,7 @@
END IF
ELSE
*
* Form B := alpha*B*inv( A' ).
* Form B := alpha*B*inv( A**T ).
*
IF (UPPER) THEN
DO 310 K = N,1,-1
+151 -94
View File
@@ -1,4 +1,153 @@
*> \brief \b DTRSV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,LDA,N
* CHARACTER DIAG,TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DTRSV solves one of the systems of equations
*>
*> A*x = b, or A**T*x = b,
*>
*> where b and x are n element vectors and A is an n by n unit, or
*> non-unit, upper or lower triangular matrix.
*>
*> No test for singularity or near-singularity is included in this
*> routine. Such tests must be performed before calling this routine.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the matrix is an upper or
*> lower triangular matrix as follows:
*>
*> UPLO = 'U' or 'u' A is an upper triangular matrix.
*>
*> UPLO = 'L' or 'l' A is a lower triangular matrix.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the equations to be solved as
*> follows:
*>
*> TRANS = 'N' or 'n' A*x = b.
*>
*> TRANS = 'T' or 't' A**T*x = b.
*>
*> TRANS = 'C' or 'c' A**T*x = b.
*> \endverbatim
*>
*> \param[in] DIAG
*> \verbatim
*> DIAG is CHARACTER*1
*> On entry, DIAG specifies whether or not A is unit
*> triangular as follows:
*>
*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
*>
*> DIAG = 'N' or 'n' A is not assumed to be unit
*> triangular.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading n by n
*> upper triangular part of the array A must contain the upper
*> triangular matrix and the strictly lower triangular part of
*> A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the leading n by n
*> lower triangular part of the array A must contain the lower
*> triangular matrix and the strictly upper triangular part of
*> A is not referenced.
*> Note that when DIAG = 'U' or 'u', the diagonal elements of
*> A are not referenced either, but are assumed to be unity.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in,out] X
*> \verbatim
*> X is DOUBLE PRECISION array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element right-hand side vector b. On exit, X is overwritten
*> with the solution vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX 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.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
CHARACTER DIAG,TRANS,UPLO
@@ -7,99 +156,7 @@
DOUBLE PRECISION A(LDA,*),X(*)
* ..
*
* Purpose
* =======
*
* DTRSV solves one of the systems of equations
*
* A*x = b, or A'*x = b,
*
* where b and x are n element vectors and A is an n by n unit, or
* non-unit, upper or lower triangular matrix.
*
* No test for singularity or near-singularity is included in this
* routine. Such tests must be performed before calling this routine.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the matrix is an upper or
* lower triangular matrix as follows:
*
* UPLO = 'U' or 'u' A is an upper triangular matrix.
*
* UPLO = 'L' or 'l' A is a lower triangular matrix.
*
* Unchanged on exit.
*
* TRANS - CHARACTER*1.
* On entry, TRANS specifies the equations to be solved as
* follows:
*
* TRANS = 'N' or 'n' A*x = b.
*
* TRANS = 'T' or 't' A'*x = b.
*
* TRANS = 'C' or 'c' A'*x = b.
*
* Unchanged on exit.
*
* DIAG - CHARACTER*1.
* On entry, DIAG specifies whether or not A is unit
* triangular as follows:
*
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
*
* DIAG = 'N' or 'n' A is not assumed to be unit
* triangular.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading n by n
* upper triangular part of the array A must contain the upper
* triangular matrix and the strictly lower triangular part of
* A is not referenced.
* Before entry with UPLO = 'L' or 'l', the leading n by n
* lower triangular part of the array A must contain the lower
* triangular matrix and the strictly upper triangular part of
* A is not referenced.
* Note that when DIAG = 'U' or 'u', the diagonal elements of
* A are not referenced either, but are assumed to be unity.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, n ).
* Unchanged on exit.
*
* X - DOUBLE PRECISION array of dimension at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the n
* element right-hand side vector b. On exit, X is overwritten
* with the solution vector x.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
@@ -220,7 +277,7 @@
END IF
ELSE
*
* Form x := inv( A' )*x.
* Form x := inv( A**T )*x.
*
IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN
+74 -24
View File
@@ -1,23 +1,74 @@
*> \brief \b DZASUM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX*16 ZX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
*> returns a single precision result.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
DOUBLE COMPLEX ZX(*)
COMPLEX*16 ZX(*)
* ..
*
* Purpose
* =======
*
* takes the sum of the absolute values.
* jack dongarra, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION STEMP
INTEGER I,IX
INTEGER I,NINCX
* ..
* .. External Functions ..
DOUBLE PRECISION DCABS1
@@ -26,23 +77,22 @@
DZASUM = 0.0d0
STEMP = 0.0d0
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
IX = 1
DO 10 I = 1,N
STEMP = STEMP + DCABS1(ZX(IX))
IX = IX + INCX
10 CONTINUE
DZASUM = STEMP
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 DO 30 I = 1,N
STEMP = STEMP + DCABS1(ZX(I))
30 CONTINUE
DO I = 1,N
STEMP = STEMP + DCABS1(ZX(I))
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
STEMP = STEMP + DCABS1(ZX(I))
END DO
END IF
DZASUM = STEMP
RETURN
END
+62 -14
View File
@@ -1,24 +1,72 @@
*> \brief \b DZNRM2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX*16 X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DZNRM2 returns the euclidean norm of a vector via the function
*> name, so that
*>
*> DZNRM2 := sqrt( x**H*x )
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> -- This version written on 25-October-1982.
*> Modified on 14-October-1993 to inline the call to ZLASSQ.
*> Sven Hammarling, Nag Ltd.
*> \endverbatim
*>
* =====================================================================
DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
DOUBLE COMPLEX X(*)
COMPLEX*16 X(*)
* ..
*
* Purpose
* =======
*
* DZNRM2 returns the euclidean norm of a vector via the function
* name, so that
*
* DZNRM2 := sqrt( conjg( x' )*x )
*
*
* -- This version written on 25-October-1982.
* Modified on 14-October-1993 to inline the call to ZLASSQ.
* Sven Hammarling, Nag Ltd.
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
+81 -28
View File
@@ -1,4 +1,61 @@
*> \brief \b ICAMAX
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* INTEGER FUNCTION ICAMAX(N,CX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup aux_blas
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
INTEGER FUNCTION ICAMAX(N,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,14 +63,7 @@
COMPLEX CX(*)
* ..
*
* Purpose
* =======
*
* finds the index of element having max. absolute value.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
REAL SMAX
@@ -27,28 +77,31 @@
IF (N.LT.1 .OR. INCX.LE.0) RETURN
ICAMAX = 1
IF (N.EQ.1) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
IX = 1
SMAX = SCABS1(CX(1))
IX = IX + INCX
DO 10 I = 2,N
IF (SCABS1(CX(IX)).LE.SMAX) GO TO 5
ICAMAX = I
SMAX = SCABS1(CX(IX))
5 IX = IX + INCX
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 SMAX = SCABS1(CX(1))
DO 30 I = 2,N
IF (SCABS1(CX(I)).LE.SMAX) GO TO 30
ICAMAX = I
SMAX = SCABS1(CX(I))
30 CONTINUE
SMAX = SCABS1(CX(1))
DO I = 2,N
IF (SCABS1(CX(I)).GT.SMAX) THEN
ICAMAX = I
SMAX = SCABS1(CX(I))
END IF
END DO
ELSE
*
* code for increment not equal to 1
*
IX = 1
SMAX = SCABS1(CX(1))
IX = IX + INCX
DO I = 2,N
IF (SCABS1(CX(IX)).GT.SMAX) THEN
ICAMAX = I
SMAX = SCABS1(CX(IX))
END IF
IX = IX + INCX
END DO
END IF
RETURN
END
+81 -28
View File
@@ -1,4 +1,61 @@
*> \brief \b IDAMAX
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* INTEGER FUNCTION IDAMAX(N,DX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> IDAMAX finds the index of the first element having maximum absolute value.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup aux_blas
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
INTEGER FUNCTION IDAMAX(N,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,14 +63,7 @@
DOUBLE PRECISION DX(*)
* ..
*
* Purpose
* =======
*
* finds the index of element having max. absolute value.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION DMAX
@@ -26,28 +76,31 @@
IF (N.LT.1 .OR. INCX.LE.0) RETURN
IDAMAX = 1
IF (N.EQ.1) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
IX = 1
DMAX = DABS(DX(1))
IX = IX + INCX
DO 10 I = 2,N
IF (DABS(DX(IX)).LE.DMAX) GO TO 5
IDAMAX = I
DMAX = DABS(DX(IX))
5 IX = IX + INCX
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 DMAX = DABS(DX(1))
DO 30 I = 2,N
IF (DABS(DX(I)).LE.DMAX) GO TO 30
IDAMAX = I
DMAX = DABS(DX(I))
30 CONTINUE
DMAX = DABS(DX(1))
DO I = 2,N
IF (DABS(DX(I)).GT.DMAX) THEN
IDAMAX = I
DMAX = DABS(DX(I))
END IF
END DO
ELSE
*
* code for increment not equal to 1
*
IX = 1
DMAX = DABS(DX(1))
IX = IX + INCX
DO I = 2,N
IF (DABS(DX(IX)).GT.DMAX) THEN
IDAMAX = I
DMAX = DABS(DX(IX))
END IF
IX = IX + INCX
END DO
END IF
RETURN
END
-42
View File
@@ -1,42 +0,0 @@
INTEGER FUNCTION ILA_LEN_TRIM(SUBNAM)
C
C -- LAPACK auxiliary routine (version 3.1) --
C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
C October 2006
C
C .. Scalar Arguments ..
CHARACTER*(*) SUBNAM
C ..
C
C Purpose
C =======
C
C ILA_LEN_TRIM is called from testing and timing routines to remove
C trailing spaces from its argument. It is included in the library
C for possible use within a user's XERBLA error-handing routine.
C
C Arguments
C =========
C
C SUBNAM (input) CHARACTER*(*)
C Provides the string.
C
C RETURN VALUE: INTEGER
C = N > 0 : The location of the last non-blank.
C = 0 : The entire string is blank.
C
C .. Local Scalars ..
INTEGER I
C ..
C .. Intrinsic Functions ..
INTRINSIC LEN
C ..
DO I = LEN(SUBNAM),1,-1
IF (SUBNAM(I:I).NE.' ') THEN
ILA_LEN_TRIM = I
RETURN
END IF
END DO
ILA_LEN_TRIM = 0
END
+81 -28
View File
@@ -1,4 +1,61 @@
*> \brief \b ISAMAX
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* INTEGER FUNCTION ISAMAX(N,SX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* REAL SX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> ISAMAX finds the index of the first element having maximum absolute value.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup aux_blas
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
INTEGER FUNCTION ISAMAX(N,SX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,14 +63,7 @@
REAL SX(*)
* ..
*
* Purpose
* =======
*
* finds the index of element having max. absolute value.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
REAL SMAX
@@ -26,28 +76,31 @@
IF (N.LT.1 .OR. INCX.LE.0) RETURN
ISAMAX = 1
IF (N.EQ.1) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
IX = 1
SMAX = ABS(SX(1))
IX = IX + INCX
DO 10 I = 2,N
IF (ABS(SX(IX)).LE.SMAX) GO TO 5
ISAMAX = I
SMAX = ABS(SX(IX))
5 IX = IX + INCX
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 SMAX = ABS(SX(1))
DO 30 I = 2,N
IF (ABS(SX(I)).LE.SMAX) GO TO 30
ISAMAX = I
SMAX = ABS(SX(I))
30 CONTINUE
SMAX = ABS(SX(1))
DO I = 2,N
IF (ABS(SX(I)).GT.SMAX) THEN
ISAMAX = I
SMAX = ABS(SX(I))
END IF
END DO
ELSE
*
* code for increment not equal to 1
*
IX = 1
SMAX = ABS(SX(1))
IX = IX + INCX
DO I = 2,N
IF (ABS(SX(IX)).GT.SMAX) THEN
ISAMAX = I
SMAX = ABS(SX(IX))
END IF
IX = IX + INCX
END DO
END IF
RETURN
END
+83 -30
View File
@@ -1,22 +1,72 @@
*> \brief \b IZAMAX
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* INTEGER FUNCTION IZAMAX(N,ZX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX*16 ZX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup aux_blas
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, 1/15/85.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
INTEGER FUNCTION IZAMAX(N,ZX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
DOUBLE COMPLEX ZX(*)
COMPLEX*16 ZX(*)
* ..
*
* Purpose
* =======
*
* finds the index of element having max. absolute value.
* jack dongarra, 1/15/85.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION SMAX
DOUBLE PRECISION DMAX
INTEGER I,IX
* ..
* .. External Functions ..
@@ -27,28 +77,31 @@
IF (N.LT.1 .OR. INCX.LE.0) RETURN
IZAMAX = 1
IF (N.EQ.1) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
IX = 1
SMAX = DCABS1(ZX(1))
IX = IX + INCX
DO 10 I = 2,N
IF (DCABS1(ZX(IX)).LE.SMAX) GO TO 5
IZAMAX = I
SMAX = DCABS1(ZX(IX))
5 IX = IX + INCX
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 SMAX = DCABS1(ZX(1))
DO 30 I = 2,N
IF (DCABS1(ZX(I)).LE.SMAX) GO TO 30
IZAMAX = I
SMAX = DCABS1(ZX(I))
30 CONTINUE
DMAX = DCABS1(ZX(1))
DO I = 2,N
IF (DCABS1(ZX(I)).GT.DMAX) THEN
IZAMAX = I
DMAX = DCABS1(ZX(I))
END IF
END DO
ELSE
*
* code for increment not equal to 1
*
IX = 1
DMAX = DCABS1(ZX(1))
IX = IX + INCX
DO I = 2,N
IF (DCABS1(ZX(IX)).GT.DMAX) THEN
IZAMAX = I
DMAX = DCABS1(ZX(IX))
END IF
IX = IX + INCX
END DO
END IF
RETURN
END
+57 -17
View File
@@ -1,27 +1,67 @@
*> \brief \b LSAME
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* LOGICAL FUNCTION LSAME(CA,CB)
*
* .. Scalar Arguments ..
* CHARACTER CA,CB
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> LSAME returns .TRUE. if CA is the same letter as CB regardless of
*> case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] CA
*> \verbatim
*> CA is CHARACTER*1
*> \endverbatim
*>
*> \param[in] CB
*> \verbatim
*> CB is CHARACTER*1
*> CA and CB specify the single characters to be compared.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup aux_blas
*
* =====================================================================
LOGICAL FUNCTION LSAME(CA,CB)
*
* -- LAPACK auxiliary routine (version 3.1) --
* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
* November 2006
* -- Reference BLAS level1 routine (version 3.1) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
CHARACTER CA,CB
* ..
*
* Purpose
* =======
*
* LSAME returns .TRUE. if CA is the same letter as CB regardless of
* case.
*
* Arguments
* =========
*
* CA (input) CHARACTER*1
*
* CB (input) CHARACTER*1
* CA and CB specify the single characters to be compared.
*
* =====================================================================
*
* .. Intrinsic Functions ..
+86 -33
View File
@@ -1,4 +1,62 @@
*> \brief \b SASUM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SASUM(N,SX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* REAL SX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SASUM takes the sum of the absolute values.
*> uses unrolled loops for increment equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
REAL FUNCTION SASUM(N,SX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,17 +64,8 @@
REAL SX(*)
* ..
*
* Purpose
* =======
* =====================================================================
*
* takes the sum of the absolute values.
* uses unrolled loops for increment equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
*
* .. Local Scalars ..
REAL STEMP
INTEGER I,M,MP1,NINCX
@@ -27,33 +76,37 @@
SASUM = 0.0e0
STEMP = 0.0e0
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
STEMP = STEMP + ABS(SX(I))
10 CONTINUE
SASUM = STEMP
RETURN
*
IF (INCX.EQ.1) THEN
* code for increment equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,6)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
STEMP = STEMP + ABS(SX(I))
30 CONTINUE
IF (N.LT.6) GO TO 60
40 MP1 = M + 1
DO 50 I = MP1,N,6
STEMP = STEMP + ABS(SX(I)) + ABS(SX(I+1)) + ABS(SX(I+2)) +
+ ABS(SX(I+3)) + ABS(SX(I+4)) + ABS(SX(I+5))
50 CONTINUE
60 SASUM = STEMP
M = MOD(N,6)
IF (M.NE.0) THEN
DO I = 1,M
STEMP = STEMP + ABS(SX(I))
END DO
IF (N.LT.6) THEN
SASUM = STEMP
RETURN
END IF
END IF
MP1 = M + 1
DO I = MP1,N,6
STEMP = STEMP + ABS(SX(I)) + ABS(SX(I+1)) +
$ ABS(SX(I+2)) + ABS(SX(I+3)) +
$ ABS(SX(I+4)) + ABS(SX(I+5))
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
STEMP = STEMP + ABS(SX(I))
END DO
END IF
SASUM = STEMP
RETURN
END
+89 -36
View File
@@ -1,4 +1,62 @@
*> \brief \b SAXPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
*
* .. Scalar Arguments ..
* REAL SA
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SAXPY constant times a vector plus a vector.
*> uses unrolled loops for increments equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL SA
INTEGER INCX,INCY,N
@@ -7,14 +65,7 @@
REAL SX(*),SY(*)
* ..
*
* Purpose
* =======
*
* SAXPY constant times a vector plus a vector.
* uses unrolled loop for increments equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
@@ -24,39 +75,41 @@
* ..
IF (N.LE.0) RETURN
IF (SA.EQ.0.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
SY(IY) = SY(IY) + SA*SX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,4)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
SY(I) = SY(I) + SA*SX(I)
30 CONTINUE
IF (N.LT.4) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,4
SY(I) = SY(I) + SA*SX(I)
SY(I+1) = SY(I+1) + SA*SX(I+1)
SY(I+2) = SY(I+2) + SA*SX(I+2)
SY(I+3) = SY(I+3) + SA*SX(I+3)
50 CONTINUE
M = MOD(N,4)
IF (M.NE.0) THEN
DO I = 1,M
SY(I) = SY(I) + SA*SX(I)
END DO
END IF
IF (N.LT.4) RETURN
MP1 = M + 1
DO I = MP1,N,4
SY(I) = SY(I) + SA*SX(I)
SY(I+1) = SY(I+1) + SA*SX(I+1)
SY(I+2) = SY(I+2) + SA*SX(I+2)
SY(I+3) = SY(I+3) + SA*SX(I+3)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
SY(IY) = SY(IY) + SA*SX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+45 -4
View File
@@ -1,12 +1,53 @@
*> \brief \b SCABS1
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SCABS1(Z)
*
* .. Scalar Arguments ..
* COMPLEX Z
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SCABS1 computes |Re(.)| + |Im(.)| of a complex number
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup single_blas_level1
*
* =====================================================================
REAL FUNCTION SCABS1(Z)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
COMPLEX Z
* ..
*
* Purpose
* =======
*
* SCABS1 computes absolute value of a complex number
* =====================================================================
*
* .. Intrinsic Functions ..
INTRINSIC ABS,AIMAG,REAL
+72 -22
View File
@@ -1,4 +1,62 @@
*> \brief \b SCASUM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SCASUM(N,CX,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SCASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
*> returns a single precision result.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
REAL FUNCTION SCASUM(N,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,15 +64,7 @@
COMPLEX CX(*)
* ..
*
* Purpose
* =======
*
* takes the sum of the absolute values of a complex vector and
* returns a single precision result.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
REAL STEMP
@@ -26,22 +76,22 @@
SCASUM = 0.0e0
STEMP = 0.0e0
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))
10 CONTINUE
SCASUM = STEMP
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
20 DO 30 I = 1,N
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))
30 CONTINUE
DO I = 1,N
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I)))
END DO
END IF
SCASUM = STEMP
RETURN
END
+61 -14
View File
@@ -1,4 +1,64 @@
*> \brief \b SCNRM2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SCNRM2(N,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* COMPLEX X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SCNRM2 returns the euclidean norm of a vector via the function
*> name, so that
*>
*> SCNRM2 := sqrt( x**H*x )
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> -- This version written on 25-October-1982.
*> Modified on 14-October-1993 to inline the call to CLASSQ.
*> Sven Hammarling, Nag Ltd.
*> \endverbatim
*>
* =====================================================================
REAL FUNCTION SCNRM2(N,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,20 +66,7 @@
COMPLEX X(*)
* ..
*
* Purpose
* =======
*
* SCNRM2 returns the euclidean norm of a vector via the function
* name, so that
*
* SCNRM2 := sqrt( conjg( x' )*x )
*
*
*
* -- This version written on 25-October-1982.
* Modified on 14-October-1993 to inline the call to CLASSQ.
* Sven Hammarling, Nag Ltd.
*
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
+91 -39
View File
@@ -1,4 +1,61 @@
*> \brief \b SCOPY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SCOPY copies a vector, x, to a vector, y.
*> uses unrolled loops for increments equal to 1.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,14 +63,7 @@
REAL SX(*),SY(*)
* ..
*
* Purpose
* =======
*
* copies a vector, x, to a vector, y.
* uses unrolled loops for increments equal to 1.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
@@ -22,42 +72,44 @@
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
SY(IY) = SX(IX)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,7)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
SY(I) = SX(I)
30 CONTINUE
IF (N.LT.7) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,7
SY(I) = SX(I)
SY(I+1) = SX(I+1)
SY(I+2) = SX(I+2)
SY(I+3) = SX(I+3)
SY(I+4) = SX(I+4)
SY(I+5) = SX(I+5)
SY(I+6) = SX(I+6)
50 CONTINUE
M = MOD(N,7)
IF (M.NE.0) THEN
DO I = 1,M
SY(I) = SX(I)
END DO
IF (N.LT.7) RETURN
END IF
MP1 = M + 1
DO I = MP1,N,7
SY(I) = SX(I)
SY(I+1) = SX(I+1)
SY(I+2) = SX(I+2)
SY(I+3) = SX(I+3)
SY(I+4) = SX(I+4)
SY(I+5) = SX(I+5)
SY(I+6) = SX(I+6)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
SY(IY) = SX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+89 -36
View File
@@ -1,4 +1,61 @@
*> \brief \b SDOT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SDOT forms the dot product of two vectors.
*> uses unrolled loops for increments equal to one.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
@@ -6,16 +63,8 @@
REAL SX(*),SY(*)
* ..
*
* Purpose
* =======
* =====================================================================
*
* forms the dot product of two vectors.
* uses unrolled loops for increments equal to one.
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
*
* .. Local Scalars ..
REAL STEMP
INTEGER I,IX,IY,M,MP1
@@ -26,39 +75,43 @@
STEMP = 0.0e0
SDOT = 0.0e0
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
STEMP = STEMP + SX(IX)*SY(IY)
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
SDOT = STEMP
RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,5)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
STEMP = STEMP + SX(I)*SY(I)
30 CONTINUE
IF (N.LT.5) GO TO 60
40 MP1 = M + 1
DO 50 I = MP1,N,5
M = MOD(N,5)
IF (M.NE.0) THEN
DO I = 1,M
STEMP = STEMP + SX(I)*SY(I)
END DO
IF (N.LT.5) THEN
SDOT=STEMP
RETURN
END IF
END IF
MP1 = M + 1
DO I = MP1,N,5
STEMP = STEMP + SX(I)*SY(I) + SX(I+1)*SY(I+1) +
+ SX(I+2)*SY(I+2) + SX(I+3)*SY(I+3) + SX(I+4)*SY(I+4)
50 CONTINUE
60 SDOT = STEMP
$ SX(I+2)*SY(I+2) + SX(I+3)*SY(I+3) + SX(I+4)*SY(I+4)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
STEMP = STEMP + SX(IX)*SY(IY)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
SDOT = STEMP
RETURN
END
+172 -22
View File
@@ -1,4 +1,150 @@
*> \brief \b SDSDOT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
*
* .. Scalar Arguments ..
* REAL SB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
* PURPOSE
* =======
*
* Compute the inner product of two vectors with extended
* precision accumulation.
*
* Returns S.P. result with dot product accumulated in D.P.
* SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
* where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
* defined in a similar way using INCY.
*
* AUTHOR
* ======
* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
*
* ARGUMENTS
* =========
*
* N (input) INTEGER
* number of elements in input vector(s)
*
* SB (input) REAL
* single precision scalar to be added to inner product
*
* SX (input) REAL array, dimension (N)
* single precision vector with N elements
*
* INCX (input) INTEGER
* storage spacing between elements of SX
*
* SY (input) REAL array, dimension (N)
* single precision vector with N elements
*
* INCY (input) INTEGER
* storage spacing between elements of SY
*
* SDSDOT (output) REAL
* single precision dot product (SB if N .LE. 0)
*
* Further Details
* ===============
*
* REFERENCES
*
* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
* Krogh, Basic linear algebra subprograms for Fortran
* usage, Algorithm No. 539, Transactions on Mathematical
* Software 5, 3 (September 1979), pp. 308-323.
*
* REVISION HISTORY (YYMMDD)
*
* 791001 DATE WRITTEN
* 890531 Changed all specific intrinsics to generic. (WRB)
* 890831 Modified array declarations. (WRB)
* 890831 REVISION DATE from Version 3.2
* 891214 Prologue converted to Version 4.0 format. (BAB)
* 920310 Corrected definition of LX in DESCRIPTION. (WRB)
* 920501 Reformatted the REFERENCES section. (WRB)
* 070118 Reformat to LAPACK coding style
*
* =====================================================================
*
* .. Local Scalars ..
* DOUBLE PRECISION DSDOT
* INTEGER I,KX,KY,NS
* ..
* .. Intrinsic Functions ..
* INTRINSIC DBLE
* ..
* DSDOT = SB
* IF (N.LE.0) THEN
* SDSDOT = DSDOT
* RETURN
* END IF
* IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
*
* Code for equal and positive increments.
*
* NS = N*INCX
* DO I = 1,NS,INCX
* DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
* END DO
* ELSE
*
* Code for unequal or nonpositive increments.
*
* KX = 1
* KY = 1
* IF (INCX.LT.0) KX = 1 + (1-N)*INCX
* IF (INCY.LT.0) KY = 1 + (1-N)*INCY
* DO I = 1,N
* DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
* KX = KX + INCX
* KY = KY + INCY
* END DO
* END IF
* SDSDOT = DSDOT
* RETURN
* END
*
*> \par Purpose:
* =============
*>
*> \verbatim
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
* =====================================================================
REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL SB
INTEGER INCX,INCY,N
@@ -47,8 +193,10 @@
* SDSDOT (output) REAL
* single precision dot product (SB if N .LE. 0)
*
* Further Details
* ===============
*
* REFERENCES
* ==========
*
* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
* Krogh, Basic linear algebra subprograms for Fortran
@@ -56,7 +204,6 @@
* Software 5, 3 (September 1979), pp. 308-323.
*
* REVISION HISTORY (YYMMDD)
* ==========================
*
* 791001 DATE WRITTEN
* 890531 Changed all specific intrinsics to generic. (WRB)
@@ -77,29 +224,32 @@
INTRINSIC DBLE
* ..
DSDOT = SB
IF (N.LE.0) GO TO 30
IF (INCX.EQ.INCY .AND. INCX.GT.0) GO TO 40
*
* Code for unequal or nonpositive increments.
*
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
DO 10 I = 1,N
DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
KX = KX + INCX
KY = KY + INCY
10 CONTINUE
30 SDSDOT = DSDOT
RETURN
IF (N.LE.0) THEN
SDSDOT = DSDOT
RETURN
END IF
IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
*
* Code for equal and positive increments.
*
40 NS = N*INCX
DO 50 I = 1,NS,INCX
DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
50 CONTINUE
NS = N*INCX
DO I = 1,NS,INCX
DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
END DO
ELSE
*
* Code for unequal or nonpositive increments.
*
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
DO I = 1,N
DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
KX = KX + INCX
KY = KY + INCY
END DO
END IF
SDSDOT = DSDOT
RETURN
END
+205 -132
View File
@@ -1,4 +1,195 @@
*> \brief \b SGBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* REAL ALPHA,BETA
* INTEGER INCX,INCY,KL,KU,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* REAL A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SGBMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] KL
*> \verbatim
*> KL is INTEGER
*> On entry, KL specifies the number of sub-diagonals of the
*> matrix A. KL must satisfy 0 .le. KL.
*> \endverbatim
*>
*> \param[in] KU
*> \verbatim
*> KU is INTEGER
*> On entry, KU specifies the number of super-diagonals of the
*> matrix A. KU must satisfy 0 .le. KU.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is REAL array of DIMENSION ( LDA, n ).
*> Before entry, the leading ( kl + ku + 1 ) by n part of the
*> array A must contain the matrix of coefficients, supplied
*> column by column, with the leading diagonal of the matrix in
*> row ( ku + 1 ) of the array, the first super-diagonal
*> starting at position 2 in row ku, the first sub-diagonal
*> starting at position 1 in row ( ku + 2 ), and so on.
*> Elements in the array A that do not correspond to elements
*> in the band matrix (such as the top left ku by ku triangle)
*> are not referenced.
*> The following program segment will transfer a band matrix
*> from conventional full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> K = KU + 1 - J
*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
*> A( K + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( kl + ku + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is 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.
*> Before entry, the incremented array X must contain the
*> vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is 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.
*> Before entry, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup single_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
INTEGER INCX,INCY,KL,KU,LDA,M,N
@@ -8,121 +199,7 @@
REAL A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* SGBMV performs one of the matrix-vector operations
*
* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
*
* where alpha and beta are scalars, x and y are vectors and A is an
* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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*A'*x + beta*y.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* KL - INTEGER.
* On entry, KL specifies the number of sub-diagonals of the
* matrix A. KL must satisfy 0 .le. KL.
* Unchanged on exit.
*
* KU - INTEGER.
* On entry, KU specifies the number of super-diagonals of the
* matrix A. KU must satisfy 0 .le. KU.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - REAL array of DIMENSION ( LDA, n ).
* Before entry, the leading ( kl + ku + 1 ) by n part of the
* array A must contain the matrix of coefficients, supplied
* column by column, with the leading diagonal of the matrix in
* row ( ku + 1 ) of the array, the first super-diagonal
* starting at position 2 in row ku, the first sub-diagonal
* starting at position 1 in row ( ku + 2 ), and so on.
* Elements in the array A that do not correspond to elements
* in the band matrix (such as the top left ku by ku triangle)
* are not referenced.
* The following program segment will transfer a band matrix
* from conventional full matrix storage to band storage:
*
* DO 20, J = 1, N
* K = KU + 1 - J
* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
* A( K + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( kl + ku + 1 ).
* Unchanged on exit.
*
* 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.
* Before entry, the incremented array X must contain the
* vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* 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.
* Before entry, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
@@ -235,33 +312,29 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
K = KUP1 - J
DO 50 I = MAX(1,J-KU),MIN(M,J+KL)
Y(I) = Y(I) + TEMP*A(K+I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
K = KUP1 - J
DO 70 I = MAX(1,J-KU),MIN(M,J+KL)
Y(IY) = Y(IY) + TEMP*A(K+I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
IF (J.GT.KU) KY = KY + INCY
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y.
* Form y := alpha*A**T*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+205 -134
View File
@@ -1,4 +1,197 @@
*> \brief \b SGEMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* REAL ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,M,N
* CHARACTER TRANSA,TRANSB
* ..
* .. Array Arguments ..
* REAL A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SGEMM performs one of the matrix-matrix operations
*>
*> C := alpha*op( A )*op( B ) + beta*C,
*>
*> where op( X ) is one of
*>
*> op( X ) = X or op( X ) = X**T,
*>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANSA
*> \verbatim
*> TRANSA is CHARACTER*1
*> On entry, TRANSA specifies the form of op( A ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSA = 'N' or 'n', op( A ) = A.
*>
*> TRANSA = 'T' or 't', op( A ) = A**T.
*>
*> TRANSA = 'C' or 'c', op( A ) = A**T.
*> \endverbatim
*>
*> \param[in] TRANSB
*> \verbatim
*> TRANSB is CHARACTER*1
*> On entry, TRANSB specifies the form of op( B ) to be used in
*> the matrix multiplication as follows:
*>
*> TRANSB = 'N' or 'n', op( B ) = B.
*>
*> TRANSB = 'T' or 't', op( B ) = B**T.
*>
*> TRANSB = 'C' or 'c', op( B ) = B**T.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix
*> op( A ) and of the matrix C. M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix
*> op( B ) and the number of columns of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of columns of the matrix
*> op( A ) and the number of rows of the matrix op( B ). K must
*> be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is 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 A, otherwise
*> the leading k by m part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as 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 ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is 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 contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
*> LDB must be at least max( 1, k ), otherwise LDB must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is 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.
*> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup single_blas_level3
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*>
*> -- Written on 8-February-1989.
*> Jack Dongarra, Argonne National Laboratory.
*> Iain Duff, AERE Harwell.
*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
*> Sven Hammarling, Numerical Algorithms Group Ltd.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
INTEGER K,LDA,LDB,LDC,M,N
@@ -8,125 +201,7 @@
REAL A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* Purpose
* =======
*
* SGEMM performs one of the matrix-matrix operations
*
* C := alpha*op( A )*op( B ) + beta*C,
*
* where op( X ) is one of
*
* op( X ) = X or op( X ) = X',
*
* alpha and beta are scalars, and A, B and C are matrices, with op( A )
* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*
* Arguments
* ==========
*
* TRANSA - CHARACTER*1.
* On entry, TRANSA specifies the form of op( A ) to be used in
* the matrix multiplication as follows:
*
* TRANSA = 'N' or 'n', op( A ) = A.
*
* TRANSA = 'T' or 't', op( A ) = A'.
*
* TRANSA = 'C' or 'c', op( A ) = A'.
*
* Unchanged on exit.
*
* TRANSB - CHARACTER*1.
* On entry, TRANSB specifies the form of op( B ) to be used in
* the matrix multiplication as follows:
*
* TRANSB = 'N' or 'n', op( B ) = B.
*
* TRANSB = 'T' or 't', op( B ) = B'.
*
* TRANSB = 'C' or 'c', op( B ) = B'.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix
* op( A ) and of the matrix C. M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix
* op( B ) and the number of columns of the matrix C. N must be
* at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of columns of the matrix
* op( A ) and the number of rows of the matrix op( B ). K must
* be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* 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 A, otherwise
* the leading k by m part of the array A must contain the
* matrix A.
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as 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 ).
* Unchanged on exit.
*
* 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 contain the matrix B, otherwise
* the leading n by k part of the array B must contain the
* matrix B.
* Unchanged on exit.
*
* LDB - INTEGER.
* On entry, LDB specifies the first dimension of B as declared
* in the calling (sub) program. When TRANSB = 'N' or 'n' then
* LDB must be at least max( 1, k ), otherwise LDB must be at
* least max( 1, n ).
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then C need not be set on input.
* Unchanged on exit.
*
* 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.
* On exit, the array C is overwritten by the m by n matrix
* ( alpha*op( A )*op( B ) + beta*C ).
*
* LDC - INTEGER.
* On entry, LDC specifies the first dimension of C as declared
* in the calling (sub) program. LDC must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* Level 3 Blas routine.
*
* -- Written on 8-February-1989.
* Jack Dongarra, Argonne National Laboratory.
* Iain Duff, AERE Harwell.
* Jeremy Du Croz, Numerical Algorithms Group Ltd.
* Sven Hammarling, Numerical Algorithms Group Ltd.
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
@@ -236,17 +311,15 @@
60 CONTINUE
END IF
DO 80 L = 1,K
IF (B(L,J).NE.ZERO) THEN
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
END IF
TEMP = ALPHA*B(L,J)
DO 70 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
70 CONTINUE
80 CONTINUE
90 CONTINUE
ELSE
*
* Form C := alpha*A'*B + beta*C
* Form C := alpha*A**T*B + beta*C
*
DO 120 J = 1,N
DO 110 I = 1,M
@@ -265,7 +338,7 @@
ELSE
IF (NOTA) THEN
*
* Form C := alpha*A*B' + beta*C
* Form C := alpha*A*B**T + beta*C
*
DO 170 J = 1,N
IF (BETA.EQ.ZERO) THEN
@@ -278,17 +351,15 @@
140 CONTINUE
END IF
DO 160 L = 1,K
IF (B(J,L).NE.ZERO) THEN
TEMP = ALPHA*B(J,L)
DO 150 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
150 CONTINUE
END IF
TEMP = ALPHA*B(J,L)
DO 150 I = 1,M
C(I,J) = C(I,J) + TEMP*A(I,L)
150 CONTINUE
160 CONTINUE
170 CONTINUE
ELSE
*
* Form C := alpha*A'*B' + beta*C
* Form C := alpha*A**T*B**T + beta*C
*
DO 200 J = 1,N
DO 190 I = 1,M
+174 -105
View File
@@ -1,4 +1,166 @@
*> \brief \b SGEMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* REAL ALPHA,BETA
* INTEGER INCX,INCY,LDA,M,N
* CHARACTER TRANS
* ..
* .. Array Arguments ..
* REAL A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SGEMV performs one of the matrix-vector operations
*>
*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are vectors and A is an
*> m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, 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**T*x + beta*y.
*>
*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is REAL array of DIMENSION ( LDA, n ).
*> Before entry, the leading m by n part of the array A must
*> contain the matrix of coefficients.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is 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.
*> Before entry, the incremented array X must contain the
*> vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is 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.
*> 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.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2015
*
*> \ingroup single_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.6.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2015
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
INTEGER INCX,INCY,LDA,M,N
@@ -8,96 +170,7 @@
REAL A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* SGEMV performs one of the matrix-vector operations
*
* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
*
* where alpha and beta are scalars, x and y are vectors and A is an
* m by n matrix.
*
* Arguments
* ==========
*
* TRANS - CHARACTER*1.
* On entry, 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*A'*x + beta*y.
*
* Unchanged on exit.
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* 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 - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
* 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.
* Before entry, the incremented array X must contain the
* vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta. When BETA is
* supplied as zero then Y need not be set on input.
* Unchanged on exit.
*
* 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.
* 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 - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
@@ -205,30 +278,26 @@
JX = KX
IF (INCY.EQ.1) THEN
DO 60 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
END IF
TEMP = ALPHA*X(JX)
DO 50 I = 1,M
Y(I) = Y(I) + TEMP*A(I,J)
50 CONTINUE
JX = JX + INCX
60 CONTINUE
ELSE
DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
END IF
TEMP = ALPHA*X(JX)
IY = KY
DO 70 I = 1,M
Y(IY) = Y(IY) + TEMP*A(I,J)
IY = IY + INCY
70 CONTINUE
JX = JX + INCX
80 CONTINUE
END IF
ELSE
*
* Form y := alpha*A'*x + y.
* Form y := alpha*A**T*x + y.
*
JY = KY
IF (INCX.EQ.1) THEN
+137 -69
View File
@@ -1,4 +1,140 @@
*> \brief \b SGER
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* REAL ALPHA
* INTEGER INCX,INCY,LDA,M,N
* ..
* .. Array Arguments ..
* REAL A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SGER performs the rank 1 operation
*>
*> A := alpha*x*y**T + A,
*>
*> where alpha is a scalar, x is an m element vector, y is an n element
*> vector and A is an m by n matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix A.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is REAL array of dimension at least
*> ( 1 + ( m - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the m
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is REAL array of dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is REAL array of DIMENSION ( LDA, 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.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL ALPHA
INTEGER INCX,INCY,LDA,M,N
@@ -7,75 +143,7 @@
REAL A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* SGER performs the rank 1 operation
*
* A := alpha*x*y' + A,
*
* where alpha is a scalar, x is an m element vector, y is an n element
* vector and A is an m by n matrix.
*
* Arguments
* ==========
*
* M - INTEGER.
* On entry, M specifies the number of rows of the matrix A.
* M must be at least zero.
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the number of columns of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* X - REAL array of dimension at least
* ( 1 + ( m - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the m
* element vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* Y - REAL array of dimension at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the n
* element vector y.
* Unchanged on exit.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
* 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. On exit, A is
* overwritten by the updated matrix.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* max( 1, m ).
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
REAL ZERO
+61 -15
View File
@@ -1,4 +1,64 @@
*> \brief \b SNRM2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* REAL FUNCTION SNRM2(N,X,INCX)
*
* .. Scalar Arguments ..
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* REAL X(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SNRM2 returns the euclidean norm of a vector via the function
*> name, so that
*>
*> SNRM2 := sqrt( x'*x ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> -- This version written on 25-October-1982.
*> Modified on 14-October-1993 to inline the call to SLASSQ.
*> Sven Hammarling, Nag Ltd.
*> \endverbatim
*>
* =====================================================================
REAL FUNCTION SNRM2(N,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
@@ -6,21 +66,7 @@
REAL X(*)
* ..
*
* Purpose
* =======
*
* SNRM2 returns the euclidean norm of a vector via the function
* name, so that
*
* SNRM2 := sqrt( x'*x ).
*
* Further Details
* ===============
*
* -- This version written on 25-October-1982.
* Modified on 14-October-1993 to inline the call to SLASSQ.
* Sven Hammarling, Nag Ltd.
*
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
+80 -33
View File
@@ -1,4 +1,61 @@
*> \brief \b SROT
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
*
* .. Scalar Arguments ..
* REAL C,S
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> applies a plane rotation.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL C,S
INTEGER INCX,INCY,N
@@ -7,48 +64,38 @@
REAL SX(*),SY(*)
* ..
*
* Purpose
* =======
* =====================================================================
*
* applies a plane rotation.
*
* Further Details
* ===============
*
* jack dongarra, linpack, 3/11/78.
* modified 12/3/93, array(1) declarations changed to array(*)
*
*
* .. Local Scalars ..
REAL STEMP
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
STEMP = C*SX(I) + S*SY(I)
SY(I) = C*SY(I) - S*SX(I)
SX(I) = STEMP
END DO
ELSE
*
* code for unequal increments or equal increments not equal
* to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO 10 I = 1,N
STEMP = C*SX(IX) + S*SY(IY)
SY(IY) = C*SY(IY) - S*SX(IX)
SX(IX) = STEMP
IX = IX + INCX
IY = IY + INCY
10 CONTINUE
RETURN
*
* code for both increments equal to 1
*
20 DO 30 I = 1,N
STEMP = C*SX(I) + S*SY(I)
SY(I) = C*SY(I) - S*SX(I)
SX(I) = STEMP
30 CONTINUE
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
STEMP = C*SX(IX) + S*SY(IY)
SY(IY) = C*SY(IY) - S*SX(IX)
SX(IX) = STEMP
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
END
+68 -20
View File
@@ -1,14 +1,61 @@
*> \brief \b SROTG
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SROTG(SA,SB,C,S)
*
* .. Scalar Arguments ..
* REAL C,S,SA,SB
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SROTG construct givens plane rotation.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SROTG(SA,SB,C,S)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL C,S,SA,SB
* ..
*
* Purpose
* =======
*
* construct givens plane rotation.
* jack dongarra, linpack, 3/11/78.
*
* =====================================================================
*
* .. Local Scalars ..
REAL R,ROE,SCALE,Z
@@ -19,20 +66,21 @@
ROE = SB
IF (ABS(SA).GT.ABS(SB)) ROE = SA
SCALE = ABS(SA) + ABS(SB)
IF (SCALE.NE.0.0) GO TO 10
C = 1.0
S = 0.0
R = 0.0
Z = 0.0
GO TO 20
10 R = SCALE*SQRT((SA/SCALE)**2+ (SB/SCALE)**2)
R = SIGN(1.0,ROE)*R
C = SA/R
S = SB/R
Z = 1.0
IF (ABS(SA).GT.ABS(SB)) Z = S
IF (ABS(SB).GE.ABS(SA) .AND. C.NE.0.0) Z = 1.0/C
20 SA = R
IF (SCALE.EQ.0.0) THEN
C = 1.0
S = 0.0
R = 0.0
Z = 0.0
ELSE
R = SCALE*SQRT((SA/SCALE)**2+ (SB/SCALE)**2)
R = SIGN(1.0,ROE)*R
C = SA/R
S = SB/R
Z = 1.0
IF (ABS(SA).GT.ABS(SB)) Z = S
IF (ABS(SB).GE.ABS(SA) .AND. C.NE.0.0) Z = 1.0/C
END IF
SA = R
SB = Z
RETURN
END
+181 -126
View File
@@ -1,56 +1,116 @@
*> \brief \b SROTM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
*
* .. Scalar Arguments ..
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SPARAM(5),SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
*>
*> (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
*> (SX**T)
*>
*> SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
*> LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
*> WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*>
*> SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
*>
*> (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
*> H=( ) ( ) ( ) ( )
*> (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
*> SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in,out] SX
*> \verbatim
*> SX is REAL array, dimension N
*> double precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of SX
*> \endverbatim
*>
*> \param[in,out] SY
*> \verbatim
*> SY is REAL array, dimension N
*> double precision vector with N elements
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of SY
*> \endverbatim
*>
*> \param[in,out] SPARAM
*> \verbatim
*> SPARAM is REAL array, dimension 5
*> SPARAM(1)=SFLAG
*> SPARAM(2)=SH11
*> SPARAM(3)=SH21
*> SPARAM(4)=SH12
*> SPARAM(5)=SH22
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
* =====================================================================
SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
REAL SPARAM(5),SX(1),SY(1)
REAL SPARAM(5),SX(*),SY(*)
* ..
*
* Purpose
* =======
*
* APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
*
* (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
* (DX**T)
*
* SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
* LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
* WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*
* SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
*
* (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
* H=( ) ( ) ( ) ( )
* (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
* SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
*
*
* Arguments
* =========
*
* N (input) INTEGER
* number of elements in input vector(s)
*
* SX (input/output) REAL array, dimension N
* double precision vector with 5 elements
*
* INCX (input) INTEGER
* storage spacing between elements of SX
*
* SY (input/output) REAL array, dimension N
* double precision vector with N elements
*
* INCY (input) INTEGER
* storage spacing between elements of SY
*
* SPARAM (input/output) REAL array, dimension 5
* SPARAM(1)=SFLAG
* SPARAM(2)=SH11
* SPARAM(3)=SH21
* SPARAM(4)=SH12
* SPARAM(5)=SH22
*
* =====================================================================
*
* .. Local Scalars ..
@@ -62,87 +122,82 @@
* ..
*
SFLAG = SPARAM(1)
IF (N.LE.0 .OR. (SFLAG+TWO.EQ.ZERO)) GO TO 140
IF (.NOT. (INCX.EQ.INCY.AND.INCX.GT.0)) GO TO 70
IF (N.LE.0 .OR. (SFLAG+TWO.EQ.ZERO)) RETURN
IF (INCX.EQ.INCY.AND.INCX.GT.0) THEN
*
NSTEPS = N*INCX
IF (SFLAG) 50,10,30
10 CONTINUE
SH12 = SPARAM(4)
SH21 = SPARAM(3)
DO 20 I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W + Z*SH12
SY(I) = W*SH21 + Z
20 CONTINUE
GO TO 140
30 CONTINUE
SH11 = SPARAM(2)
SH22 = SPARAM(5)
DO 40 I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W*SH11 + Z
SY(I) = -W + SH22*Z
40 CONTINUE
GO TO 140
50 CONTINUE
SH11 = SPARAM(2)
SH12 = SPARAM(4)
SH21 = SPARAM(3)
SH22 = SPARAM(5)
DO 60 I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W*SH11 + Z*SH12
SY(I) = W*SH21 + Z*SH22
60 CONTINUE
GO TO 140
70 CONTINUE
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
NSTEPS = N*INCX
IF (SFLAG.LT.ZERO) THEN
SH11 = SPARAM(2)
SH12 = SPARAM(4)
SH21 = SPARAM(3)
SH22 = SPARAM(5)
DO I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W*SH11 + Z*SH12
SY(I) = W*SH21 + Z*SH22
END DO
ELSE IF (SFLAG.EQ.ZERO) THEN
SH12 = SPARAM(4)
SH21 = SPARAM(3)
DO I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W + Z*SH12
SY(I) = W*SH21 + Z
END DO
ELSE
SH11 = SPARAM(2)
SH22 = SPARAM(5)
DO I = 1,NSTEPS,INCX
W = SX(I)
Z = SY(I)
SX(I) = W*SH11 + Z
SY(I) = -W + SH22*Z
END DO
END IF
ELSE
KX = 1
KY = 1
IF (INCX.LT.0) KX = 1 + (1-N)*INCX
IF (INCY.LT.0) KY = 1 + (1-N)*INCY
*
IF (SFLAG) 120,80,100
80 CONTINUE
SH12 = SPARAM(4)
SH21 = SPARAM(3)
DO 90 I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W + Z*SH12
SY(KY) = W*SH21 + Z
KX = KX + INCX
KY = KY + INCY
90 CONTINUE
GO TO 140
100 CONTINUE
SH11 = SPARAM(2)
SH22 = SPARAM(5)
DO 110 I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W*SH11 + Z
SY(KY) = -W + SH22*Z
KX = KX + INCX
KY = KY + INCY
110 CONTINUE
GO TO 140
120 CONTINUE
SH11 = SPARAM(2)
SH12 = SPARAM(4)
SH21 = SPARAM(3)
SH22 = SPARAM(5)
DO 130 I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W*SH11 + Z*SH12
SY(KY) = W*SH21 + Z*SH22
KX = KX + INCX
KY = KY + INCY
130 CONTINUE
140 CONTINUE
IF (SFLAG.LT.ZERO) THEN
SH11 = SPARAM(2)
SH12 = SPARAM(4)
SH21 = SPARAM(3)
SH22 = SPARAM(5)
DO I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W*SH11 + Z*SH12
SY(KY) = W*SH21 + Z*SH22
KX = KX + INCX
KY = KY + INCY
END DO
ELSE IF (SFLAG.EQ.ZERO) THEN
SH12 = SPARAM(4)
SH21 = SPARAM(3)
DO I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W + Z*SH12
SY(KY) = W*SH21 + Z
KX = KX + INCX
KY = KY + INCY
END DO
ELSE
SH11 = SPARAM(2)
SH22 = SPARAM(5)
DO I = 1,N
W = SX(KX)
Z = SY(KY)
SX(KX) = W*SH11 + Z
SY(KY) = -W + SH22*Z
KX = KX + INCX
KY = KY + INCY
END DO
END IF
END IF
RETURN
END
+221 -178
View File
@@ -1,4 +1,100 @@
*> \brief \b SROTMG
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
*
* .. Scalar Arguments ..
* REAL SD1,SD2,SX1,SY1
* ..
* .. Array Arguments ..
* REAL SPARAM(5)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
*> THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*> SY2)**T.
*> WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*>
*> SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
*>
*> (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
*> H=( ) ( ) ( ) ( )
*> (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
*> LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
*> RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
*> VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
*>
*> THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
*> INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
*> OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in,out] SD1
*> \verbatim
*> SD1 is REAL
*> \endverbatim
*>
*> \param[in,out] SD2
*> \verbatim
*> SD2 is REAL
*> \endverbatim
*>
*> \param[in,out] SX1
*> \verbatim
*> SX1 is REAL
*> \endverbatim
*>
*> \param[in] SY1
*> \verbatim
*> SY1 is REAL
*> \endverbatim
*>
*> \param[in,out] SPARAM
*> \verbatim
*> SPARAM is REAL array, dimension 5
*> SPARAM(1)=SFLAG
*> SPARAM(2)=SH11
*> SPARAM(3)=SH21
*> SPARAM(4)=SH12
*> SPARAM(5)=SH22
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
* =====================================================================
SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL SD1,SD2,SX1,SY1
* ..
@@ -6,54 +102,11 @@
REAL SPARAM(5)
* ..
*
* Purpose
* =======
*
* CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
* THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*
* SY2)**T.
* WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
*
* SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
*
* (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
* H=( ) ( ) ( ) ( )
* (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
* LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
* RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
* VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
*
* THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
* INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
* OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
*
*
* Arguments
* =========
*
*
* SD1 (input/output) REAL
*
* SD2 (input/output) REAL
*
* SX1 (input/output) REAL
*
* SY1 (input) REAL
*
*
* SPARAM (input/output) REAL array, dimension 5
* SPARAM(1)=SFLAG
* SPARAM(2)=SH11
* SPARAM(3)=SH21
* SPARAM(4)=SH12
* SPARAM(5)=SH22
*
* =====================================================================
*
* .. Local Scalars ..
REAL GAM,GAMSQ,ONE,RGAMSQ,SFLAG,SH11,SH12,SH21,SH22,SP1,SP2,SQ1,
+ SQ2,STEMP,SU,TWO,ZERO
INTEGER IGO
$ SQ2,STEMP,SU,TWO,ZERO
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS
@@ -64,145 +117,135 @@
DATA GAM,GAMSQ,RGAMSQ/4096.E0,1.67772E7,5.96046E-8/
* ..
IF (.NOT.SD1.LT.ZERO) GO TO 10
* GO ZERO-H-D-AND-SX1..
GO TO 60
10 CONTINUE
* CASE-SD1-NONNEGATIVE
SP2 = SD2*SY1
IF (.NOT.SP2.EQ.ZERO) GO TO 20
SFLAG = -TWO
GO TO 260
* REGULAR-CASE..
20 CONTINUE
SP1 = SD1*SX1
SQ2 = SP2*SY1
SQ1 = SP1*SX1
IF (SD1.LT.ZERO) THEN
* GO ZERO-H-D-AND-SX1..
SFLAG = -ONE
SH11 = ZERO
SH12 = ZERO
SH21 = ZERO
SH22 = ZERO
*
IF (.NOT.ABS(SQ1).GT.ABS(SQ2)) GO TO 40
SH21 = -SY1/SX1
SH12 = SP2/SP1
SD1 = ZERO
SD2 = ZERO
SX1 = ZERO
ELSE
* CASE-SD1-NONNEGATIVE
SP2 = SD2*SY1
IF (SP2.EQ.ZERO) THEN
SFLAG = -TWO
SPARAM(1) = SFLAG
RETURN
END IF
* REGULAR-CASE..
SP1 = SD1*SX1
SQ2 = SP2*SY1
SQ1 = SP1*SX1
*
SU = ONE - SH12*SH21
IF (ABS(SQ1).GT.ABS(SQ2)) THEN
SH21 = -SY1/SX1
SH12 = SP2/SP1
*
IF (.NOT.SU.LE.ZERO) GO TO 30
* GO ZERO-H-D-AND-SX1..
GO TO 60
30 CONTINUE
SFLAG = ZERO
SD1 = SD1/SU
SD2 = SD2/SU
SX1 = SX1*SU
* GO SCALE-CHECK..
GO TO 100
40 CONTINUE
IF (.NOT.SQ2.LT.ZERO) GO TO 50
* GO ZERO-H-D-AND-SX1..
GO TO 60
50 CONTINUE
SFLAG = ONE
SH11 = SP1/SP2
SH22 = SX1/SY1
SU = ONE + SH11*SH22
STEMP = SD2/SU
SD2 = SD1/SU
SD1 = STEMP
SX1 = SY1*SU
* GO SCALE-CHECK
GO TO 100
* PROCEDURE..ZERO-H-D-AND-SX1..
60 CONTINUE
SFLAG = -ONE
SH11 = ZERO
SH12 = ZERO
SH21 = ZERO
SH22 = ZERO
SU = ONE - SH12*SH21
*
SD1 = ZERO
SD2 = ZERO
SX1 = ZERO
* RETURN..
GO TO 220
* PROCEDURE..FIX-H..
70 CONTINUE
IF (.NOT.SFLAG.GE.ZERO) GO TO 90
IF (SU.GT.ZERO) THEN
SFLAG = ZERO
SD1 = SD1/SU
SD2 = SD2/SU
SX1 = SX1*SU
END IF
ELSE
IF (SQ2.LT.ZERO) THEN
* GO ZERO-H-D-AND-SX1..
SFLAG = -ONE
SH11 = ZERO
SH12 = ZERO
SH21 = ZERO
SH22 = ZERO
*
IF (.NOT.SFLAG.EQ.ZERO) GO TO 80
SH11 = ONE
SH22 = ONE
SFLAG = -ONE
GO TO 90
80 CONTINUE
SH21 = -ONE
SH12 = ONE
SFLAG = -ONE
90 CONTINUE
GO TO IGO(120,150,180,210)
* PROCEDURE..SCALE-CHECK
100 CONTINUE
110 CONTINUE
IF (.NOT.SD1.LE.RGAMSQ) GO TO 130
IF (SD1.EQ.ZERO) GO TO 160
ASSIGN 120 TO IGO
* FIX-H..
GO TO 70
120 CONTINUE
SD1 = SD1*GAM**2
SX1 = SX1/GAM
SH11 = SH11/GAM
SH12 = SH12/GAM
GO TO 110
130 CONTINUE
140 CONTINUE
IF (.NOT.SD1.GE.GAMSQ) GO TO 160
ASSIGN 150 TO IGO
* FIX-H..
GO TO 70
150 CONTINUE
SD1 = SD1/GAM**2
SX1 = SX1*GAM
SH11 = SH11*GAM
SH12 = SH12*GAM
GO TO 140
160 CONTINUE
170 CONTINUE
IF (.NOT.ABS(SD2).LE.RGAMSQ) GO TO 190
IF (SD2.EQ.ZERO) GO TO 220
ASSIGN 180 TO IGO
* FIX-H..
GO TO 70
180 CONTINUE
SD2 = SD2*GAM**2
SH21 = SH21/GAM
SH22 = SH22/GAM
GO TO 170
190 CONTINUE
200 CONTINUE
IF (.NOT.ABS(SD2).GE.GAMSQ) GO TO 220
ASSIGN 210 TO IGO
* FIX-H..
GO TO 70
210 CONTINUE
SD2 = SD2/GAM**2
SH21 = SH21*GAM
SH22 = SH22*GAM
GO TO 200
220 CONTINUE
IF (SFLAG) 250,230,240
230 CONTINUE
SPARAM(3) = SH21
SPARAM(4) = SH12
GO TO 260
240 CONTINUE
SPARAM(2) = SH11
SPARAM(5) = SH22
GO TO 260
250 CONTINUE
SPARAM(2) = SH11
SPARAM(3) = SH21
SPARAM(4) = SH12
SPARAM(5) = SH22
260 CONTINUE
SD1 = ZERO
SD2 = ZERO
SX1 = ZERO
ELSE
SFLAG = ONE
SH11 = SP1/SP2
SH22 = SX1/SY1
SU = ONE + SH11*SH22
STEMP = SD2/SU
SD2 = SD1/SU
SD1 = STEMP
SX1 = SY1*SU
END IF
END IF
* PROCESURE..SCALE-CHECK
IF (SD1.NE.ZERO) THEN
DO WHILE ((SD1.LE.RGAMSQ) .OR. (SD1.GE.GAMSQ))
IF (SFLAG.EQ.ZERO) THEN
SH11 = ONE
SH22 = ONE
SFLAG = -ONE
ELSE
SH21 = -ONE
SH12 = ONE
SFLAG = -ONE
END IF
IF (SD1.LE.RGAMSQ) THEN
SD1 = SD1*GAM**2
SX1 = SX1/GAM
SH11 = SH11/GAM
SH12 = SH12/GAM
ELSE
SD1 = SD1/GAM**2
SX1 = SX1*GAM
SH11 = SH11*GAM
SH12 = SH12*GAM
END IF
ENDDO
END IF
IF (SD2.NE.ZERO) THEN
DO WHILE ( (ABS(SD2).LE.RGAMSQ) .OR. (ABS(SD2).GE.GAMSQ) )
IF (SFLAG.EQ.ZERO) THEN
SH11 = ONE
SH22 = ONE
SFLAG = -ONE
ELSE
SH21 = -ONE
SH12 = ONE
SFLAG = -ONE
END IF
IF (ABS(SD2).LE.RGAMSQ) THEN
SD2 = SD2*GAM**2
SH21 = SH21/GAM
SH22 = SH22/GAM
ELSE
SD2 = SD2/GAM**2
SH21 = SH21*GAM
SH22 = SH22*GAM
END IF
END DO
END IF
END IF
IF (SFLAG.LT.ZERO) THEN
SPARAM(2) = SH11
SPARAM(3) = SH21
SPARAM(4) = SH12
SPARAM(5) = SH22
ELSE IF (SFLAG.EQ.ZERO) THEN
SPARAM(3) = SH21
SPARAM(4) = SH12
ELSE
SPARAM(2) = SH11
SPARAM(5) = SH22
END IF
SPARAM(1) = SFLAG
RETURN
END
+191 -119
View File
@@ -1,4 +1,194 @@
*> \brief \b SSBMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* REAL ALPHA,BETA
* INTEGER INCX,INCY,K,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* REAL A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SSBMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n symmetric band matrix, with k super-diagonals.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the band matrix A is being supplied as
*> follows:
*>
*> UPLO = 'U' or 'u' The upper triangular part of A is
*> being supplied.
*>
*> UPLO = 'L' or 'l' The lower triangular part of A is
*> being supplied.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry, K specifies the number of super-diagonals of the
*> matrix A. K must satisfy 0 .le. K.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is REAL
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is REAL array of DIMENSION ( LDA, n ).
*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
*> by n part of the array A must contain the upper triangular
*> band part of the symmetric matrix, supplied column by
*> column, with the leading diagonal of the matrix in row
*> ( k + 1 ) of the array, the first super-diagonal starting at
*> position 2 in row k, and so on. The top left k by k triangle
*> of the array A is not referenced.
*> The following program segment will transfer the upper
*> triangular part of a symmetric band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = K + 1 - J
*> DO 10, I = MAX( 1, J - K ), J
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*>
*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
*> by n part of the array A must contain the lower triangular
*> band part of the symmetric matrix, supplied column by
*> column, with the leading diagonal of the matrix in row 1 of
*> the array, the first sub-diagonal starting at position 1 in
*> row 2, and so on. The bottom right k by k triangle of the
*> array A is not referenced.
*> The following program segment will transfer the lower
*> triangular part of a symmetric band matrix from conventional
*> full matrix storage to band storage:
*>
*> DO 20, J = 1, N
*> M = 1 - J
*> DO 10, I = J, MIN( N, J + K )
*> A( M + I, J ) = matrix( I, J )
*> 10 CONTINUE
*> 20 CONTINUE
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> ( k + 1 ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is REAL array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the
*> vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is REAL
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is REAL array of DIMENSION at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the
*> vector y. On exit, Y is overwritten by the updated vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*>
*> -- 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.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
INTEGER INCX,INCY,K,LDA,N
@@ -8,125 +198,7 @@
REAL A(LDA,*),X(*),Y(*)
* ..
*
* Purpose
* =======
*
* SSBMV performs the matrix-vector operation
*
* y := alpha*A*x + beta*y,
*
* where alpha and beta are scalars, x and y are n element vectors and
* A is an n by n symmetric band matrix, with k super-diagonals.
*
* Arguments
* ==========
*
* UPLO - CHARACTER*1.
* On entry, UPLO specifies whether the upper or lower
* triangular part of the band matrix A is being supplied as
* follows:
*
* UPLO = 'U' or 'u' The upper triangular part of A is
* being supplied.
*
* UPLO = 'L' or 'l' The lower triangular part of A is
* being supplied.
*
* Unchanged on exit.
*
* N - INTEGER.
* On entry, N specifies the order of the matrix A.
* N must be at least zero.
* Unchanged on exit.
*
* K - INTEGER.
* On entry, K specifies the number of super-diagonals of the
* matrix A. K must satisfy 0 .le. K.
* Unchanged on exit.
*
* ALPHA - REAL .
* On entry, ALPHA specifies the scalar alpha.
* Unchanged on exit.
*
* A - REAL array of DIMENSION ( LDA, n ).
* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
* by n part of the array A must contain the upper triangular
* band part of the symmetric matrix, supplied column by
* column, with the leading diagonal of the matrix in row
* ( k + 1 ) of the array, the first super-diagonal starting at
* position 2 in row k, and so on. The top left k by k triangle
* of the array A is not referenced.
* The following program segment will transfer the upper
* triangular part of a symmetric band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = K + 1 - J
* DO 10, I = MAX( 1, J - K ), J
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
* by n part of the array A must contain the lower triangular
* band part of the symmetric matrix, supplied column by
* column, with the leading diagonal of the matrix in row 1 of
* the array, the first sub-diagonal starting at position 1 in
* row 2, and so on. The bottom right k by k triangle of the
* array A is not referenced.
* The following program segment will transfer the lower
* triangular part of a symmetric band matrix from conventional
* full matrix storage to band storage:
*
* DO 20, J = 1, N
* M = 1 - J
* DO 10, I = J, MIN( N, J + K )
* A( M + I, J ) = matrix( I, J )
* 10 CONTINUE
* 20 CONTINUE
*
* Unchanged on exit.
*
* LDA - INTEGER.
* On entry, LDA specifies the first dimension of A as declared
* in the calling (sub) program. LDA must be at least
* ( k + 1 ).
* Unchanged on exit.
*
* X - REAL array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCX ) ).
* Before entry, the incremented array X must contain the
* vector x.
* Unchanged on exit.
*
* INCX - INTEGER.
* On entry, INCX specifies the increment for the elements of
* X. INCX must not be zero.
* Unchanged on exit.
*
* BETA - REAL .
* On entry, BETA specifies the scalar beta.
* Unchanged on exit.
*
* Y - REAL array of DIMENSION at least
* ( 1 + ( n - 1 )*abs( INCY ) ).
* Before entry, the incremented array Y must contain the
* vector y. On exit, Y is overwritten by the updated vector y.
*
* INCY - INTEGER.
* On entry, INCY specifies the increment for the elements of
* Y. INCY must not be zero.
* Unchanged on exit.
*
*
* 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.
*
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
+85 -32
View File
@@ -1,4 +1,63 @@
*> \brief \b SSCAL
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SSCAL(N,SA,SX,INCX)
*
* .. Scalar Arguments ..
* REAL SA
* INTEGER INCX,N
* ..
* .. Array Arguments ..
* REAL SX(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> scales a vector by a constant.
*> uses unrolled loops for increment equal to 1.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2011
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> jack dongarra, linpack, 3/11/78.
*> modified 3/93 to return if incx .le. 0.
*> modified 12/3/93, array(1) declarations changed to array(*)
*> \endverbatim
*>
* =====================================================================
SUBROUTINE SSCAL(N,SA,SX,INCX)
*
* -- Reference BLAS level1 routine (version 3.4.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2011
*
* .. Scalar Arguments ..
REAL SA
INTEGER INCX,N
@@ -7,15 +66,7 @@
REAL SX(*)
* ..
*
* Purpose
* =======
*
* scales a vector by a constant.
* uses unrolled loops for increment equal to 1.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,M,MP1,NINCX
@@ -24,34 +75,36 @@
INTRINSIC MOD
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (INCX.EQ.1) GO TO 20
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO 10 I = 1,NINCX,INCX
SX(I) = SA*SX(I)
10 CONTINUE
RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
*
*
* clean-up loop
*
20 M = MOD(N,5)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
SX(I) = SA*SX(I)
30 CONTINUE
IF (N.LT.5) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,5
SX(I) = SA*SX(I)
SX(I+1) = SA*SX(I+1)
SX(I+2) = SA*SX(I+2)
SX(I+3) = SA*SX(I+3)
SX(I+4) = SA*SX(I+4)
50 CONTINUE
M = MOD(N,5)
IF (M.NE.0) THEN
DO I = 1,M
SX(I) = SA*SX(I)
END DO
IF (N.LT.5) RETURN
END IF
MP1 = M + 1
DO I = MP1,N,5
SX(I) = SA*SX(I)
SX(I+1) = SA*SX(I+1)
SX(I+2) = SA*SX(I+2)
SX(I+3) = SA*SX(I+3)
SX(I+4) = SA*SX(I+4)
END DO
ELSE
*
* code for increment not equal to 1
*
NINCX = N*INCX
DO I = 1,NINCX,INCX
SX(I) = SA*SX(I)
END DO
END IF
RETURN
END

Some files were not shown because too many files have changed in this diff Show More