Compare commits

...
724 Commits
Author SHA1 Message Date
langou 7866626840 Merge pull request #751 from weslleyspereira/lapack-3.11-preparation
Preparing LAPACK 3.11
2022-11-11 10:49:54 -07:00
Weslley da Silva Pereira 57f15d84c1 Change ILAVER and Doxyfile accordingly 2022-11-10 10:43:17 -07:00
Weslley da Silva Pereira 9300418fe4 Change README and CMakeLists to LAPACK 3.11 2022-11-10 10:29:22 -07:00
langou e7253049ce Merge pull request #739 from scr2016/master
added new routines [S,D,C,Z]GELST and test code for the least squares
2022-11-10 08:08:40 -07:00
scr2016 d5203e94d5 added missing testing for error exits for ZGELST routine, i.e.
modified TESTING/LIN/zerrls.f accordingly. Also fixed comments typo in
[S,D,C,Z]GELST.
modified:   SRC/cgelst.f
modified:   SRC/dgelst.f
modified:   SRC/sgelst.f
modified:   SRC/zgelst.f
modified:   TESTING/LIN/zerrls.f
2022-11-10 07:00:47 -08:00
Weslley S. Pereira d7614a37b4 Merge pull request #627 from martin-frbg/appveyor-conda
Update conda version used in Appveyor
2022-11-09 10:26:30 -07:00
Weslley S. Pereira c30e50270b Merge pull request #631 from weslleyspereira/fix-precision-in-clartgf90-2
New algorithms for computing Givens rotations
2022-11-09 10:24:43 -07:00
langou 5c5ddfd4bf Merge pull request #747 from weslleyspereira/fix-733
Fix wrong documentation as reported in #733
2022-11-09 10:08:15 -07:00
Weslley S. Pereira 4911ca48b1 Update .appveyor.yml
Removing comments.

Keep the one commented line that disabled automatic updates of conda itself.
2022-11-09 10:00:46 -07:00
Martin Kroeker b095fc6b5b temporarily disable build cache 2022-11-09 11:37:01 +01:00
Martin Kroeker 4c8b76da4e use newer miniconda 2022-11-09 11:22:53 +01:00
Martin Kroeker a790c4dbe5 Update .appveyor.yml 2022-11-08 22:23:59 +01:00
Martin Kroeker f7fa63f973 Update .appveyor.yml 2022-11-08 22:06:05 +01:00
Martin Kroeker 798ab5f8c3 Update .appveyor.yml 2022-11-08 21:54:38 +01:00
Martin Kroeker ac7d655484 Update .appveyor.yml 2022-11-08 18:53:46 +01:00
Martin Kroeker 70373e1a4c Update .appveyor.yml 2022-11-08 17:24:27 +01:00
Martin Kroeker ab12b85909 Update .appveyor.yml 2022-11-08 17:09:50 +01:00
Martin Kroeker 4bf5eb723c Update .appveyor.yml 2022-11-08 16:03:37 +01:00
Martin Kroeker 6fa0844c31 Update .appveyor.yml 2022-11-08 14:33:37 +01:00
Martin Kroeker f076f7482b reshuffle conda commands 2022-11-08 14:14:42 +01:00
Martin Kroeker 211fbbed0e allow conda updates again 2022-11-08 13:22:32 +01:00
Weslley da Silva Pereira f8b6b40498 Fix wrong documentation as reported in #733 2022-11-07 15:48:55 -07:00
langou 1e7759a9f2 Merge pull request #742 from ACSimon33/LAPACKE_xLARFB_nancheck
Lapacke x larfb nancheck
2022-10-30 18:37:12 -06:00
langou 20b45b995d Merge pull request #741 from ACSimon33/lapacke_xtrsyl3_iwork_query
Added missing iwork query.
2022-10-30 18:37:00 -06:00
Simon Maertens 48377cdf6f Added missing iwork query. 2022-10-31 00:29:43 +01:00
langou 755c71b24b Merge pull request #740 from ACSimon33/LAPACKE_ctrsyl3_work
Added missing declaration for LAPACKE_ctrsyl3_work
2022-10-30 17:16:16 -06:00
Simon Maertens 80392de422 Added missing declaration for LAPACKE_ctrsyl3_work. 2022-10-31 00:01:47 +01:00
Simon Maertens 6ef9ae99da Updated build system. 2022-10-30 23:47:16 +01:00
Simon Maertens de9eb94acf Updated lapacke_utils header 2022-10-30 23:46:55 +01:00
Simon Maertens 87cb1d113c Added trapezoidal transpositions to LAPACKE_?larfb_work. 2022-10-30 23:37:31 +01:00
Simon Maertens c91f13e2f7 Fixed rows and cols order in ?larfb 2022-10-30 21:32:46 +01:00
Simon Maertens 6b5c5bba7f Implemented transpose function for trapezoidal matrices. 2022-10-30 21:09:03 +01:00
Simon Maertens 70c4244912 Paranthesis formatting. 2022-10-30 21:02:31 +01:00
Simon Maertens c43d27a889 Paranthesis formatting. 2022-10-30 20:14:32 +01:00
Simon Maertens 2da7000a7f Fixed bug in trapezoidal NaN check. 2022-10-30 20:12:09 +01:00
Simon Maertens a7e0724530 Used trapezoidal NaN check in LAPACKE_?larfb 2022-10-30 17:30:26 +01:00
scr2016 b8f586bcc4 added a new routines [S,D,C,Z]GELST and test code for the least
squares algorithm that solves overdetermined or underdetermined systems for
GE matrices using QR or LQ factorization with compact WY representation
of Q inside the routine.

*GELST is similar to *GELS, but unlike *GELS does not compute triangular blocks
twice, i.e. runs faster.

modified:   SRC/Makefile
new file:   SRC/cgelst.f
new file:   SRC/dgelst.f
new file:   SRC/sgelst.f
new file:   SRC/zgelst.f
modified:   TESTING/LIN/alahd.f
modified:   TESTING/LIN/cdrvls.f
modified:   TESTING/LIN/cerrls.f
modified:   TESTING/LIN/ddrvls.f
modified:   TESTING/LIN/derrls.f
modified:   TESTING/LIN/sdrvls.f
modified:   TESTING/LIN/serrls.f
modified:   TESTING/LIN/zdrvls.f
2022-10-29 02:47:52 -07:00
langou 17f99f2836 Merge pull request #738 from ACSimon33/LAPACKE_norm_routines
NaN check for trapezoidal routines.
2022-10-27 12:11:56 -06:00
Simon Maertens bcfdb93aed Removed tabs. 2022-10-27 17:56:17 +02:00
Simon Maertens 14ff62a81e Removed empty lines. 2022-10-27 17:54:04 +02:00
Simon Maertens 0b36d01679 Formatting. 2022-10-27 17:34:42 +02:00
Simon Maertens 9d4f2e0cc7 Added NaN check for trapezoidal matrices and applied it to LAPACKE_?lantr 2022-10-27 17:26:11 +02:00
Simon Maertens ed72332590 Added LAPACK_?langb.o objects to the Makefile. 2022-10-23 15:42:57 +02:00
langou 0b7c0830b1 Merge pull request #735 from eltociear/patch-1
Fix typo in ieeeck.f
2022-10-19 10:46:54 -06:00
Ikko Ashimine 8371b0b9de Fix typo in ieeeck.f
inifinity -> infinity
2022-10-20 01:16:46 +09:00
langou e94df5383a Merge pull request #540 from weslleyspereira/fix-404-LAPACKE-dtpmqrt
Fix error on LAPACKE_*tpmqrt_work for ROW MAJOR matrices
2022-10-18 13:55:37 -06:00
langou 28f7e83096 Merge pull request #728 from angsch/master
Fix lower triangular band matrix generation
2022-10-12 18:19:11 -06:00
Weslley da Silva Pereira c9e012152f Apply the fixes on lapacke_(c,s,z)tpmqrt_work.c 2022-10-12 13:14:21 -06:00
Angelika Schwarz ca9fa5a016 Fix lower triangular band matrix generation
Closes #343
2022-10-12 18:22:51 +02:00
langou 96bd210ccd Merge pull request #655 from weslleyspereira/try-improve-convergence-dlaed4
Try improve convergence dlaed4
2022-10-11 19:39:14 -06:00
Weslley da Silva Pereira 64a0db9b19 Applies fixes thanks to @angsch 2022-10-10 13:51:07 -06:00
Weslley S. Pereira 79a37b29a5 Merge pull request #721 from angsch/cblas
Fix 2 CBLAS issues
2022-10-06 14:49:25 -06:00
langou 7012e36507 Merge pull request #651 from angsch/master
Add level-3 BLAS triangular Sylvester equation solver
2022-10-06 14:22:58 -06:00
langou 34b804e996 Merge pull request #698 from thijssteel/qz-revert-infinite-eigenvalue-criterion
Use normwise criterion for inf eigenvalues in QZ
2022-10-06 14:11:05 -06:00
langou 64023f5699 Merge pull request #725 from ACSimon33/LAPACKE_xlangb
Implemented a LAPACKE_?langb interface
2022-10-06 14:09:55 -06:00
langou 83c7e0def1 Merge pull request #703 from weslleyspereira/explicit-all-conversions
Define conversions explicitly, and use more rigorous flags in the CI
2022-10-06 13:57:21 -06:00
Simon Maertens 15e62c3e70 Use the same trick as in ?lange to remove the matrix transposition. 2022-10-06 13:59:10 +01:00
Simon Maertens 945bb8d170 Removed unnecessary assign to info. 2022-10-05 19:58:26 +01:00
Simon Maertens 6c6c5a5372 Changed copyright year of LAPACKE_?langb files. 2022-10-05 19:48:52 +01:00
Simon Maertens 12ce4ff977 Changed auther of LAPACKE_?langb files. 2022-10-05 19:38:32 +01:00
Simon Maertens 1de378bbb9 Added LAPACKE_?langb interfaces. 2022-10-05 18:00:40 +01:00
Angelika Schwarz a8028e9ddc Fix undefined reference to cblas_[sd]cabs1
cblas.h defines

   double cblas_dcabs1(const void  *z);
   float  cblas_scabs1(const void  *c);

but does not provide an implementation. This commit adds
the missing implementation in the common CBLAS style and
eliminates the linker error when calling the above function.
2022-10-02 16:54:32 +02:00
langou 7c16bc09a8 Merge pull request #712 from angsch/scale
Set SCALE early for robust triangular solvers
2022-09-29 17:45:02 -06:00
langou 291d268f03 Merge pull request #720 from MonicaLiu0311/vcpkg-installition
Add vcpkg installation instructions
2022-09-27 17:45:58 -06:00
Angelika Schwarz 02b71fcbc6 Add interfaces cblas_[c,z]rotg, cblas_[cs,zd]rot
Closes #473
2022-09-27 19:46:08 +02:00
Angelika Schwarz 0a7dec1ff1 Avoid NaN generation in LATRS
Fixes #714
2022-09-25 17:38:34 +02:00
Angelika Schwarz 7ce9bf5fca Set SCALE early for robust triangular solvers
1) The docs define SCALE as an output argument. Set SCALE *before*
the quick return case to have SCALE defined in all cases. This is
how the similar routine TRSYL handles the case already.

2) Remove invocations of LABAD in complex routines and be consistent
with their real counterparts, which do not call LABAD.
2022-09-19 17:20:47 +02:00
langou 4f5e185894 Merge pull request #697 from weslleyspereira/fix-sorcsd
Fix sorcsd
2022-09-18 12:00:32 -06:00
Angelika Schwarz 970a7721d8 Add BLAS-3 robust triangular solver T*X = B*diag(s1, ..., sN)
An extensions of LATRS solving T*x = s*x to many right-hand sides,
allowing the usage of BLAS-3.

The new algorithm tends to use less aggressive scaling,
in particular for larger matrices.
2022-09-18 15:22:13 +02:00
Monica 3067a050e9 Add vcpkg installation instructions 2022-09-15 15:29:47 +08:00
Angelika Schwarz 1c1263ec24 Use unblocked code if insufficient workspace is provided 2022-09-14 20:12:53 +02:00
Angelika Schwarz 8f441098cc LAPACKE interface of [cz]trsyl3 2022-09-14 20:12:53 +02:00
Angelika Schwarz 05f9e54f0f Add ctrsyl3 and corresponding tests 2022-09-14 20:12:53 +02:00
Angelika Schwarz 079c185c6a Add ztrsyl3 and corresponding tests
The tests of ztrsyl via zget35 are on tiny matrices that fall into the
unblocked section of ztrsyl3. Add a new test file that checks ztrsyl(3)
for larger matrices and their compatibility: Every problem that is
solvable by ztrsyl must be solvable by ztrsyl3.
2022-09-14 20:12:53 +02:00
Angelika Schwarz 46275f0d78 LAPACKE interface of [sd]trsyl3 2022-09-14 20:12:53 +02:00
Angelika Schwarz 833cd585b5 Test [sd]trsyl3 2022-09-14 20:12:53 +02:00
Angelika Schwarz cda8a83b76 Add level-3 BLAS triangular Sylvester equation solver
Force compatibility with [ds]trsyl. Use two floating-point
scaling factors (rather than integer scaling factors).
This does not eliminate the problem that scalings can be flushed,
making any result useless. That problem could be eliminated
by replacing the floating-point scale factor with an integer
scale factor.
2022-09-14 20:12:53 +02:00
langou 801ac2ff7a Merge pull request #696 from ACSimon33/time_check_flag_propagation
Time check flag propagation and default value.
2022-08-31 07:08:33 -06:00
langou be3a076e1c Merge pull request #713 from ACSimon33/test_summary_fix
Fixed the test dependencies of the test summary
2022-08-28 08:15:33 -06:00
Simon Maertens 40f565c4d6 Fixed the test dependencies of the test summary. Improved status message. 2022-08-22 10:49:19 +01:00
Weslley S. Pereira dcba2e274a Merge pull request #700 from ACSimon33/cblas_int64_warning_fix
Fixed format warnings in 64 bit integer builds.
2022-08-11 12:33:20 -06:00
Weslley da Silva Pereira 9f6566470e Use LTO and warnings for unused variables only on the Makefile CI 2022-08-11 10:07:59 -06:00
Weslley da Silva Pereira fdcd1de954 Removes all implicit conversions from the Fortran and add -Werror=conversion to the CI 2022-08-11 08:55:37 -06:00
Weslley da Silva Pereira 5792a1dc93 Add more information and more strict rules to the CI 2022-08-10 17:26:53 -06:00
Weslley da Silva Pereira 0b9757db86 Explicit all conversions in the Fortran code 2022-08-10 17:26:53 -06:00
Weslley S. Pereira cb8d38c76b Merge pull request #706 from mjacobse/testing-type-mismatches
Fix type mismatches in function calls of testing code
2022-08-10 17:23:18 -06:00
Marcel Jacobse 35dd277cdd Fix type mismatches in function calls of testing code 2022-08-10 20:18:54 +02:00
Simon Maertens 0b5b0fa478 Added 64-bit integer switch to lapack.h header 2022-08-10 16:27:32 +02:00
Weslley da Silva Pereira 2ba5e8e042 Fix bug in DORCSD2BY1 (found by doing a diff between single and double precision files) 2022-08-10 07:07:34 -06:00
Weslley da Silva Pereira 2beef68075 Fix documentation for double, complex and double complex 2022-08-10 07:07:34 -06:00
Weslley da Silva Pereira 02836f353d Revert "SORCSD2BY1: remove dead code"
This reverts commit d245b4f6ef.
2022-08-10 07:07:34 -06:00
Weslley da Silva Pereira 6a44057f06 Revert "SORCSD: fix documentation on matrix dimensions"
This reverts commit bdcd890a18.
2022-08-10 07:07:34 -06:00
Weslley S. Pereira d073b03ec4 Merge pull request #702 from mjacobse/master
Fix type precision in dorbdb6 and zunbdb6
2022-08-10 06:51:31 -06:00
Marcel Jacobse c5287143de Fix type precision in dorbdb6 and zunbdb6 2022-08-10 00:19:35 +02:00
Weslley S. Pereira 984dcc059c Merge pull request #699 from ivan-pi/lsame
Add const to LAPACK_lsame_base
2022-08-09 09:05:06 -06:00
Simon Maertens 57259965ea Added guard around LAPACK_IFMT define. 2022-08-09 07:30:02 +01:00
Simon Maertens 82014d9396 Added LAPACK_IFMT in lapack.h for 32-bit integer builds. Replaced int with int32_t as default type. 2022-08-09 07:28:01 +01:00
Simon Maertens 6030bc410a Fixed LAPACKE integer formats for 64bit build. 2022-08-08 16:41:30 +02:00
Simon Maertens 86d37075ed Fixed CBLAS integer formats for 64bit build. 2022-08-08 16:41:04 +02:00
Ivan Pribec 9079671c6a Add const to LAPACK_lsame_base 2022-08-08 14:52:46 +02:00
thijs e7033666f8 Use normwise criterion in multishift QZ 2022-08-08 10:48:34 +02:00
thijs c6994068c3 Use normwise criterion for inf eigenvalues in QZ 2022-08-08 10:28:18 +02:00
Simon Maertens 4c189dd8fc Fixed default value for TIME_FUNC. 2022-08-05 11:02:36 +02:00
Simon Maertens fc4d4ff59b Propagate Fortran flags as well as linker flags to the time check subproject. Enable verbose output (will only show in the log files). Bit of formatting. 2022-08-05 10:49:21 +02:00
langou 3381a0ec82 Merge pull request #685 from angsch/fixes
Fixes
2022-08-03 17:53:31 -06:00
Angelika Schwarz c8a5cf510e Fix out-of-bounds write in [ds]get40
The test driver allocates a scalar for INFO,
but the test writes to 3 entries. Revise
INFO allocation & propagation:

* Allocate sufficient space for the two INFOs
* Instead of discarding INFO computed in [ds]get40, return
  INFO to test driver
* Fix documentation of input/output arguments

[ds]get31: Fix typo in docs
2022-08-03 09:02:51 +01:00
Angelika Schwarz ecca781af8 Closes #217 2022-08-03 09:02:44 +01:00
Weslley S. Pereira 79bfdd46de Merge pull request #690 from weslleyspereira/master
Fix the left-looking variant of geqrf following #638
2022-07-18 11:20:41 -06:00
Weslley da Silva Pereira e9c4a7af8e Fix the left-looking variant of geqrf following #638 thanks to @angsch. 2022-07-18 10:27:56 -06:00
Weslley S. Pereira 675d71659f Merge pull request #693 from friedc/master
Revert "Do not check the FortranCInterface if LAPACKE is not built."
2022-07-17 20:10:23 -06:00
Christian Friedl 1de2b70cc8 Revert "Do not check the FortranCInterface if LAPACKE is not built."
This reverts commit 8d3ae005a3.
2022-07-16 12:21:07 +02:00
langou 8b3bbfa662 Merge pull request #647 from christoph-conrads/634-xORBDB6-performs-numerically-unadvisable-operations
Fix xORBDB6 performs numerically unadvisable operations
2022-07-15 11:22:37 -06:00
Weslley S. Pereira 3995eacd24 Merge pull request #691 from neil-lindquist/fix-evd-workspace-query
Fix workspace query for *syevd and *heevd routines
2022-07-14 14:19:42 -06:00
Christoph Conrads 145b1c329a xORBDB6/xUNBDB6: fix read of uninitialized variable
There is no warning with GCC 11 about an undeclared and uninitialized
varible being read without the `-Wextra` flag. Why?
2022-07-14 19:28:29 +00:00
Neil Lindquist 423813d720 Fix workspace query for *syevd and *heevd routines 2022-07-14 11:03:38 -04:00
Christoph Conrads 54b3964b0f ZUNBDB6: improve numerical stability, documentation
* Require unit-norm vector X for otherwise the following computations
  might underflow
* Avoid over- and underflows in the computation of the Euclidean norm of
  X
* Fix the Euclidean norm computation after the second Gram-Schmidt
  iteration
* Consider round-off errors when checking for zero vectors
* Update identifiers

Note that the caller ZUNBDB5 always passed unit-norm vectors X.

Thank you @angsch for discovering typos in the function names (`CLASSQ`
was called instead of `ZLASSQ`).
2022-07-10 19:35:19 +00:00
Christoph Conrads 6479e0f531 CUNBDB6: improve numerical stability, documentation
* Require unit-norm vector X for otherwise the following computations
  might underflow
* Avoid over- and underflows in the computation of the Euclidean norm of
  X
* Fix the Euclidean norm computation after the second Gram-Schmidt
  iteration
* Consider round-off errors when checking for zero vectors
* Update identifiers

Note that the caller CUNBDB5 always passed unit-norm vectors X.
2022-07-10 19:34:20 +00:00
Christoph Conrads 94419e8bfa DORBDB6: improve numerical stability, documentation
* Require unit-norm vector X for otherwise the following computations
  might underflow
* Avoid over- and underflows in the computation of the Euclidean norm of
  X
* Fix the Euclidean norm computation after the second Gram-Schmidt
  iteration
* Consider round-off errors when checking for zero vectors
* Update identifiers

Note that the caller DORBDB5 always passed unit-norm vectors X.
2022-07-10 19:34:20 +00:00
Christoph Conrads a015b21445 SORBDB6: replace integer literal with constant
This change makes it easier to port the recent changes to SORBDB6 to
(complex) double precision.
2022-07-10 19:34:20 +00:00
Christoph Conrads deed8f372d SORBDB6: improve numerical stability
* Require unit-norm vector X for otherwise the following computations
  might underflow
* Avoid over- and underflows in the computation of the Euclidean norm of
  X
* Fix the Euclidean norm computation after the second Gram-Schmidt
  iteration
* Consider round-off errors when checking for zero vectors
* Update identifiers
2022-07-10 19:34:20 +00:00
Christoph Conrads 774e5a9f7b SORBDB6: document algorithm, when output is zero 2022-07-10 19:34:20 +00:00
Christoph Conrads 643e7e3581 SORBDB6: fix indexing, set vectors to zero
This patch was authored by Brian D. Sutton and posted to the discussion
of LAPACK pull request #406.

* fix indexing for vector increments different from one
* always set vectors that are numerically zero to zero

Previously SORBDB6 would only set vectors to zero if a second iteration
of Gram-Schmidt was necessary. This would cause problems on the caller
site if the test for a zero vector differed from the SORBDB6 test for
zero.
2022-07-10 19:34:20 +00:00
Christoph Conrads bdcd890a18 SORCSD: fix documentation on matrix dimensions 2022-07-10 19:34:20 +00:00
Christoph Conrads d245b4f6ef SORCSD2BY1: remove dead code
The zeros are overwritten by the following SORGQR call.
2022-07-10 19:34:20 +00:00
langou 4f97df9669 Merge pull request #677 from friedc/master
Solve build issues with ibm xlf
2022-07-05 08:38:36 -06:00
friedc f039b8c40a Merge branch 'master' into master 2022-07-05 16:23:35 +02:00
langou 08de16639d Merge pull request #687 from ACSimon33/fix_nagfor_warnings 2022-07-01 14:10:51 +02:00
Simon Maertens 7f2f7a339e Fixed nagfor warning: 'Low-precision data-value assigned to high-precision data-object' 2022-07-01 11:44:33 +01:00
langou fbeea59ddd Merge pull request #684 from angsch/gelss-work
GELSS: Cast work sizes to INT
2022-06-30 22:07:31 +02:00
langou 2789c76170 Merge pull request #686 from ACSimon33/cmake_nagfor_support
Adding NAG Fortran compiler (nagfor) support in the CMake build system.
2022-06-30 22:01:40 +02:00
Simon Maertens 7eacb5f6de Fixed line length > 72 in test files. 2022-06-29 09:43:18 +01:00
Simon Maertens 4dba796894 Added nagfor specific flags. 2022-06-29 09:41:57 +01:00
Angelika Schwarz 5355068120 GELSS: Cast work sizes to INT 2022-06-25 16:01:36 +01:00
langou 7d90a679e4 Merge pull request #681 from angsch/laqr5
Improve FMA usage in laqr5
2022-06-25 14:08:33 +02:00
Angelika Schwarz bd8f99b154 Improve FMA usage in laqr5
Rearrange the application of the Householder reflector
to save one instruction per dot product if FMA is
available.

The update from the right, H * (I - tau * v * v**T),
for example, changes from
    H - (tau * (H * v)) * v**T
to
    H - (H * (v * tau)) * v**T.
The instruction savings are due to the special structure
of v, whose first component is implicitly one (and used
for storing tau).
2022-06-20 17:08:12 +01:00
Christian Friedl 9551a31c68 Add proper ILP Flags for xlf. 2022-05-30 10:34:57 +02:00
friedc e5dc8d07c8 Replace empty strings with a single blank. 2022-05-30 09:37:24 +02:00
Christian Friedl 7939cb1b4d Replace empty strings with a single blank. This fixes errors when compiling with ibm xlf. 2022-05-29 22:15:29 +02:00
Christian Friedl 8d3ae005a3 Do not check the FortranCInterface if LAPACKE is not built. 2022-05-29 22:05:40 +02:00
langou f40d2208b9 Merge pull request #675 from angsch/tests
Improve testing
2022-05-25 17:57:21 -06:00
Angelika Schwarz d2a547a392 Fix precision mismatches in tests
* For REAL tests, replace 1.D0 with 1.0
* For CMPLX tests, replace CMPLX(1.D0, 1.D0) with CMPLX(1.0, 1.0)
* [sz]het01_aa.f: replace dimension cast DBLE(N) with REAL(N)
* [cz]syt01_aa.f: replace dimension cast DBLE(N) with REAL(N)
  and init CONE and CZERO as complex numbers
2022-05-25 19:36:47 +01:00
Angelika Schwarz b9b3c787fb Add missing error exit checks for nep
* add tests of TREVC3
* add workspace test for [DS]HSEQR that was already implemented for [CZ]HSEQR
2022-05-25 19:36:47 +01:00
Angelika Schwarz 50b17a234d Test error exists of [CZ]GEBD2
[SD]GEBD2 are already tested. Closes #47
2022-05-25 19:36:41 +01:00
langou 0eb77066be Merge pull request #674 from angsch/scal
Update scaling routines to return immediately when scaling with one
2022-05-21 10:25:48 -06:00
Angelika Schwarz d0ad95ced2 Scaling routines do a quick return if scaling with one
* SCAL: Quick return if scaling factor is one
 * LASCL: If cto == cfrom and neither input is NaN or Inf, skip scaling
2022-05-21 16:18:47 +01:00
Weslley S. Pereira a19611303b Merge pull request #671 from dbakshee/master
Do not gitignore TESTING/CMakeLists.txt
2022-05-19 08:53:12 -06:00
Dmitry Baksheev 7a5ecf552a Do not gitignore TESTING/CMakeLists.txt 2022-05-19 12:32:43 +07:00
langou 655e588cfa Merge pull request #665 from angsch/fixes
Two small fixes
2022-05-02 10:03:22 -06:00
Angelika Schwarz 9523efe40b Fix docs stprfb
Use transpose rather than conjugate transpose to
be consistent with other real routines
2022-05-02 15:54:19 +01:00
Angelika Schwarz ea86668bfc Fix leading dimension check of eigen-/Schur vectors in LAPACKE
Closes #327
2022-05-01 11:51:12 +01:00
Weslley S. Pereira 3b177e95d4 Merge pull request #663 from mtowara/master
Fix CBLAS/src/CMakeLists.txt
2022-04-27 12:45:46 -06:00
Markus Towara da11f0945b Fix CBLAS/src/CMakeLists.txt
remove spurious ../ from target_include_directories path
2022-04-27 18:05:39 +02:00
langou def1271eda Merge pull request #623 from weslleyspereira/try-test-fotrancompiler_abs_div_operations
Test the Fortran intrinsic ABS and complex divisions and report fails during build
2022-04-25 21:25:00 -06:00
langou 82565038dd Merge pull request #601 from PhillHS/master
Fix for overwritten LD_LIBRARY_PATH and LIBRARY_PATH
2022-04-25 21:24:23 -06:00
Weslley S. Pereira 25274dfebb Merge pull request #622 from matcross/master
Regression test for illegal modification of Y in xGEMV.
2022-04-15 14:48:03 -06:00
Weslley S. Pereira 32b062a333 Merge pull request #659 from weslleyspereira/prepare-lapack-3.10.1
Prepare software to release 3.10.1
2022-04-12 14:19:52 -06:00
Weslley da Silva Pereira e7ad0370d4 Preparing software to release 3.10.1 2022-04-12 14:11:40 -06:00
Weslley S. Pereira 5559978672 Merge pull request #617 from ajaypanyala/master
use integer64 flag for Cray Fortran compiler
2022-04-12 09:11:08 -06:00
Weslley S. Pereira 2821eadc72 Merge pull request #640 from mathstuf/cmake-osx-deployment-target
cmake: forward the macOS deployment target to the TIME function test
2022-04-12 09:09:39 -06:00
Weslley S. Pereira fc556054ff Merge pull request #653 from weslleyspereira/master
Adds __attribute__((const)) to LAPACKE_lsame
2022-04-12 09:00:34 -06:00
langou 9ec7de983e Merge pull request #657 from angsch/ls
Fix workspace size returned by getsls
2022-04-12 09:52:42 -05:00
Weslley S. Pereira 10634c138e Merge pull request #658 from angsch/fix
Fix tests
2022-04-11 17:43:00 -06:00
Angelika Schwarz c137eb15fa Fix leading dimension check
* TPMLQT, GEMLQT: Revert check of ldv and correct docs
* Add input parameter checks for LASWLQ
* LAMSWLQ: Fix mixed up column count of rhs (n) and original matrix (m)
2022-04-03 13:16:40 +01:00
Angelika Schwarz 11d3fa9436 Fix mixed up column count of rhs (n) and original matrix (k)
* add input parameter tests
* revert check of n when it denotes the column of the matrix to be updated
  and correct the docs
* relax constraint on mb and update docs - special cases outside of the docs
  are handled by a call to GEQRT
2022-04-03 13:12:06 +01:00
Angelika Schwarz a3262e52b0 Fix returned workspace size
* [dz]getsls: cast workspace size with dble, not real
* Move workspace write to precede xerbla. Follow the documentation
  and return the optimal workspace in work(1) even on quick return
* Remove unused variables
2022-03-30 21:36:45 +01:00
langou 2f132eee6e Merge pull request #656 from angsch/laswlq
Improve input argument check swlq
2022-03-17 15:07:16 -06:00
Angelika Schwarz d1349aacd9 Improve input argument check swlq 2022-03-17 18:57:34 +00:00
Weslley da Silva Pereira 5a392d9cc5 Improve slaed4 following the same strategy fromdlaed4 2022-03-15 16:09:26 -06:00
Weslley da Silva Pereira db0abe5e59 Improve dlaed4 thanks to Li, Ren-Cang 2022-03-15 16:05:13 -06:00
Weslley S. Pereira e499638a16 Merge branch 'Reference-LAPACK:master' into master 2022-03-15 15:16:52 -06:00
langou a7c0392a19 Merge pull request #654 from angsch/tsqr
Improve input arg check lamtsqr
2022-03-09 16:57:27 -07:00
Angelika Schwarz 201353b433 Improve input arg check lamtsqr 2022-03-09 19:32:41 +00:00
Weslley da Silva Pereira eac5d3e43d Adds __attribute__((const)) to LAPACKE_lsame. This change allows for optimizations on GCC. This solution was proposed by @martin-frbg 2022-03-02 11:43:39 -07:00
langou 2a39774316 Merge pull request #637 from christoph-conrads/632-lapack_h-only-installed-in-LAPACKE-builds
CMake selective build improvements
2022-02-15 08:38:20 -07:00
Weslley S. Pereira 32019884f2 Merge pull request #649 from weslleyspereira/fix-bug-nrm2
Fixes a bug in the Blue's scaling constants of nrm2
2022-02-15 08:03:04 -07:00
Weslley da Silva Pereira 0400fb5ddb Fixes a bug in the Blue's scaling constants of nrm2 thanks to Arm Performance Libraries!
This is the same bug fixed on #559 for la_constants.f90.
2022-02-14 19:23:50 -07:00
langou c14db3be6f Merge pull request #646 from angsch/master
Fix input argument check
2022-01-30 18:55:54 -07:00
Christoph Conrads ca0b206d88 CMake: always install lapack.h header
fixes #632
2022-01-30 19:25:43 +00:00
Christoph Conrads 09af64a8ef CMake: fix selective arithmetic linking
Fix linking when only a subset of the available arithmetic (e.g., only
complex double-precision arithmetic) is built.
2022-01-30 19:25:43 +00:00
Christoph Conrads bd1fba15d0 CMake: have LAPACKE check available LAPACK arithmetic
If the user requests LAPACKE to be built for a certain arithmetic (e.g.,
real double-precision), check if the LAPACK library contains code for
the requested arithmetic.
2022-01-30 19:25:43 +00:00
angsch e9c2063932 Fix input argument check
Use the same argument check as the drop-in replacement xGEQRT3
to ensure M >= N.
2022-01-30 10:01:10 +00:00
Weslley S. Pereira 1dd9548c4d Adding tests with intrinsic MIN, MAX and complex multiplication 2022-01-03 16:09:55 -07:00
Martin Kroeker 1acee2241a Update .appveyor.yml 2021-12-28 19:43:01 +01:00
Martin Kroeker 83f13fb2c7 Update .appveyor.yml 2021-12-28 19:28:30 +01:00
Martin Kroeker 9c6729e351 Update .appveyor.yml 2021-12-15 21:35:57 +01:00
Martin Kroeker 5a585d7f6a Update .appveyor.yml 2021-12-15 20:27:21 +01:00
Martin Kroeker 64487cc5de Update .appveyor.yml 2021-12-15 17:34:50 +01:00
Martin Kroeker f78c6acd35 Update .appveyor.yml 2021-12-15 16:24:24 +01:00
Martin Kroeker ed834d4613 Update .appveyor.yml 2021-12-15 13:43:59 +01:00
Ajay Panyala f3e8010382 Merge branch 'master' of github.com:Reference-LAPACK/lapack 2021-12-14 18:42:03 -08:00
Martin Kroeker 75082fa032 Update .appveyor.yml 2021-12-14 22:18:45 +01:00
Martin Kroeker 56b6ebf71a Update .appveyor.yml 2021-12-14 21:54:46 +01:00
Martin Kroeker eb5c151e10 Update .appveyor.yml 2021-12-14 21:27:11 +01:00
Weslley S. Pereira 1782d90671 Merge pull request #613 from weslleyspereira/minor-fixes-3
Adds more fixes to the documentation of CROTG and ZROTG
2021-12-14 11:47:58 -07:00
Martin Kroeker bb66bc2280 Update .appveyor.yml 2021-12-14 19:34:37 +01:00
Martin Kroeker bcdff44254 try to work around failed install of charset-normalizer 2021-12-14 19:32:49 +01:00
Weslley S. Pereira c362fff1ee Minor changes 2021-12-13 13:23:06 -07:00
Weslley S. Pereira cdc8f33194 Fix documentation thanks to @vladimir-ch 2021-12-13 09:06:20 -07:00
Ben Boeckel dd0b532f60 cmake: forward the macOS deployment target to the TIME function test
When using newer Xcode releases, older `gfortran` may be given a
deployment target that is not understood if the host is on a new enough
version. Forward the deployment target from the main project to the
testing project to check with similar settings as the main project.
2021-12-10 21:45:12 -05:00
Weslley S. Pereira 95b6e84b03 Updates Givens rotations with preciser algorithms 2021-12-10 15:43:43 -07:00
Weslley S. Pereira 2904d8763e Algorithm precise and with no bias in the error 2021-11-22 18:11:04 -07:00
langou a066b6a08f Merge pull request #638 from weslleyspereira/fix-dgeqrf-when-info-minus1
Fix xGEQRF and xGERQF following thanks to @andreasvarga and @VasileSima4
2021-11-12 13:52:29 -07:00
Weslley S. Pereira 619d927173 Fix xGEQRF and xGERQF following thanks to @andreasvarga and @VasileSima4 2021-11-12 10:56:09 -07:00
Weslley S. Pereira a49a659938 Merge branch 'fix-precision-in-clartgf90-2' of github.com:weslleyspereira/lapack into fix-precision-in-clartgf90-2 2021-11-03 10:37:01 -06:00
weslley.spereira 37a1a1e689 Fix all other Givens rotation routines 2021-11-02 18:49:08 -06:00
Weslley S. Pereira 43208822cb Starting to modify zlartg 2021-10-28 10:27:14 -06:00
Weslley S. Pereira ac11f62708 Several changes to reduce the computation error 2021-10-26 17:50:27 -06:00
Weslley S. Pereira b89b15b2f4 Removes one line from clartg 2021-10-18 09:49:56 -06:00
Weslley S. Pereira 2495f1ced2 Solves a precision bug in clartg 2021-10-15 14:11:16 -06:00
Martin Kroeker 217d935085 Update conda before enabling conda-forge 2021-10-10 17:36:57 +02:00
langou 5d4180cf82 Merge pull request #626 from Reference-LAPACK/typo_in__rotg_from_jim
fix a typo, thanks to Jim Demmel for letting me know
2021-10-09 16:41:38 -06:00
Julien Langou 70b8ee22ad fix a typo, thanks to Jim Demmel for letting me know 2021-10-09 14:12:23 -06:00
Weslley S. Pereira 38f3eeee31 Merge pull request #625 from JuliaComputing/kf/slarrvbounds
Thank you!
2021-10-01 08:27:02 -06:00
Keno Fischer 0631b6beae Fix out of bounds read in slarrv
This was originally reported as https://github.com/JuliaLang/julia/issues/42415.
I've tracked this down to an our of bounds read on the following line:

https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L423

In the crashing example, `M` is `0`, causing `slarrv` to read uninitialized
memory from the work array. I believe the `0` for `M` is correct and indeed,
the documentation above supports that `M` may be zero:

https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L113-L116

I believe it may be sufficient to early-out this function as suggested
in this PR. However, I have limited context for the full routine here,
so I would appreciate a sanity check.
2021-09-30 19:15:16 -04:00
langou 44ecb6a5ff Merge pull request #624 from ericlars/ifort_ILP
ILP windows fix
2021-09-27 17:50:49 -06:00
Larson, Eric d04553067e ILP support
long's in windows are 4 bytes (MSVS, intel compilers). Use int64_t and int32_t
to ensure 8 byte integers for ILP interface.

support 8 byte integer flag for intel ifort compiler
2021-09-27 10:22:49 -07:00
Weslley S. Pereira f461d4f03b Fixes bugs. Updates documentation. Tests for ABS and complex division run on the Makefile build 2021-09-22 14:55:27 -06:00
Weslley S. Pereira 19fafd4fd2 Test the Fortran intrinsic ABS and complex divisions and report during compile time. Currently only working with the CMake build! 2021-09-22 14:20:50 -06:00
langou fe5af1176f Merge pull request #621 from quellyn/xl-fixes
Address issues with IBM XL builds
2021-09-21 10:51:24 -06:00
Quellyn Snead 26a81d142c Add an informative fall-through clause in case of unfamiliar
compiler (#26117).
2021-09-21 09:40:01 -06:00
Quellyn Snead 296e06af29 Merge remote-tracking branch 'upstream/master' into xl-fixes 2021-09-21 09:35:58 -06:00
Mat Cross 6c876d4a5c Regression test for illegal modification of Y in CGEMV, SGEMV and ZGEMV observed with Apple vecLib on SGEMV and DGEMV. 2021-09-19 13:58:52 +01:00
Mat Cross 6d10d14731 Regression test for illegal modification of Y in DGEMV observed with Apple vecLib. 2021-09-19 12:24:23 +01:00
Weslley S. Pereira 85ef8de8ba Merge pull request #620 from jip/fix
Thanks, @jip !!
2021-09-16 10:31:47 -06:00
Quellyn Snead d2781152e1 Address issues with IBM XL builds (#606).
Be more explicit about selecting recursive fortran flags, as not
every compiler will correctly reject an incorrect option (e.g., XL).
2021-09-15 11:14:42 -06:00
Ajay Panyala 9c2380cd3d integer type flag for nvfortran 2021-09-08 17:30:18 -07:00
Igor Zhuravlov 7165ff7108 fix typo in TESTING/EIG/?chkst2stg.f comment 2021-09-06 15:50:13 +10:00
Igor Zhuravlov 78db64ab53 fix typo in TESTING/EIG/?chkst2stg.f comment 2021-09-06 15:47:45 +10:00
Igor Zhuravlov fb14d49b3a fix typo in SRC/?la_??rfsx_extended.f comment 2021-09-06 15:42:57 +10:00
Igor Zhuravlov f06a027f14 unify comments: expression for residual
This resolves discussion in PR #582.
2021-09-06 15:39:29 +10:00
langou 79aa0f2e06 Merge pull request #618 from svillemot/docsdir
make.inc.gfortran: define a default value for DOCSDIR
2021-09-01 11:05:53 -06:00
Weslley S. Pereira 530353028a Merge pull request #619 from svillemot/xerbla-strlen
Thank you, @svillemot !
2021-09-01 11:02:00 -06:00
Sébastien Villemot e6411157cb Fix CBLAS xerbla following hidden strlen argument changes
Commits 2d9fbdeecc and
628a2095c2 changed the function prototypes in the
cblas_f77.h.

However, the F77_xerbla case was not treated in the same way as the others. In
particular, the consequence is now that the xerbla function provided by the
CBLAS/src/xerbla.c file is never called at runtime (because it is identified as
“F77_xerbla” in the symbol table, instead of simply “xerbla”, since F77_xerbla
is *not* a macro).

This patch restores the symmetry between xerbla and the other functions.
2021-09-01 14:43:21 +02:00
Sébastien Villemot c657043a2b make.inc.gfortran: define a default value for DOCSDIR 2021-09-01 14:15:24 +02:00
Ajay Panyala a5e7d99568 Check PE_ENV 2021-08-31 18:59:26 -07:00
Ajay Panyala 7c74fc085c use -sinteger64 flag for 64-bit integers 2021-08-31 17:49:34 -07:00
Ajay Panyala fe7b4281e2 use default64 flag for Cray ftn compiler 2021-08-31 17:16:46 -07:00
langou c8cb980bb5 Merge pull request #616 from bjack205/master
Link C libraries against build include folder
2021-08-31 14:32:10 -06:00
Brian Jackson b488310e18 Link C libraries against build include folder 2021-08-31 13:30:21 -04:00
Weslley S. Pereira 56d2616e87 Merge pull request #615 from weslleyspereira/master
Runs CTest with a single job when OpenMP
2021-08-31 08:14:47 -06:00
langou d7f91bce43 Merge pull request #602 from nakatamaho/master
se2.in causes an infinite loop when dsyevr_2stage or dsyevr failed.
2021-08-31 07:20:19 -06:00
weslley.spereira afb5242b42 Runs CTest with a single job when OpenMP 2021-08-30 17:16:32 -06:00
weslley.spereira 485cba2cd1 Adds more fixes to the documentation of CROTG and ZROTG 2021-08-30 14:20:04 -06:00
langou 960b60ef18 Merge pull request #570 from weslleyspereira/fix-bug-in-xCOMBSSQ
Revert "Merge pull request #290"
2021-08-30 13:55:15 -06:00
langou 9e647a93a2 Merge pull request #582 from jip/fix
Fix some typos in comments
2021-08-30 13:51:16 -06:00
langou d834dfc3dd Merge pull request #593 from nakatamaho/master
Fix the number of matrices to test in TESTING/{s,c,d,z}ed.in (6->7)
2021-08-30 13:50:16 -06:00
Weslley S. Pereira 488473f731 Merge pull request #603 from weslleyspereira/minor-fixes
Fix patterns in the GitHub workflows
2021-08-30 13:32:54 -06:00
langou 7a4c63b0c3 Merge pull request #605 from weslleyspereira/try-workspace-query
Add (s,d)ROUNDUP_LWORK functions to fix the workspace computation
2021-08-30 13:28:44 -06:00
langou 53e8c3dd9f Merge pull request #609 from weslleyspereira/try-test-openmp
Test OpenMP
2021-08-30 13:24:48 -06:00
langou 044ae086d1 Merge pull request #610 from weslleyspereira/minor-fixes-0
Fix (s,d)LASET calls in CCHKST2STG and ZCHKST2STG
2021-08-30 13:23:30 -06:00
langou e8866132be Merge pull request #588 from weslleyspereira/try-two-integers-in-cblas
Using CBLAS_INDEX and CBLAS_INT integer types in CBLAS
2021-08-30 13:21:43 -06:00
langou b76275bacd Merge pull request #612 from weslleyspereira/minor-fixes-3
Fixes the documentation of [cz]ROTG
2021-08-28 13:32:24 -06:00
weslley.spereira 3d260adbc3 Fixes the documentation of [cz]ROTG 2021-08-27 17:51:58 -06:00
weslley.spereira 7b3b091020 Uses tests with and without OpenMP in the CMake tester. Remove some additional flags from the Coverage test 2021-08-24 12:14:08 -06:00
weslley.spereira 15fba4bb3b Fix (c,z)LASET calls in CCHKST2STG and ZCHKST2STG 2021-08-24 11:35:31 -06:00
weslley.spereira 21a69e07dc Adds -fopenmp to the Makefile tester 2021-08-24 11:30:02 -06:00
weslley.spereira 189684a7df Test OpenMP 2021-08-23 10:29:16 -06:00
langou 73247581c2 Merge pull request #607 from angsch/lapy
Make lapy and nrm2 consistent
2021-08-18 21:27:48 -06:00
Angelika Schwarz 906adae2c2 Make lapy and nrm2 consistent
Avoid the introduction of NaN by divisons inf / inf
2021-08-08 19:44:55 +01:00
weslley.spereira c7400e5f9b Improve documentation of the new routines. Force roundup only if it is necessary 2021-08-04 18:43:22 -03:00
weslley.spereira cea95686f5 Fix bug: ROUNDUP_LWORK must use (1+EPSILON(0)) instead of (1+DLAMCH(EPS))
Test results:

 SROUNDUP_LWORK(0)        =    0.00000000
 SROUNDUP_LWORK(1)        =    1.00000000
 SROUNDUP_LWORK(317)      =    317.000000
 DROUNDUP_LWORK(0)        =    0.0000000000000000
 DROUNDUP_LWORK(1)        =    1.0000000000000000
 DROUNDUP_LWORK(317)      =    317.00000000000000

 Tests with X = 16777216 = 2**24
X-2 = 16777214; SROUNDUP_LWORK(X-2) = 16777214.0
X-1 = 16777215; SROUNDUP_LWORK(X-1) = 16777215.0
X   = 16777216; SROUNDUP_LWORK(X  ) = 16777218.0
X+1 = 16777217; SROUNDUP_LWORK(X+1) = 16777218.0
X+2 = 16777218; SROUNDUP_LWORK(X+2) = 16777220.0

 Tests with X = 9007199254740992 = 2**53
X-2 = 9007199254740990; SROUNDUP_LWORK(X-2) = 9007200328482816.0
X-1 = 9007199254740991; SROUNDUP_LWORK(X-1) = 9007200328482816.0
X   = 9007199254740992; SROUNDUP_LWORK(X  ) = 9007200328482816.0
X+1 = 9007199254740993; SROUNDUP_LWORK(X+1) = 9007200328482816.0
X+2 = 9007199254740994; SROUNDUP_LWORK(X+2) = 9007200328482816.0

 Tests with X = 9007199254740992 = 2**53
X-2 = 9007199254740990; DROUNDUP_LWORK(X-2) = 9007199254740990.0
X-1 = 9007199254740991; DROUNDUP_LWORK(X-1) = 9007199254740991.0
X   = 9007199254740992; DROUNDUP_LWORK(X  ) = 9007199254740994.0
X+1 = 9007199254740993; DROUNDUP_LWORK(X+1) = 9007199254740994.0
X+2 = 9007199254740994; DROUNDUP_LWORK(X+2) = 9007199254740996.0
2021-07-27 20:05:07 -03:00
weslley.spereira f12515a491 RoundUp functions now always returns an integer 2021-07-27 16:56:21 -03:00
weslley.spereira a620672e29 Add (s,d)ROUNDUP_LWORK functions to fix the workspace computation 2021-07-26 19:30:53 -03:00
weslley.spereira aaeeef2c30 Fix comments thanks to @vladimir-ch 2021-07-23 16:21:57 -03:00
Weslley S. Pereira 3b26987fc1 Merge pull request #597 from isuruf/n_threads
Make the type of N_THREADS to be INTEGER*4 explicitly
2021-07-21 19:01:36 -03:00
weslley.spereira d4d523848d Fix patterns in the GitHub workflows 2021-07-21 18:58:22 -03:00
NAKATA Maho fd3552ba58 se2.in causes infinite loop when dsyevr_2stage or dsyevr failed. 2021-07-21 22:29:24 +09:00
NAKATA Maho 9463d5bf3c se2.in causes infinite loop when dsyevr or dsyevr_2stage failed. 2021-07-21 22:23:25 +09:00
Phill Harvey-Smith 6771c15041 Fix for overwritten LD_LIBRARY_PATH and LIBRARY_PATH 2021-07-21 11:22:12 +01:00
Isuru Fernando 742aacda5e No auto-update conda 2021-07-15 15:38:27 -05:00
Isuru Fernando 95fc2b3319 Fix the usage of OMP_SET_NUM_THREADS(1) as well 2021-07-15 15:38:00 -05:00
Isuru Fernando 56aea449c6 Make the type of N_THREADS to be INTEGER*4 explicitly
When building with -fdefault-integer=8, the type changes, but
only some compiler like gfortran implements `omp_set_num_threads`
with integer*8 input. When swapping the openmp library with
LLVM openmp, this doesn't work yet. Until LLVM openmp is fixed
explicitly setting the type fixes the build issue.
2021-07-14 11:57:59 -05:00
Maho Nakata f0f6c880b4 Fix the number of matrices to test. 2021-06-29 16:54:11 +09:00
julielangou aa631b4b4b Merge pull request #592 from julielangou/master
Updating LAPACK version number before 3.10.0 release
2021-06-28 09:39:12 -07:00
julielangou 3aa00e63fc Updating LAPACK version number before 3.10.0 release
Updating LAPACK version number before 3.10.0 release
2021-06-28 09:13:34 -07:00
weslley.spereira a8a03af993 Remove unused notbig = .false. thanks to @vladimir-ch 2021-06-24 18:57:14 -03:00
Weslley S. Pereira ade9a3bfaa Merge pull request #590 from weslleyspereira/minor-fixes-2
Fix typo in makefile.yml
2021-06-24 08:58:33 -03:00
weslley.spereira 32b48c08ca Fix typo in makefile.yml 2021-06-23 20:06:11 -03:00
langou 4a92503918 Merge pull request #589 from weslleyspereira/minor-fixes-2
Fix typo in PULL_REQUEST_TEMPLATE.md
2021-06-23 16:04:27 -06:00
weslley.spereira edeee2e35d Fix typo in PULL_REQUEST_TEMPLATE.md 2021-06-23 19:02:20 -03:00
weslley.spereira 29c946d743 First attempt in getting (back) CBLAS_INDEX and CBLAS_INT integer types 2021-06-23 18:50:47 -03:00
weslley.spereira e7d572c523 Improve xSLASSQ by removing one operation like sqrt( sumsq )**2
!> If scale * sqrt( sumsq ) > tbig then
!>    we now require:   scale >= sqrt( TINY*EPS ) / sbig   on entry,
!> and if scale * sqrt( sumsq ) < tsml then
!>    we now require:   scale <= sqrt( HUGE ) / ssml       on entry,
!> where
!>    tbig -- upper threshold for values whose square is representable;
!>    sbig -- scaling constant for big numbers; \see la_constants.f90
!>    tsml -- lower threshold for values whose square is representable;
!>    ssml -- scaling constant for small numbers; \see la_constants.f90
!> and
!>    TINY*EPS -- tiniest representable number;
!>    HUGE     -- biggest representable number.
2021-06-18 19:57:29 -03:00
langou c19aa54cce Merge pull request #586 from weslleyspereira/try-github-actions
Enable github actions mimicking Travis CI configuration
2021-06-16 21:21:16 -06:00
weslley.spereira 2e4b3b453d Re-enable Travis CI 2021-06-16 21:18:07 -03:00
Weslley S. Pereira 991371aa68 Enable github actions mimicking Travis CI configuration 2021-06-16 19:08:29 -03:00
Weslley S. Pereira b937d8cb44 Merge pull request #584 from weslleyspereira/fix-lapacke_mangling
Remove lapacke_mangling.h. This file must be generated automatically
2021-06-16 15:05:54 -03:00
langou b5be026784 Merge pull request #580 from weslleyspereira/minor-fixes-2
Adds missing EXTERNAL declarations in xCKCSD and (c,z)BDT05 thanks to @hokb
2021-06-16 08:04:05 -06:00
weslley.spereira a0c5e29cf7 Remove lapacke_mangling.h. This file must be generated automatically during build 2021-06-15 20:09:43 -03:00
Igor Zhuravlov 2eeed4b25d unify comments: expression for residual 2021-06-14 14:15:25 +10:00
Igor Zhuravlov 8262b4a14f fix comments: expression for residual 2021-06-14 14:15:25 +10:00
Igor Zhuravlov f42f5121ce revert "comments fixed: expression for residual in xTBT02"
This reverts commit 0277cd9362.
2021-06-14 14:15:25 +10:00
Igor Zhuravlov a0634a9f8c unify comments: TRANS parameter
This commit completes changes made in:
* Reference-LAPACK/lapack@2f9f42bf2c 2021-06-03
2021-06-14 14:15:08 +10:00
Igor Zhuravlov 95b6abfefe unify comments: homogenize notation for transpose (**T) and conjugate transpose (**H)
This commit completes changes made in:
* Reference-LAPACK/lapack@457afcf7df 2021-06-03
2021-06-14 14:13:14 +10:00
langou 34c8291095 Merge pull request #581 from jip/fix
fixed comments: specify which norm is used (no.1 from PR #562)
2021-06-09 07:28:59 -06:00
Igor Zhuravlov 1825be67cf fixed comments: specify which norm is used (no.1 from PR #562)
Despite the recommendation, no change has been made in xGBT02, xGET02, xGTT02, xTBT02, xTPT02,
and xTRT02 for C,Z datatypes yet: as it was noted afterwards in PR #571, those routines are
using mixed types of norm: 1-norm for op(A) and taxicab-based norm |Re(z)|+|Im(z)| for residual.
2021-06-09 22:01:03 +10:00
weslley.spereira 31857f14f5 Fix missing EXTERNAL declarations in DCKCSD and ZBDT05 thanks to @hokb 2021-06-08 14:50:29 -03:00
Weslley S. Pereira 0448336b4c Merge pull request #579 from ZTaylor39/patch-2
Fix typo in lapack.h
2021-06-07 15:26:18 -03:00
ZTaylor39 ab58ebd1e7 Fix typo in lapack.h
Fixed typos on lines 219 and 221 in lapack.h
2021-06-07 13:42:59 -04:00
langou 53a49de857 Merge pull request #573 from weslleyspereira/minor-fixes
Improving comments in GELQT3, LAPY2 and LAPY3 routines
2021-06-04 09:40:49 -06:00
weslley.spereira 8fca89b636 fixes comments in GELQT3 thanks to @hokb 2021-06-04 12:38:12 -03:00
weslley.spereira 08dc990e59 Improves the comments in LAPY2 and LAPY3 routines 2021-06-04 12:34:19 -03:00
langou ecaf399032 Merge pull request #572 from jip/fix
Fix some typos in code and comments
2021-06-03 08:01:04 -06:00
Igor Zhuravlov 8b992fbf99 code fixed: wrong intrinsic function in CABS1 definition in ZTREVC3 2021-06-03 23:02:52 +10:00
Igor Zhuravlov 39f707db0c comments fixed: subroutine name 2021-06-03 23:02:52 +10:00
Igor Zhuravlov 0277cd9362 comments fixed: expression for residual in xTBT02 2021-06-03 23:02:31 +10:00
Igor Zhuravlov 1d98feca56 comments fixed: A**H was missed in xGBT05 2021-06-03 23:01:44 +10:00
Igor Zhuravlov b3166e1b75 comments fixed: NBVAL dimension 2021-06-03 23:01:38 +10:00
Igor Zhuravlov 80409a52f4 comments unified: add an EPS description in xQRT17 2021-06-03 23:01:38 +10:00
Igor Zhuravlov a98ffc640d comments unified: specify where result will be stored in xGBT01 and xPOT01
Were unified with xGET02, xGET08, xPOT06, xQRT16, xSYT02.
2021-06-03 23:01:38 +10:00
Igor Zhuravlov dc6719220f comments unified: compress space chains in xGBT01 and xPOT01 2021-06-03 23:01:38 +10:00
Igor Zhuravlov b1143c56a7 comments fixed: line length in CBDT01 and xPOT01 2021-06-03 23:01:38 +10:00
Igor Zhuravlov 8671e8d098 comments unified: about op(A) in xLARHS and xQRT17 2021-06-03 23:00:47 +10:00
Igor Zhuravlov 47c5704326 comments unified: replace a notation ||expr|| by norm(expr) in xQRT17 2021-06-03 23:00:27 +10:00
Igor Zhuravlov 2f9f42bf2c comments unified and enhanced: TRANS parameter 2021-06-03 23:00:25 +10:00
Igor Zhuravlov bf04fe9cd8 comments unified: remove spaces around expr in op( expr ) in xLARHS 2021-06-03 23:00:25 +10:00
Igor Zhuravlov 76bcd0cd4d comments unified: remove spaces around expr in norm( expr ) 2021-06-03 22:59:31 +10:00
Igor Zhuravlov 457afcf7df comments unified: homgenize notation for transpose (**T) and conjugate transpose (**H)
This commit continues changes made in:
* Reference-LAPACK/lapack@f2953573ed 2011-04-02
* Reference-LAPACK/lapack@d9d50d133b 2011-04-02
* Reference-LAPACK/lapack@16973f0c15 2011-04-08
2021-06-03 22:59:29 +10:00
Igor Zhuravlov e3950c0471 comments fixed: epsilon was mistakenly called a machine precision in xGBT02 2021-06-03 22:58:56 +10:00
langou effe175ca2 Merge pull request #571 from jip/fix
modify xGBT02 and xGET02 to use 1-norm of op(A) not A (no.2 from PR #562)
2021-05-31 16:52:52 -06:00
Igor Zhuravlov 036ec87263 code fixed: a check was added in xGBT02 to handle NaN while norm computing
A check was borrowed from xLANGB.
2021-05-30 19:35:35 +10:00
Igor Zhuravlov 6b0dafd6f9 modifies xGBT02 and xGET02 to use 1-norm of op(A) not A (no.2 from PR #562)
1. Comments improved, unified and fixed.
2. Code changed.

To unify with routines xGBT01, xGTT02, xTBT02, xTPT02, and xTRT02.
2021-05-30 18:30:19 +10:00
Igor Zhuravlov 705bb81296 code fixed: check added to avoid subscript out of bounds error
If M=1 or M<N then an index expression I2-I1+1 may take a non-positive value.
This will raise an out of bound error.

A check was borrowed from xGBT01.
2021-05-30 18:05:43 +10:00
Igor Zhuravlov ff7c5ca217 comments fixed: RWORK dimension
The RWORK dimension was understated.
2021-05-30 17:52:28 +10:00
weslley.spereira 4ea5c1e7c9 Revert "Merge pull request #290 from mgates3/norms"
This reverts commit 8d23489e61, reversing
changes made to c3b03d8f27.
2021-05-26 11:52:57 -03:00
Weslley S. Pereira bd6add2624 Merge pull request #569 from weslleyspereira/fix-bug-in-xCOMBSSQ
Fix bug in (s,d)COMBSSQ
2021-05-25 19:46:03 -03:00
weslley.spereira c55a39969c xCOMBSSQ does nothing when the second scaled sum is zero 2021-05-25 16:58:59 -03:00
langou 2ecd03d631 Merge pull request #561 from eshpc/LAPACKE_STRLEN_END
Add LAPACK_FORTRAN_STRLEN_END info to function prototypes in LAPACKE/include/lapack.h
2021-05-25 07:06:14 -06:00
Edward Smyth 2f1468a8b8 Correct typo indentified by weslleyspereira 2021-05-25 11:18:41 +01:00
Weslley S. Pereira 6ace55e962 Merge pull request #567 from weslleyspereira/add-comment-on-NANs-in-GESDD
Update the documentation of INFO in xGESDD
2021-05-24 18:17:00 -03:00
weslley.spereira c46d58082b Add a comment to the documentation of INFO in xGESDD 2021-05-24 11:11:29 -03:00
Weslley S. Pereira 121b5c53b6 Merge pull request #566 from jip/fix
comments fixed: synced with code in xGTT02 (#3 from PR#562 discussion)
2021-05-24 09:17:04 -03:00
Igor Zhuravlov 6d69cc317f comments fixed: synced with code in xGTT02 (#3 from PR#562)
Comments in xGTT02 declared that it uses norm(A) but its code implemented 1-norm of op(A).
2021-05-24 10:18:45 +10:00
langou 1c8d81aae9 Merge pull request #413 from derpda/master
Improvements of CMake (instalL) code for CBLAS, LAPACKE
2021-05-21 11:25:28 -06:00
Weslley S. Pereira 48e4108761 Merge pull request #562 from jip/fix
comments fixed: op missed
2021-05-21 13:36:38 -03:00
Weslley S. Pereira 956e20afae Merge pull request #564 from weslleyspereira/fix-bug-in-XLAENV-in-chktsqr
IPARMS(1) and IPARMS(2) set to 0 before calling xERRTSQR in xCHKTSQR subroutines
2021-05-21 13:35:56 -03:00
weslley.spereira 99fa86b7b8 IPARMS(1) and IPARMS(2) set to 0 before calling xERRTSQR in xCHKTSQR subroutines. 2021-05-21 10:07:37 -03:00
Igor Zhuravlov 8531d65e66 comments fixed: op missed 2021-05-21 10:39:46 +10:00
Weslley S. Pereira e7bb5f404c Merge pull request #559 from weslleyspereira/fix-safe-scaling-constants
Use ssml from https://doi.org/10.1145/3061665, and fix typos
2021-05-20 21:15:45 -03:00
Edward Smyth 5bfb960d30 Add LAPACK_FORTRAN_STRLEN_END info to function prototypes in LAPACKE/include/lapack.h 2021-05-20 17:39:13 +01:00
weslley.spereira 4b510ef9c6 Fixes another typo thanks to @vladimir-ch 2021-05-19 09:50:13 -03:00
Weslley S. Pereira 448eed9c22 Merge pull request #560 from weslleyspereira/fix-rotg-behavior-for-a=b=0
Fix rotg behavior for a=b=0
2021-05-18 21:47:50 -03:00
weslley.spereira 2e605e14d7 Fix the behavior in srotg and drotg 2021-05-18 20:00:36 -03:00
weslley.spereira 46623c428b Uses ssml from https://doi.org/10.1145/3061665, and fix typos 2021-05-18 19:43:14 -03:00
Weslley S. Pereira 5f9e442b6d Merge pull request #558 from 5tefan/5tefan-patch-1
Fix LAPACK_DIR in installed lapacke-config.cmake
2021-05-17 21:33:27 -03:00
Stefan 6da21e0a74 Fix LAPACK_DIR in installed lapacke-config.cmake
Fixes #550: on fresh install with version 3.9.1, the line in lapacke-config.cmake is:

set(LAPACK_DIR "${_LAPACKE_PREFIX}/lib/cmake/-3.9.1")

And it should be:

set(LAPACK_DIR "${_LAPACKE_PREFIX}/lib/cmake/lapack-3.9.1")
2021-05-17 17:07:43 -06:00
Weslley S. Pereira 6211042c33 Merge pull request #552 from jip/fix
maint: removed unused calls and variables in testing routines
2021-05-17 18:04:53 -03:00
Weslley S. Pereira 9d85169ac2 Merge pull request #553 from martin-frbg/issue548
Use dynamic allocation in the LIN tests as well
2021-05-17 15:11:49 -03:00
Weslley S. Pereira 956a370c3b Merge pull request #544 from weslleyspereira/suppress-date-info-from-lapacke
Suppress date from LAPACKE to compatibilize with LAPACK's convention
2021-05-17 11:54:19 -03:00
Igor Zhuravlov 1114c20ee5 maint: removed unused variables in testing routines
xQRT17 routines had unused variables
2021-05-17 21:53:08 +10:00
langou 1ad528b7d1 Merge pull request #555 from msk/fix-slasq2-xerbla-arg
Correct XERBLA argument in SLASQ2
2021-05-16 16:10:17 -06:00
Min Kim 57c6476f68 Correct XERBLA argument in SLASQ2 2021-05-16 13:17:13 -07:00
Martin Kroeker 96db3e457d Reflect renaming of ?chkaa files to .F 2021-05-14 18:20:21 +02:00
Martin Kroeker 8855029c49 Reflect renaming of ?chkaa files to .F 2021-05-14 18:18:58 +02:00
Martin Kroeker 8ff127d897 Use dynamic allocation for all large arrays 2021-05-14 18:16:58 +02:00
Martin Kroeker b1b81b2ce5 Rename zchkaa.f to zchkaa.F 2021-05-14 18:14:46 +02:00
Martin Kroeker 67324f3893 Rename schkaa.f to schkaa.F 2021-05-14 18:13:57 +02:00
Martin Kroeker 0ea56e4e9e Rename dchkaa.f to dchkaa.F 2021-05-14 18:13:00 +02:00
Martin Kroeker eed0107826 Rename cchkaa.f to cchkaa.F 2021-05-14 18:11:32 +02:00
Igor Zhuravlov ff2f5dc264 remove unused call to xLANGE 2021-05-14 22:21:18 +10:00
langou 2dafa3d275 Merge pull request #543 from Matthew-Badin/dev/explicit-cast
Add Explicit Casts For Complex To Real Cases
2021-05-03 14:39:44 -06:00
weslley.spereira a9d2f2d249 Suppress date to compatibilize with LAPACK's convention 2021-04-30 18:01:40 -03:00
Matthew Badin c1b96f8bb5 Fix double complex cases 2021-04-23 15:52:44 -07:00
Matthew Badin bd02149cb3 fix cpptrf.f unbalanced parentheses error 2021-04-23 15:04:07 -07:00
Matthew Badin 091e7d56bb fix unbalanced parentheses syntax error 2021-04-23 14:53:35 -07:00
langou 7b16a30525 Merge pull request #535 from eshpc/xLAQR_fixes
Corrections to claqr4.f and slaqr4.f code, and update xLAQR comments
2021-04-22 14:57:56 -06:00
langou 41921443dd Merge pull request #531 from martin-frbg/issue530
Use cmake builtin tool for "env" to ensure cross-platform compatibility
2021-04-22 11:40:55 -06:00
langou f02daa6fbd Merge pull request #537 from eshpc/LAPACKE_fixes
Lapacke fixes
2021-04-22 11:38:41 -06:00
langou 287ca57fa9 Merge pull request #539 from eshpc/xORGBR_fixes
Copy recent changes from xUNGBR to xORGBR
2021-04-22 11:38:07 -06:00
langou 8a0dff796a Merge pull request #541 from weslleyspereira/fix-393-incompatible-cblas
Applies @mdarnold1's solution to fix #393
2021-04-22 11:34:20 -06:00
weslley.spereira 666d1b866e Applies @mdarnold1's suggestions 2021-04-22 10:49:07 -03:00
weslley.spereira 1c33cdac1c Fix double routine LAPACKE_dtpmqrt_work 2021-04-22 10:18:18 -03:00
Weslley S. Pereira ab7261e60d Removes duplicate inclusion of TMG lib 2021-04-22 08:49:41 -03:00
Weslley S. Pereira 4b3c7c249f Merge pull request #538 from eshpc/TESTING_fixes
TESTING fixes
2021-04-19 11:25:16 -03:00
weslley.spereira 21417cac13 Just an additional identation in a comment block 2021-04-19 10:49:33 -03:00
Edward Smyth ec12db9a6c Copy recent changes from xUNGBR to xORGBR 2021-04-16 14:50:30 +01:00
Edward Smyth 2fbff09c44 Tidy up indentation 2021-04-16 14:03:35 +01:00
Edward Smyth 4b3476c70e Correct type mismatches in calls to xLASET 2021-04-16 13:55:08 +01:00
Edward Smyth adbad2f6be Add missing break statement in case H 2021-04-16 10:56:43 +01:00
Edward Smyth 6aef1d25ac Add const qualifiers to headers to match routine specification 2021-04-16 10:56:15 +01:00
Matthew Badin a5fd876c8b This change adds explicit casts to many of the complex routines. This is done because if the fortran is translated to a different language, the rules in that language for mixed types may not be the same. This change aids compilation in the translated language. 2021-04-15 18:11:50 -07:00
Weslley S. Pereira 30c945075b Merge pull request #534 from sergey-v-kuznetsov/LAPACKE_fixes_from_MKL
Fixes from MKL team in LAPACKE interfaces thanks to @sergey-v-kuznetsov.
2021-04-15 17:02:39 -03:00
langou 2614d23900 Merge pull request #380 from martin-frbg/openmp4
Allow compilation with OpenMP 3.x
2021-04-15 11:41:43 -06:00
langou f97e867c27 Merge pull request #421 from thijssteel/multishift-aed-QZ
Multishift QZ with AED
2021-04-15 11:33:35 -06:00
langou 7002eb5843 Merge pull request #533 from weslleyspereira/add-testCase-from-issue411
Adds a single pencil for testing CGGSVD3
2021-04-15 11:29:04 -06:00
langou 218d21ac4b Merge pull request #536 from eshpc/xCHKEE_openmp
Change OMP_GET_NUM_THREADS to OMP_GET_MAX_THREADS in xCHKEE
2021-04-15 11:23:49 -06:00
Edward Smyth 188d084df5 Change OMP_GET_NUM_THREADS to OMP_GET_MAX_THREADS 2021-04-15 17:33:43 +01:00
Edward Smyth 4cd57794aa Corrections to claqr4.f and slaqr4.f code, and update comments in other xLAQR routines 2021-04-15 17:04:59 +01:00
weslley.spereira 4e693fe7f2 Minor fixes to build with FFLAGS=-fimplicit-none -frecursive -fcheck=all 2021-04-15 09:14:34 -03:00
weslley.spereira 95cb123b21 Adds a single pencil for testing CGGSVD3 2021-04-14 20:46:46 -03:00
Kuznetsov, Sergey 9b24deea0a Fixes from MKL team in LAPACKE interfaces 2021-04-14 15:43:20 -07:00
Peter Spalthoff 6866f370e5 TMG bundled with LAPACKE in certain case
If otimized/preinstalled LAPACK without TMG is used,
TMG is part of LAPACKE.
This is necessary for installation to work properly.
2021-04-13 11:21:54 +09:00
Peter Spalthoff 61673db2d4 cblas targets added to Component Development
This is in line with LAPACKE cmake.
Also more consistent within the CBLAS CMakeLists.txt.
2021-04-13 11:16:01 +09:00
Peter Spalthoff 5806d9313b CBLAS cmake adapted even more to LAPACKE cmake 2021-04-13 11:15:21 +09:00
Peter Spalthoff c656a5f582 Code adapted more to LAPACKE/CMakeLists.txt
Just order of some lines changed.
2021-04-13 11:13:35 +09:00
Peter Spalthoff 676a02dca2 Unneeded ALL_TARGETS checks removed
The if-checks prevent proper installig of cblas-targets.cmake.
This may have been copied from main CMakeLists line 390 onwards.
2021-04-13 11:11:35 +09:00
Peter Spalthoff 3f6e1ade85 Redundant adding of blas to ALL_TARGETS removed
Already happens in the root CMakeLists.txt in line 377.
2021-04-13 11:08:58 +09:00
langou 799ef93faa Merge pull request #493 from Reference-LAPACK/try-xLARTG-from-Edward-Anderson
Add safe scaling xLARTG from https://doi.org/10.1145/3061665
2021-04-12 15:27:20 -06:00
Martin Kroeker af6deca646 Use cmake builtin tool for "env" to ensure cross-platform compatibility
fixes #530
2021-04-10 12:40:24 +02:00
Martin Kroeker 66468d6eaa Merge pull request #9 from Reference-LAPACK/master
rebase
2021-04-10 12:32:28 +02:00
langou 5472d5e5e1 Merge pull request #502 from weslleyspereira/fix-411-div-by-zero-in-CTGSJA
Fix 411 div by zero in ctgsja
2021-04-07 07:09:20 -06:00
langou e02aff97b5 Merge pull request #418 from jip/fix
Fix some minor errors in code and comments
2021-04-07 06:59:25 -06:00
Igor Zhuravlov 623fef5526 Merge branch 'weslleyspereira-fix' into fix 2021-04-07 12:31:47 +10:00
Igor Zhuravlov 41e0bf1ccd Merge branch 'fix' of https://github.com/weslleyspereira/lapack into weslleyspereira-fix 2021-04-07 11:44:07 +10:00
weslley.spereira 5a7bde2331 Simplifies the bug fix 2021-04-06 21:16:29 -03:00
weslley.spereira 4f466ddca7 Fix bound checks for gamma in xTGSJA 2021-04-06 20:23:13 -03:00
weslley.spereira 6433162433 Fix using Safe Minimum 2021-04-06 20:23:13 -03:00
Igor Zhuravlov 48d3047d08 comments fixed: typos 2021-04-06 18:13:51 -03:00
Igor Zhuravlov 08af5ade23 Revert "filenames fixed: extension to lower case"
This reverts commit ae465ccbac.

That commit to revert was wrong: an upper-case file extension enables
preprocessing (see https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html)
which is required to parse #if defined(_OPENMP) directives correctly.
2021-04-06 18:13:51 -03:00
Igor Zhuravlov 3ffcfe1829 code formatted: indent fixed 2021-04-06 18:11:37 -03:00
Igor Zhuravlov 3bc0fc361f comments unified: subroutine name: letters case 2021-04-06 18:11:37 -03:00
Igor Zhuravlov c49b3300a4 comments fixed: datatype 'real' replaced by 'complex' 2021-04-06 18:11:37 -03:00
Igor Zhuravlov 0397cd687d comments fixed: 'Transpose' replaced by 'Conjugate transpose' 2021-04-06 18:11:37 -03:00
Igor Zhuravlov 56d3c3fbf0 comments fixed: subroutine name 2021-04-06 18:11:37 -03:00
Igor Zhuravlov 33d68e770a filenames fixed: extension to lower case 2021-04-06 18:11:37 -03:00
Igor Zhuravlov 89099b9193 code fixed: take absolute value to make comparison correct 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 5df5fc965b code fixed: LWKOPT restored in WORK( 1 ) at subroutine end 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 2ff043ea3f code simplified: redundant computations removed 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 423cba722e code simplified: re-computation avoided 2021-04-06 18:07:24 -03:00
Igor Zhuravlov e94cb0f1c1 code fixed and unified: NW lower bound limited
- to avoide possible divide by zero (LDWORK) in xxxMLQ, xxxMQR, xxxMRZ
- to unify code with ZUNMRZ, xxxMQL, xxxMRQ
2021-04-06 18:07:24 -03:00
Igor Zhuravlov aa2ae6b705 code formatted: spacing removed between subroutine's name and parentheses around arguments 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 3ae210fad5 code and comments fixed: subroutine name 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 239b05b165 comment fixed: proper side specified 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 18deed31a9 comments fixed: typos 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 31f0d91421 comments fixed: 'Transpose' replaced by 'Conjugate transpose' 2021-04-06 18:07:24 -03:00
Igor Zhuravlov f93833ea2a comments unified: EOLs at EOF 2021-04-06 18:07:24 -03:00
Igor Zhuravlov e385616a58 comments unified: 'End of' comment: prepending empty line added 2021-04-06 18:07:24 -03:00
Igor Zhuravlov d6bcfc9664 comments unified: 'End of' comment: letters case unified 2021-04-06 18:07:24 -03:00
Igor Zhuravlov e9ff50780e comments unified: 'End of' comment: name fixed 2021-04-06 18:07:24 -03:00
Igor Zhuravlov b7eb1941ff comments unified: 'End of' comment: added where omitted 2021-04-06 18:07:24 -03:00
Igor Zhuravlov 5f58f3cae6 comments unified: 'End of' comment: trash removed at the end of line 2021-04-06 18:07:14 -03:00
Weslley S. Pereira 415e140832 Merge branch 'master' into try-xLARTG-from-Edward-Anderson 2021-04-06 16:39:39 -03:00
Weslley S. Pereira 5b07c5e702 Merge pull request #528 from Reference-LAPACK/weslleyspereira-patch-1
Fix typo on .travis.yml
2021-04-06 16:37:56 -03:00
langou 0856911566 Merge pull request #494 from weslleyspereira/try-xLASSQ-from-Edward-Anderson
Add safe scaling xLASSQ routines from https://doi.org/10.1145/3061665
2021-04-06 13:25:28 -06:00
Weslley S. Pereira c9ba62a35b Update .travis.yml
A small typo was causing Travis not to run. This PR fixes it.
2021-04-06 16:19:30 -03:00
Weslley S. Pereira 4e40cbe060 Merge pull request #514 from weslleyspereira/try-xNRM2-from-Ed-Anderson
Try: safe scaling xNRM2
2021-04-06 16:07:21 -03:00
Weslley S. Pereira 38aeb8bbbb Merge branch 'master' into try-xLASSQ-from-Edward-Anderson 2021-04-06 16:01:05 -03:00
Weslley S. Pereira ffb4666754 Merge branch 'master' into try-xLARTG-from-Edward-Anderson 2021-04-06 15:48:30 -03:00
Weslley S. Pereira 92c19c2f63 Merge branch 'master' into try-xNRM2-from-Ed-Anderson 2021-04-06 15:45:14 -03:00
langou 6728b6db16 Merge pull request #508 from bobrik/ivan/big-sur
Add xcode12.3 test on macOS Big Sur
2021-04-06 09:12:41 -06:00
langou 86d79397fa Merge pull request #464 from thijssteel/add-pr-and-issue-templates
add pr and issue templates
2021-04-06 09:11:36 -06:00
langou ebb81cb8ba Merge pull request #501 from weslleyspereira/try-module-for-scaling-constants
Try module for scaling constants
2021-04-06 09:05:27 -06:00
langou acbf97050f Merge pull request #499 from epsilon-0/master
fix redundant install of cblas_test.h
2021-04-06 09:03:48 -06:00
langou 427e05b210 Merge pull request #527 from weslleyspereira/try-xROTG-from-Ed-Anderson
Try: safe scaling ROTG
2021-04-06 08:55:15 -06:00
weslley.spereira d71dd6e76c Remove old lassq methods
Update Doxygen headers
Fix typos
2021-04-01 09:48:24 -03:00
weslley.spereira 5a929d8fcc Add all 4 ROTG routines 2021-04-01 08:51:09 -03:00
weslley.spereira f1550e0aec Removes module la_constants32 2021-03-31 19:18:06 -03:00
weslley.spereira 93173dd91b Adding Doxygen preambles; Return to original real(wp) and complex(wp) 2021-03-31 19:18:06 -03:00
Weslley S. Pereira e39bc0f752 Update la_constants.f90 2021-03-31 19:18:06 -03:00
Nick Papior d7f15a9862 mnt: cleanup and removal of erroneous kind specifications 2021-03-31 19:17:22 -03:00
Weslley S. Pereira 090add87c2 Includes Nick Papior as a contributor 2021-03-31 19:17:22 -03:00
weslley.spereira b68d4c3dd1 Add the module la_constants from @ecanesc with the suggestions of @zerothi 2021-03-31 19:17:22 -03:00
weslley.spereira f77081264a Fixes Doxygen 2021-03-31 19:15:54 -03:00
weslley.spereira a373e72bb7 Header of slartg.f90 compatible with Doxygen and with Lapack convention 2021-03-31 19:15:54 -03:00
weslley.spereira 9fdf99fe5a Removes original xLARTG from DEPRECATED; Homogenize float types 2021-03-31 19:15:54 -03:00
weslley.spereira 6fad11cf37 Move original xLARTG to DEPRECATED; Fix SRC/Makefile 2021-03-31 19:15:45 -03:00
weslley.spereira a35a5ca7ed Fix Makefile and Meson builds; Rename original xlartg.f files to xlartg_lapackv390.f 2021-03-31 19:14:32 -03:00
weslley.spereira 43613a7642 Adds safe scaling xLARTG routines proposed in https://doi.org/10.1145/3061665; Let the compiler determine the Fortran layout by the file extension 2021-03-31 19:14:16 -03:00
Weslley S. Pereira 3606023205 Update la_constants.f90 2021-03-31 19:11:18 -03:00
Nick Papior ff8ab26944 mnt: cleanup and removal of erroneous kind specifications 2021-03-31 19:08:25 -03:00
Weslley S. Pereira 4746efca1e Includes Nick Papior as a contributor 2021-03-31 19:08:25 -03:00
weslley.spereira 44da37564e Adds .f90 extension to Doxyfile 2021-03-31 19:08:25 -03:00
weslley.spereira 3edef3b5e0 Add the module la_constants from @ecanesc with the suggestions of @zerothi 2021-03-31 19:08:25 -03:00
weslley.spereira ef4a7529f6 Move original xLASSQ to DEPRECATED; Add EOF in SRC/Makefile; Correct la_xisnan extension 2021-03-31 19:04:08 -03:00
weslley.spereira ad21f0c3b9 Fix makefile 2021-03-31 19:02:33 -03:00
weslley.spereira a0fc2cc93b Fix Makefile and Meson builds; Rename original xlassq.f files to xlassq_lapackv390.f 2021-03-31 19:02:32 -03:00
weslley.spereira 9352192411 Add safe scaling xLASSQ routines from https://doi.org/10.1145/3061665; Let the compiler determine the Fortran layout by the file extension 2021-03-31 19:02:17 -03:00
weslley.spereira 0791c2210a Fix Makefile 2021-03-31 18:55:34 -03:00
weslley.spereira 3838c85a98 Add all 4 new routines from Ed with my modifications 2021-03-31 18:55:34 -03:00
weslley.spereira 3bbb3e8118 Revert "Merge pull request #1 from weslleyspereira/try-dggev-with-multishift-aed"
This reverts commit 77a97c4167, reversing
changes made to 93fd62fd5a.
2021-03-31 18:07:52 -03:00
Ivan Babrou 2d04791703 Only build on macOS Big Sur 2021-03-25 13:34:32 -07:00
Ivan Babrou 87c9a4afab Add -DBUILD_SHARED_LIBS=BOOL:ON to Travis builds 2021-03-25 13:34:30 -07:00
Ivan Babrou 1406aa24bc Add xcode12.3 test on macOS Big Sur 2021-03-25 13:32:51 -07:00
julielangou 77a0ceb6c9 Merge pull request #382 from vladimir-ch/lapacke/dlantr-no-alloc-trans
LAPACKE: don't allocate transposed matrix in ?lantr_work
2021-03-25 11:25:15 -07:00
julielangou 661d60c9d0 Merge pull request #522 from julielangou/master
Making LAPACK's code eternal... no more version and date in source files
2021-03-25 11:23:56 -07:00
Julie e18d437924 Making LAPACK's code eternal... no more version and date in source files.
GitHub is now enabling us to track accurately version and date.
No need for this anymore.
2021-03-25 10:16:58 -07:00
Weslley S. Pereira 339a623222 Merge pull request #520 from julielangou/master
Update LAPACK version number to 3.9.1
2021-03-25 11:26:15 -03:00
Weslley S. Pereira 3d67b01f4e Merge pull request #515 from weslleyspereira/try-flag--fcheck=bounds
Try flag -fcheck=all
2021-03-25 11:25:42 -03:00
Julie b84fbaf156 Merge remote-tracking branch 'upstream/master' 2021-03-23 10:35:58 -07:00
langou 8ebb2ada33 Merge pull request #521 from veprbl/pr/cblas_use_weak_symbols
cblas: mark cblas_xerbla and F77_xerbla symbols as weak
2021-03-18 17:12:34 -06:00
weslley.spereira 628a2095c2 Fix bug thanks to @langou. Defines LAPACK_FORTRAN_STRLEN_END by default, following @mgates3 comments in @512 and LAPACK++ convention 2021-03-18 18:19:22 -03:00
weslley.spereira d3e64d6445 Change unsigned to size_t, thanks to @jabl 2021-03-18 16:10:09 -03:00
weslley.spereira 2d9fbdeecc Add hidden strlen argument in CBLAS and LAPACKE 2021-03-18 16:10:34 -03:00
Dmitry Kalinkin b4123cbc5d cblas: don't use link_xerbla hack if weak symbols are available 2021-03-18 15:02:06 -04:00
Dmitry Kalinkin 789197e1a5 cblas: mark cblas_xerbla and F77_xerbla symbols as weak 2021-03-18 14:01:22 -04:00
langou 2e71a4f36c Merge pull request #412 from matcross/master
Protect against undefined make variables
2021-03-18 12:00:30 -06:00
langou e930000f16 Merge pull request #513 from martin-frbg/nagfor
Add a sample configuration file for the nagfor compiler
2021-03-18 11:50:30 -06:00
langou 3e8aeccb40 Merge pull request #519 from weslleyspereira/fix-spelling-errors
Fix spelling errors
2021-03-18 11:44:17 -06:00
Julie f67034373e Update LAPACK version number to 3.9.1
... waiting on decision for modified source files
2021-03-18 09:54:00 -07:00
weslley.spereira e9de46b7bf Fix other spelling errors 2021-03-18 12:29:46 -03:00
weslley.spereira a5e610f266 Fix all spelling errors reported at
https://github.com/Reference-LAPACK/lapack/issues/518#issue-834187881
Many thanks to @jschleus
2021-03-18 12:05:25 -03:00
thijs 0b8015ebeb fix error exit tests 2021-03-18 09:11:09 +01:00
steelt 77a97c4167 Merge pull request #1 from weslleyspereira/try-dggev-with-multishift-aed
Try new routine DGLAQZ0 in DGGEV
2021-03-17 14:14:03 +01:00
weslley.spereira 6c434e7c06 Fix bugs; Modifies remaining xGGEV routines; Improve LWORK computation 2021-03-15 14:47:23 -03:00
Martin Kroeker 4ba73aa2aa Add sample configuration file for the NAG Fortran compiler 2021-03-14 11:27:21 +01:00
Martin Kroeker 19dc53b3b5 Merge pull request #8 from Reference-LAPACK/master
rebase
2021-03-14 11:25:17 +01:00
weslley.spereira 9c5165c729 Updates DGGEV to use @thijssteel's new routine DGLAQZ0, and DGGHD3 instead of DGGHRD 2021-03-12 20:02:49 -03:00
langou 1827da0da5 Merge pull request #511 from weslleyspereira/rm-meson
rm Meson build
2021-03-12 12:09:04 -07:00
weslley.spereira c6e59df47f deleted: BLAS/SRC/meson.build
deleted:    SRC/meson.build
	deleted:    meson.build
	deleted:    meson_options.txt
2021-03-12 14:59:37 -03:00
langou 55bdf7f831 Merge pull request #510 from scr2016/master
Fix for bug #481
2021-03-11 09:49:24 -07:00
scr2016 7996ef18bb fixes in cungtsqr_row.f, dorgtsqr_row.f, sorgtsqr_row.f, zungtsqr_row.f for bug #481 (FFLAGS = -O0 -frecursive -ggdb3 -fcheck=bounds
The TSQR tests fail, array index out of bounds)
2021-03-11 04:08:34 -08:00
scr2016 e713a51f99 fixed suscripts in the commeints for NB in cgetsqrhrt.f, zgetsqrhrt.f, sgetsqrhrt.f, dgetsqrhrt.f 2021-03-11 03:40:36 -08:00
langou 6ff9f8376e Merge pull request #507 from martin-frbg/xcode122
[WIP,Testing] Add Travis CI job for OS X Catalina to investigate CBLAS test errors
2021-03-07 20:21:59 -07:00
Martin Kroeker 3c32ba6351 Add testing on OS X Catalina 2021-03-07 23:09:22 +01:00
Martin Kroeker 23dda1af71 Merge pull request #7 from Reference-LAPACK/master
rebase
2021-03-07 23:03:57 +01:00
langou 8bd8372969 Merge pull request #505 from thijssteel/xhgeqz---improved-deflation-criterion
improve deflation criterion in xhgeqz
2021-03-04 19:41:58 -07:00
julielangou 4f54d74aa4 Merge pull request #506 from julielangou/master
Fix Incorrect INFO value from SLASQ2 and DLASQ2
2021-03-04 11:23:28 -08:00
Julie 0d857e397a Fix Incorrect INFO value from SLASQ2 and DLASQ2
When the code checks elements of Z (the second parameter), INFO should be set according to the following
"if the i-th argument is an array and the j-entry had an illegal value, then INFO = -(i*100+j)"

Updated 2-by-2 case - adjusted value and added Z(1) check.

Will close #325
2021-03-04 10:49:55 -08:00
thijs d453071f98 improve deflation criterion in xhgeqz 2021-03-04 17:39:59 +01:00
thijs 93fd62fd5a Revert "improve deflation criterion in xhgeqz"
This reverts commit 868da61a6c.
2021-03-04 17:34:49 +01:00
langou 5123fe9cf2 Merge pull request #504 from Reference-LAPACK/minor_fix_in_comment_of_GGHD3
minor fix in the comment of GGHD3
2021-03-04 09:01:46 -07:00
Julien Langou 0aa068cf27 This routine reduces A to Hessenberg form and maintains B in ....????
=>  This routine reduces A to Hessenberg form and maintains B in triangular form
2021-03-04 07:53:40 -07:00
langou 7199492597 Merge pull request #503 from julielangou/fix-Doxygen
Doxygen stuff: Upgrade conf files, new DOCSDIR variable for make build,  fix syntax errors,  deployment to cmake
2021-03-04 07:23:31 -07:00
thijs 6811c56015 sort shifts to avoid splitting imaginary double shift 2021-03-03 17:28:36 +01:00
Julie ab165e7146 Adding Doxygen Documentation generation in Cmake
New options:
BUILD_HTML_DOCUMENTATION,  BUILD_MAN_DOCUMENTATION
They are set to OFF by default

Like in the make build - make man , make html command will generate the corresponding doc
2021-03-02 18:47:14 -08:00
Julie 7fc1a7c55e Upgrading configuration files to Doxyfile 1.9.1 2021-03-02 16:41:25 -08:00
Julie c636bb1d2b Allowing Doxygen to built html and man doc in specified directory
following recommendation from @albert-github
2021-03-02 16:40:19 -08:00
Julie 86f53af247 Fixing Doxygen syntax errors 2021-03-02 16:38:55 -08:00
weslley.spereira 5b73654cf8 Merge branch 'try-module-for-scaling-constants' of https://github.com/zerothi/lapack into try-module-for-scaling-constants 2021-03-02 21:22:37 -03:00
langou 4b1151660c Merge pull request #500 from weslleyspereira/try-Makefile-on-Travis-CI
Try makefile on travis ci
2021-03-02 10:31:23 -07:00
langou 7de0befd0b Merge pull request #498 from Reference-LAPACK/fix--ieee-check--ilaenv--issue479--issue435
Fix ieee check and ilaenv -- fix issue #479  and issue #435
2021-03-02 10:30:55 -07:00
Weslley S. Pereira 3adc8900c0 Update la_constants.f90 2021-03-02 12:22:54 -03:00
Nick Papior 4c1a74f4d3 mnt: cleanup and removal of erroneous kind specifications 2021-03-02 09:47:39 +01:00
Weslley S. Pereira af3c50ca53 Includes Nick Papior as a contributor 2021-03-01 17:52:45 -03:00
weslley.spereira 921dc9cf35 Adds .f90 extension to Doxyfile 2021-03-01 17:41:15 -03:00
weslley.spereira 676e56a3d8 Add the module la_constants from @ecanesc with the suggestions of @zerothi 2021-03-01 17:38:46 -03:00
weslley.spereira d0deb4b085 Adds EOF 2021-03-01 14:18:51 -03:00
weslley.spereira fdc0c6c42a Fix typos 2021-03-01 14:11:55 -03:00
weslley.spereira 2c1576dd4a Fix typo 2021-03-01 13:58:19 -03:00
weslley.spereira 7c1cfaec8a Adds Makefile tests on Linux and Mac OS X 2021-03-01 13:56:01 -03:00
weslley.spereira 34e233f567 Fix typo 2021-03-01 13:38:01 -03:00
weslley.spereira 26a505d038 Test Makefile only 2021-03-01 13:33:53 -03:00
weslley.spereira cdb3e09870 Adds Makefile build lib and test 2021-03-01 12:35:36 -03:00
weslley.spereira 96880da294 Fix typo and use o instead of .f in the INSTALL/Makefile 2021-03-01 12:04:06 -03:00
Aisha Tammy 0095825b56 fix redundant install of cblas_test.h
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
2021-02-26 22:31:42 +00:00
Julien Langou 7a57812acc fix slasq2.f and dlasq2.f call to ILAENV( 10, ...) and ILAENV( 11, ...)
If you call ILAENV(10, ...), it will check IEEE Infinity and IEEE NaN behavior.
No need to call ILAENV(11, ...)

Note that the call to IEEE = ( ILAENV( 10, 'SLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 )
in SLASQ2 is commented out with the following comment:
*
*     [11/15/2008] The case IEEE=.TRUE. has a problem in single precision with
*     some the test matrices of type 16. The double precision code is fine.
*
and IEEE is set to .FALSE.

This commit does not address this
2021-02-26 11:32:41 -07:00
Julien Langou 786127da71 fix issues #435 and #479
Thanks to @weslleyspereira
2021-02-26 11:26:04 -07:00
Weslley S. Pereira 8bc7b0aef5 Merge pull request #495 from christoph-conrads/add-tmglib-versioning
Add versioning to matrix generator library
2021-02-22 14:49:23 -03:00
Christoph Conrads df52093278 Add versioning to matrix generator library 2021-02-21 20:36:32 +00:00
langou edc6bc588e Merge pull request #489 from christoph-conrads/python2-in-hashbang
lapack_testing.py: python2 explicit in hashbang
2021-02-20 16:33:52 -07:00
Christoph Conrads a51f8baa5a CMake: update, improve test summary invocation
* search for a Python3 interpreter for the test summary
* replace an unnecessary macro invocation with a function
* make summary depend on all other tests

Making the summary depend on all other tests fixes test execution in
random order (e.g., with `ctest --schedule-random`).
2021-02-20 21:11:08 +00:00
Christoph Conrads cda6bf69ba lapack_testing.py: use more idiomatic Python style
Remove C-isms:
* remove unnecessary braces in "if" conditions
* use booleans instead of 0/1 variables
2021-02-20 20:08:13 +00:00
Christoph Conrads 89e8b89400 lapack_testing.py: help show actual default values 2021-02-20 19:51:53 +00:00
Christoph Conrads 95e4515b44 lapack_testing.py: use idiomatic path normalization 2021-02-20 19:42:11 +00:00
Christoph Conrads 7672c5fe57 lapack_testing.py: add missing arguments to getopt
The getopt command line parser did not expect arguments after the
`--bin` and `--dir` options.
2021-02-20 19:40:30 +00:00
Christoph Conrads 2b1eabfdfd lapack_testing.py: remove nonexistent flag in doc
The `-x` flag was never a valid short option for the `getopt` command
line parser.
2021-02-20 19:15:36 +00:00
Christoph Conrads e20af99927 lapack_testing.py: convert to Python3 2021-02-20 18:57:37 +00:00
Christoph Conrads cb3dbb0fe1 lapack_testing.py: python2 explicit in hashbang
Use `python2` explicitly in the hashbang instead of just `python`
because Ubuntu 20.04 does not ship with a `python` executable any
longer.
2021-02-20 18:46:57 +00:00
langou 47a4a75e3f Merge pull request #492 from weslleyspereira/fix-segfault-xeigtstz-335
Fix segfault xeigtstz 335
2021-02-19 14:46:07 -07:00
weslley.spereira 7c74f6ae77 Applies @thijssteel's idea https://github.com/Reference-LAPACK/lapack/pull/492#issuecomment-782135368 2021-02-19 16:00:56 -03:00
weslley.spereira df02000eed Applies dynamic allocation to all EIG tests 2021-02-18 18:21:18 -03:00
weslley.spereira e4f19880a7 Fix bugs 2021-02-18 17:39:45 -03:00
weslley.spereira 8b3e60f181 Merge branch 'master' into fix-segfault-xeigtstz-335 2021-02-18 17:28:56 -03:00
weslley.spereira b3e59914d9 Rollsback TESTING/EIG/Makefile 2021-02-18 16:19:14 -03:00
weslley.spereira 16e0d403b4 Adds frecursive to Travis; Tries allocating memory dinamically for TESTING/EIG/zchkee.f; Improves CMakeLists.txt 2021-02-18 16:17:43 -03:00
weslley.spereira ebaba809ca Improve control of recursive flags in the Makefiles 2021-02-18 14:05:46 -03:00
langou 8960228bf2 Merge pull request #419 from martin-frbg/issue411
Break out of potentially infinite rescaling loops in xLARGV, xLARTG and xLARTGP
2021-02-18 00:13:02 -07:00
weslley.spereira d835f86aeb Removes extra comments 2021-02-17 21:49:41 -03:00
weslley.spereira 1ed021e0ee Add recursive flag to the default in the CMakelists.txt; Remove recursive flags from the build of zchkee.o 2021-02-17 21:47:26 -03:00
Weslley S. Pereira 8976a69382 Merge pull request #468 from langou/new_branch
fix #467
2021-02-17 18:13:41 -03:00
langou 3ea9f5ab2e Merge pull request #405 from christoph-conrads/csd2by1-fixes-20200422
2-by-1 CS decomposition fixes
2021-02-17 10:09:01 -07:00
Weslley S. Pereira edb5fc40a6 Merge pull request #491 from christoph-conrads/xUNHR_COL01-fix-complex-argument
xUNHR_COL01: pass required complex-valued argument
2021-02-17 11:24:50 -03:00
thijs e9d5504c51 add declarations for external routines in QZ code 2021-02-15 16:38:44 +01:00
thijs 6166577bc4 small indentation fix 2021-02-15 16:21:04 +01:00
Christoph Conrads 0c32d4b440 xUNCSD2BY1: allow workspace query with LRWORK=-1
Previously, xUNCSD2BY1 only allowed workspace queries by passing
LWORK=-1 (note the missing "R"). The new commit makes xUNCSD2BY1 behave,
e.g., like xHEEVD.
2021-02-14 18:23:38 +00:00
Christoph Conrads fe3cdc4df7 xORCSD2BY1, xUNCSD2BY1: fix U2 orthogonality
The xORCSD2BY1/xUNCSD2BY1 output matrix U2 was clearly not
orthogonal/unitary for certain input matrix dimensions m, p, and q
(e.g., m = 260, p=130, q=131). The reason was an accidental overwrite of
data by xORGQR()/xUNGQR() when the WORK array was apparently large
enough to use blocking.
2021-02-14 18:23:38 +00:00
Christoph Conrads eb1921af6e xUNCSD2BY1: improve LRWORK handling
* check LRWORK
* pass actual LRWORK value to xBBCSD
2021-02-14 18:23:38 +00:00
Christoph Conrads 7012e4db09 xUNHR_COL01: pass required complex-valued argument
This issue was detected by gfortran 10.2 on Fedora 33 (amd64).
2021-02-14 18:21:20 +00:00
thijs 37efac837f update the comments a little 2021-02-14 12:18:10 +01:00
thijs ffd75e8417 remove unused variables 2021-02-14 11:25:07 +01:00
thijs eb8f7263ac Revert "update the parameters"
This reverts commit 40dd15580d0addac39f15835641c228ad6b6ff27.
2021-02-14 11:25:07 +01:00
thijs 9e18f6b69c fix intent in xlaqz1 2021-02-14 11:25:07 +01:00
thijs e29a36b50a update the parameters 2021-02-14 11:25:07 +01:00
thijs b19715ec9b some small fixes 2021-02-14 11:25:07 +01:00
thijs e683b55241 replace some nan checks with the relevant helper function (avoids compiler optimization removal) 2021-02-14 11:25:07 +01:00
thijs c8da8d5a34 update the formatting a little and add a recursive keyword to some of the functions 2021-02-14 11:25:07 +01:00
thijs 868da61a6c improve deflation criterion in xhgeqz 2021-02-14 11:25:07 +01:00
thijs f503700eb2 some style updates and comments 2021-02-14 11:25:07 +01:00
thijs ce08176549 add xlaqz0 to schur form drivers 2021-02-14 11:25:07 +01:00
thijs 328db71285 fix makefile 2021-02-14 11:25:07 +01:00
thijs 28044805e1 add recursion level 2021-02-14 11:25:07 +01:00
thijs 20e8b880e4 fix bug in bulge chase 2021-02-14 11:25:07 +01:00
thijs cfeaf17194 some linting 2021-02-14 11:25:07 +01:00
thijs cc8cc4ae07 bug fixes 2021-02-14 11:25:07 +01:00
thijs e055cc110b Better recursion and formatting 2021-02-14 11:25:07 +01:00
thijs 4e81cd880c experiment with recursion in zlaqz0 2021-02-14 11:25:07 +01:00
thijs 0f687d899a add single precision implementation 2021-02-14 11:25:07 +01:00
thijs a1b3ff0c26 add complex implementation 2021-02-14 11:25:07 +01:00
thijs a40095f879 fix makefile for single precision 2021-02-14 11:25:07 +01:00
thijs 3acfdcf5e3 add single precision implementation 2021-02-14 11:25:07 +01:00
thijs df064ffd37 remove dlaqz3 2021-02-14 11:25:07 +01:00
thijs a7c0cbddc6 some formatting + solve overflow in dlaqz2 2021-02-14 11:25:07 +01:00
thijs 4f7bee6a2c some more improvements 2021-02-14 11:25:07 +01:00
thijs b7e5cfa4b2 some small fixes 2021-02-14 11:25:07 +01:00
thijs e310909f47 change the parameters a little to increase coverage 2021-02-14 11:25:07 +01:00
thijs 1034f106e2 update deflation criterium in AED to reflect dlaqr3 2021-02-14 11:25:07 +01:00
thijs 2d276d9e02 fix a few bugs 2021-02-14 11:25:07 +01:00
thijs 4a26b58426 kapot 2021-02-14 11:25:07 +01:00
thijs ffef71f5e4 fix the tests 2021-02-14 11:25:07 +01:00
thijs 433a5b5f12 fix dumb mistake 2021-02-14 11:25:07 +01:00
thijs 03fe5c4b5e add new files to cmake list 2021-02-14 11:25:07 +01:00
thijs a6e2f3e6ab use ilaenv, better errors and sweet sweet recusion 2021-02-14 11:25:07 +01:00
thijs 9f3c00c70f attempt to fix coverage (again) 2021-02-14 11:25:07 +01:00
thijs 81211e4cae attempt to improve code coverage 2021-02-14 11:25:07 +01:00
thijs 701a890f90 also add the files to cmake, not only make 2021-02-14 11:25:07 +01:00
thijs 49d9be29f1 add the new QZ solver to dggev3 2021-02-14 11:25:07 +01:00
thijs 7b0afdf460 some more cleanup 2021-02-14 11:25:07 +01:00
thijs 8ce4a70f00 remove some extra subroutines 2021-02-14 11:25:07 +01:00
thijs c21d77d891 add double precision QZ code 2021-02-14 11:25:07 +01:00
Weslley S. Pereira 6281084982 Merge pull request #486 from weslleyspereira/try-implicit-none
Summary of PR #486:
1. There was a bug in the Makefile, and this is why AppVeyor stopped working. I solved it.
2. A recent commit was caused by a variable that was not defined, and the compiler couldn't track it. @thijssteel suggested adding `-fimplicit-none` to the CI on #484. I did it.
2021-02-12 14:52:21 -03:00
weslley.spereira d654f4b343 Revert "Adds fimplicit-none to default make.inc for gfortran"
This reverts commit be1e32437f based on @thijssteel's comment at https://github.com/Reference-LAPACK/lapack/pull/486#issuecomment-778304791
2021-02-12 13:51:32 -03:00
weslley.spereira 006994d462 Travis config file without frecursive 2021-02-12 12:52:39 -03:00
weslley.spereira be1e32437f Adds fimplicit-none to default make.inc for gfortran 2021-02-12 12:45:13 -03:00
Weslley S. Pereira ccae0c94b5 Avoid using a specific value for ulimit 2021-02-12 11:44:03 -03:00
Weslley S. Pereira 0e41cf05c9 Merge pull request #487 from weslleyspereira/exceptional-shifts-in-xlahqr
Exceptional shifts in xlahqr
2021-02-11 21:03:05 -03:00
weslley.spereira db50062a0e Fix bug in CMakeLists.txt that is causing trouble to AppVeyor 2021-02-11 20:24:55 -03:00
weslley.spereira 231f0e49a9 Merge branch 'master' into exceptional-shifts-in-xlahqr 2021-02-11 20:08:35 -03:00
weslley.spereira 471132da2a Fix bugs 2021-02-11 20:08:09 -03:00
weslley.spereira 5c94972607 Trying new configurations for Travis 2021-02-11 17:19:06 -03:00
weslley.spereira afcfb4de5b Trying new configurations for Travis 2021-02-11 16:17:17 -03:00
scr2016 d62305e5f4 Merge branch 'master' of https://github.com/Reference-LAPACK/lapack 2021-02-11 06:36:46 -08:00
scr2016 874b67870e addedd LAPACKE routunes for new Householder reconstruction routines
( SGETSQRHRT, SORGTSQR_ROW, DGETSQRHRT, DORGTSQR_ROW,
  CGETSQRHRT, CUNGTSQR_ROW, ZGETSQRHRT, ZUNGTSQR_ROW )
S, D, C and Z precisions.

modified:   include/lapack.h
modified:   include/lapacke.h
modified:   src/CMakeLists.txt
modified:   src/Makefile
new file:   src/lapacke_cgetsqrhrt.c
new file:   src/lapacke_cgetsqrhrt_work.c
new file:   src/lapacke_cungtsqr_row.c
new file:   src/lapacke_cungtsqr_row_work.c
new file:   src/lapacke_dgetsqrhrt.c
new file:   src/lapacke_dgetsqrhrt_work.c
new file:   src/lapacke_dorgtsqr_row.c
new file:   src/lapacke_dorgtsqr_row_work.c
new file:   src/lapacke_sgetsqrhrt.c
new file:   src/lapacke_sgetsqrhrt_work.c
new file:   src/lapacke_sorgtsqr_row.c
new file:   src/lapacke_sorgtsqr_row_work.c
new file:   src/lapacke_zgetsqrhrt.c
new file:   src/lapacke_zgetsqrhrt_work.c
new file:   src/lapacke_zungtsqr_row.c
new file:   src/lapacke_zungtsqr_row_work.c
2021-02-11 06:34:56 -08:00
langou d92651969b Merge pull request #480 from thijssteel/optimal-packing-xlaqr5
Optimal packing xlaqr5
2021-02-10 10:26:11 -07:00
Weslley S. Pereira 643f6dbc83 Merge pull request #478 from thijssteel/exceptional-shifts-in-xlahqr
improve exceptional shift in xlahqr
2021-02-10 14:24:42 -03:00
Weslley S. Pereira 3b4c73e4e6 Merge pull request #485 from thijssteel/fix-typing-in-xlanv2
fix-typing-xlanv2
2021-02-10 14:24:31 -03:00
langou eef896a302 Merge pull request #420 from thijssteel/shur-swap
Accuracy improvements to xtgex2
2021-02-10 10:19:12 -07:00
thijs 7294b77c0c fix some compiler warnings 2021-02-10 16:24:33 +01:00
thijs 5badddba08 fix-typing-xlanv2 2021-02-10 13:34:19 +01:00
thijs 99fefbede7 fix typo 2021-02-10 08:41:49 +01:00
thijs e5bb59bade fix suggestion by weslley 2021-02-09 19:34:03 +01:00
langou e56b31e97f Merge pull request #477 from thijssteel/fix-475-eigenvalue-convergence-failure
add extra exceptional shift to solve rare convergence issues
2021-02-09 10:32:35 -07:00
thijs b4873c19f6 i remember thinking to myself, i don't need to handle this case, it should never happen... i was wrong 2021-02-04 15:57:39 +01:00
thijs d272841a3d fix workspace and scratch in multishift qr code 2021-02-04 13:41:00 +01:00
thijs deb86438f5 small spelling fix 2021-02-02 23:32:59 +01:00
thijs 5231a5fdf8 forgot to change ntiny in double complex routines 2021-02-02 23:31:36 +01:00
thijs 6b654f4879 more cleanup 2021-01-31 21:04:18 +01:00
thijs cc0e0e3977 fix compiler warnings 2021-01-31 20:44:08 +01:00
thijs 91ba5b00d7 add single precision complex implementation 2021-01-31 20:02:31 +01:00
thijs 7aefe98923 improve compiler optimization 2021-01-31 19:26:17 +01:00
thijs 28555cc67a add double complex implementation 2021-01-30 17:54:58 +01:00
thijs 6bb0869ba6 fix compiler warnings in qz code 2021-01-30 16:47:38 +01:00
thijs 3d29ed091d reset workspace in dlaqr0 to original value 2021-01-30 16:17:17 +01:00
thijs 5a893d06ed fix typo in chgeqz 2021-01-30 15:49:05 +01:00
thijs 8e05d00576 update rest of the routines for the new workspace sizes 2021-01-30 15:46:36 +01:00
thijs 955e418e71 update documentation 2021-01-30 13:54:35 +01:00
thijs f0d751ccad add single precision implementation 2021-01-30 13:45:19 +01:00
thijs 781c3b4b4b small touchups in dlaqr5 2021-01-30 13:27:13 +01:00
thijs 9405a7dabf correct the vigilant deflation strategy 2021-01-30 11:45:42 +01:00
thijs ccef117bf6 clean up the code a bit 2021-01-30 09:57:43 +01:00
thijs 8a2ef03bf2 first good results with optimal packing (not fully tested yet) 2021-01-29 14:33:54 +01:00
thijs c0964cf3bd fix type error in chgeqz 2021-01-29 10:16:53 +01:00
thijs 4e89f98744 fix error in calculation of shifts in complex single shift qz 2021-01-29 09:17:45 +01:00
thijs 79b337d6a6 move the delayed update to just before the reflection calculation 2021-01-28 15:38:39 +01:00
thijs 0d82f77cd4 improve exceptional shift in xlahqr 2021-01-27 13:53:10 +01:00
thijs 441b21e855 remove unnecessary overflow check 2021-01-26 17:07:47 +01:00
thijs b8ab53f72a some extra overflow protection (better safe than sorry) 2021-01-26 13:51:52 +01:00
thijs d789f2e493 add extra exceptional shift to solve rare convergence issues 2021-01-26 13:44:19 +01:00
langou 2b9f0f5280 Merge pull request #472 from jschueller/cmake3
CMake: Bump minimum version to 3.2
2021-01-21 01:34:29 -07:00
thijs bb9847d144 remove some remnants of iterative refinement 2021-01-10 09:57:57 +01:00
langou 6e125a41a7 Merge pull request #471 from jschueller/dgesdd
dgesdd: Handle norm nan value
2021-01-08 12:28:54 -07:00
Julien Schueller 22f2ee7b79 xgesdd: Handle norm nan value
Closes #469
2021-01-08 18:20:54 +01:00
Julien Schueller 8f004b353a CMake: Bump minimum version to 3.2
Newer cmake issues a warning when required version is < 3.
Version 3.2 should be old enough (eg ubuntu 16.04 has version 3.5).
2021-01-08 17:50:49 +01:00
langou adbc021b57 Merge pull request #457 from ye-luo/fix-cmake-nesting
Change the way of adding additional CMake_Fortran_FLAGS.
2021-01-08 09:47:54 -07:00
langou 24b672e513 Merge pull request #470 from thijssteel/fix-travis-osx-build
fix osx builds
2021-01-08 09:35:27 -07:00
thijs 16cda763b4 disable coverage builds for osx 2021-01-08 15:22:50 +01:00
thijs 1293f38b42 brew update results in problems in the ci, so attempt to let osx image govern the gcc version 2021-01-08 13:22:57 +01:00
thijs b50b0630dd shorten the templates a bit 2021-01-07 11:46:12 +01:00
Igor Zhuravlov 42ec867e7f comments fixed: typos 2021-01-07 11:20:03 +10:00
Igor Zhuravlov 020d538c9f Revert "filenames fixed: extension to lower case"
This reverts commit ae465ccbac.

That commit to revert was wrong: an upper-case file extension enables
preprocessing (see https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html)
which is required to parse #if defined(_OPENMP) directives correctly.
2020-12-29 17:36:44 +10:00
Igor Zhuravlov aba0c4dee7 code formatted: indent fixed 2020-12-29 12:26:06 +10:00
Igor Zhuravlov d66a85301c comments unified: subroutine name: letters case 2020-12-29 12:25:33 +10:00
Igor Zhuravlov 66226fea5a comments fixed: datatype 'real' replaced by 'complex' 2020-12-29 12:24:54 +10:00
Igor Zhuravlov adbf5b6055 comments fixed: 'Transpose' replaced by 'Conjugate transpose' 2020-12-29 12:23:51 +10:00
Igor Zhuravlov 58e86741b2 comments fixed: subroutine name 2020-12-29 12:21:44 +10:00
Igor Zhuravlov ae465ccbac filenames fixed: extension to lower case 2020-12-29 12:16:51 +10:00
langou 62aeb5a3e4 Merge pull request #465 from Reference-LAPACK/buildpp
Integrate downloading and building of BLAS++ and LAPACK++
2020-12-26 18:13:11 -07:00
Julien Langou 2ee180ff61 fix #467
fix #467, following @martin-frbg suggestion. Read #468 for more information
2020-12-26 18:08:22 -07:00
Julien Langou 25d127dfc7 fix #467
Fix issue ``Wrong declaration of CDUM in c/zgesdd #467`` from @vzecca by
passing A(1,1) instead of A(2,2) on lines 225 and 234 of SRC/[c/z]ungbr.f
2020-12-26 13:20:50 -07:00
scr2016 0db28653df New complex Householder reconstruction routines,
C and Z precisions CODE and TESTING:
CGETSQRHRT, CUNGTSQR_ROW, CLARFB_GETT,
ZGETSQRHRT, ZUNGTSQR_ROW, ZLARFB_GETT.

  new file:   SRC/cgetsqrhrt.f
  new file:   SRC/clarfb_gett.f
  new file:   SRC/cungtsqr_row.f
  new file:   SRC/zgetsqrhrt.f
  new file:   SRC/zlarfb_gett.f
  new file:   SRC/zungtsqr_row.f
  modified:   SRC/CMakeLists.txt
  modified:   SRC/Makefile

  new file:   TESTING/LIN/cunhr_col02.f
  new file:   TESTING/LIN/zunhr_col02.f
  modified:   TESTING/LIN/cchkunhr_col.f
  modified:   TESTING/LIN/cunhr_col01.f
  modified:   TESTING/LIN/zchkunhr_col.f
  modified:   TESTING/LIN/zunhr_col01.f
  modified:   TESTING/LIN/CMakeLists.txt
  modified:   TESTING/LIN/Makefile
2020-12-10 06:16:35 -08:00
scr2016 c26d01b8e4 MOdified comments in test code for real Householder reconstruction
routines:
    modified:   TESTING/LIN/dchkorhr_col.f
    modified:   TESTING/LIN/dorhr_col01.f
    modified:   TESTING/LIN/dorhr_col02.f
    modified:   TESTING/LIN/schkorhr_col.f
    modified:   TESTING/LIN/sorhr_col01.f
    modified:   TESTING/LIN/sorhr_col02.f
2020-12-10 06:02:25 -08:00
scr2016 4c22df1401 Modified comments in Householder reconstruction routines,
S,D,C,Z precisions:
    modified:   SRC/sorhr_col.f
    modified:   SRC/dorhr_col.f
    modified:   SRC/cunhr_col.f
    modified:   SRC/zunhr_col.f
2020-12-10 05:53:08 -08:00
scr2016 ea30393aab Modified comments in new REAL Householder reconstruction routines,
S and D precisions:
    modified:   SRC/dgetsqrhrt.f
    modified:   SRC/dlarfb_gett.f
    modified:   SRC/dorgtsqr_row.f
    modified:   SRC/sgetsqrhrt.f
    modified:   SRC/slarfb_gett.f
    modified:   SRC/sorgtsqr_row.f
2020-12-10 05:45:32 -08:00
scr2016 8e8c025377 New real Householder reconstruction routines, S and D precisions CODE and TESTING:
SGETSQRHRT, SORGTSQR_ROW, SLARFB_GETT,
DGETSQRHRT, DORGTSQR_ROW, DLARFB_GETT.

  new file:   SRC/sgetsqrhrt.f
  new file:   SRC/slarfb_gett.f
  new file:   SRC/sorgtsqr_row.f
  new file:   SRC/dgetsqrhrt.f
  new file:   SRC/dlarfb_gett.f
  new file:   SRC/dorgtsqr_row.f
  modified:   SRC/CMakeLists.txt
  modified:   SRC/Makefile

  new file:   TESTING/LIN/sorhr_col02.f
  new file:   TESTING/LIN/dorhr_col02.f
  modified:   TESTING/LIN/schkorhr_col.f
  modified:   TESTING/LIN/sorhr_col01.f
  modified:   TESTING/LIN/dchkorhr_col.f
  modified:   TESTING/LIN/dorhr_col01.f
  modified:   TESTING/LIN/CMakeLists.txt
  modified:   TESTING/LIN/Makefile
2020-12-08 04:29:19 -08:00
thijs 8536a696c1 add pr and issue templates 2020-11-09 16:17:35 +01:00
Martin Kroeker 8050692ede Merge pull request #6 from Reference-LAPACK/master
rebase
2020-11-04 23:12:46 +01:00
Ye Luo 3c7b0274fe Change the way of adding CMake_Fortran_FLAGS. 2020-10-17 22:20:50 -05:00
thijs 705ab282ee remove iterative refinement 2020-06-26 14:46:54 +02:00
thijs 5c83787852 add some more test cases 2020-06-24 14:52:33 +02:00
thijs a95a077bfb add some tests to increase coverage 2020-06-24 14:01:09 +02:00
Thijs Steel 24a1b8c528 single precision implementation 2020-06-21 11:51:42 +02:00
Thijs Steel a8bcd43c88 small bug fix 2020-06-21 11:51:23 +02:00
thijs f01ef610f5 fix dumb mistake 2020-06-20 11:20:27 +02:00
thijs 1f04641ee2 iterative refinement 2020-06-19 20:08:32 +02:00
thijs c30c043651 also update error check in real methods 2020-06-17 22:31:47 +02:00
Thijs Steel 4c3a975a9a fix typos in criteria 2020-06-17 13:11:12 +02:00
thijs c8fdb1984c change the stability check in complex variants to reflect new improved expected error 2020-06-17 10:36:53 +02:00
thijs 198f205109 small improvement to shur swapping 2020-06-17 10:00:58 +02:00
Martin Kroeker 006526327d Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:51:18 +02:00
Martin Kroeker cd1db4338e Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:50:19 +02:00
Martin Kroeker 9297ae48a8 Break out of potentially inifinite rescaling loop after 20 iterations 2020-06-06 17:47:57 +02:00
Martin Kroeker 2e9b52c1c0 Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:46:48 +02:00
Martin Kroeker 267d3d18e5 Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:42:45 +02:00
Martin Kroeker 7439cc0af5 Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:23:24 +02:00
Martin Kroeker ac3f163d8b Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:22:23 +02:00
Martin Kroeker ef8afbef47 Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:20:57 +02:00
Martin Kroeker 600c5e9963 Break out of potentially infinite rescaling loop after 20 iterations 2020-06-06 17:18:59 +02:00
Igor Zhuravlov 4bcc555d31 code fixed: take absolute value to make comparison correct 2020-06-02 22:26:49 +10:00
Igor Zhuravlov 3cab95c495 code fixed: LWKOPT restored in WORK( 1 ) at subroutine end 2020-06-02 22:26:38 +10:00
Igor Zhuravlov e526ade751 code simplified: redundant computations removed 2020-06-02 22:26:38 +10:00
Igor Zhuravlov a83cb3ece1 code simplified: re-computation avoided 2020-06-02 22:26:38 +10:00
Igor Zhuravlov 33accab064 code fixed and unified: NW lower bound limited
- to avoide possible divide by zero (LDWORK) in xxxMLQ, xxxMQR, xxxMRZ
- to unify code with ZUNMRZ, xxxMQL, xxxMRQ
2020-06-02 22:26:38 +10:00
Igor Zhuravlov f6a3b18e9f code formatted: spacing removed between subroutine's name and parentheses around arguments 2020-06-02 22:25:21 +10:00
Igor Zhuravlov 1480bec948 code and comments fixed: subroutine name 2020-06-02 22:24:59 +10:00
Igor Zhuravlov b802a7d3ff comment fixed: proper side specified 2020-06-02 22:23:18 +10:00
Igor Zhuravlov c52a9cd69c comments fixed: typos 2020-06-02 22:23:18 +10:00
Igor Zhuravlov 79633990c6 comments fixed: 'Transpose' replaced by 'Conjugate transpose' 2020-06-02 22:23:18 +10:00
Igor Zhuravlov 036011fe15 comments unified: EOLs at EOF 2020-06-02 22:22:45 +10:00
Igor Zhuravlov f2c6ffc902 comments unified: 'End of' comment: prepending empty line added 2020-06-02 22:08:33 +10:00
Igor Zhuravlov 2b06338300 comments unified: 'End of' comment: letters case unified 2020-06-02 22:08:33 +10:00
Igor Zhuravlov b4667cfa7d comments unified: 'End of' comment: name fixed 2020-06-02 22:08:33 +10:00
Igor Zhuravlov 7900bc9585 comments unified: 'End of' comment: added where omitted 2020-06-02 22:08:32 +10:00
Igor Zhuravlov 831899b892 comments unified: 'End of' comment: trash removed at the end of line 2020-06-02 22:08:15 +10:00
Mat Cross 814795fb54 Protect against undefined make variables 2020-04-29 14:41:54 +01:00
Vladimir Chalupecky fd8f68018a LAPACKE: don't allocate transposed matrix in ?lantr_work 2020-01-10 22:41:34 +01:00
Martin Kroeker 3e5c803c59 Make "OMP task depend" sections conditional on OpenMP4, not just OpenMP
to allow compilation with older implementations
2019-12-31 20:15:08 +01:00
6418 changed files with 66332 additions and 32263 deletions
+3 -6
View File
@@ -11,17 +11,14 @@ skip_commits:
# Add [av skip] to commit messages
message: /\[av skip\]/
cache:
- '%APPVEYOR_BUILD_FOLDER%\build'
environment:
global:
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
CONDA_INSTALL_LOCN: C:\\Miniconda37-x64
install:
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- conda config --add channels conda-forge --force
- conda install --yes --quiet flang jom
# - conda config --set auto_update_conda false
- conda install -c conda-forge --yes --quiet flang jom
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%"
- set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%"
+14
View File
@@ -0,0 +1,14 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Type: Bug'
assignees: ''
---
**Description**
**Checklist**
- [ ] I've included a minimal example to reproduce the issue
- [ ] I'd be willing to make a PR to solve this issue
@@ -0,0 +1,8 @@
---
name: Feature request
about: Request a feature
title: ''
labels: 'Type: Feature request'
assignees: ''
---
+8
View File
@@ -0,0 +1,8 @@
---
name: Question
about: Ask a question related to the use of the package
title: ''
labels: 'Type: Question'
assignees: ''
---
+6
View File
@@ -0,0 +1,6 @@
**Description**
**Checklist**
- [ ] The documentation has been updated.
- [ ] If the PR solves a specific issue, it is set to be closed on merge.
+155
View File
@@ -0,0 +1,155 @@
name: CMake
on:
push:
branches:
- master
- try-github-actions
paths:
- .github/workflows/cmake.yml
- '**CMakeLists.txt'
- 'BLAS/**'
- 'CBLAS/**'
- 'CMAKE/**'
- 'INSTALL/**'
- 'LAPACKE/**'
- 'SRC/**'
- 'TESTING/**'
- '!**README'
- '!**Makefile'
- '!**md'
pull_request:
paths:
- .github/workflows/cmake.yml
- '**CMakeLists.txt'
- 'BLAS/**'
- 'CBLAS/**'
- 'CMAKE/**'
- 'INSTALL/**'
- 'LAPACKE/**'
- 'SRC/**'
- 'TESTING/**'
- '!**README'
- '!**Makefile'
- '!**md'
env:
CFLAGS: "-Wall -pedantic"
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
defaults:
run:
shell: bash
jobs:
test-install-release:
# Use GNU compilers
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: Release
FFLAGS: ${{ matrix.fflags }}
strategy:
fail-fast: true
matrix:
os: [ macos-latest, ubuntu-latest ]
fflags: [
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all",
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
steps:
- name: Checkout LAPACK
uses: actions/checkout@v2
- name: Use GCC-11 on MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: >
cmake -B build
-D CMAKE_C_COMPILER="gcc-11"
-D CMAKE_Fortran_COMPILER="gfortran-11"
# - name: Use Unix Makefiles on Windows
# if: ${{ matrix.os == 'windows-latest' }}
# run: >
# cmake -B build
# -G "Unix Makefiles"
# -D CMAKE_C_FLAGS="${{env.CFLAGS}} -Wl,--stack=1000000000"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B build
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=ON
-D LAPACKE:BOOL=ON
-D BUILD_TESTING:BOOL=ON
-D LAPACKE_WITH_TMG:BOOL=ON
-D BUILD_SHARED_LIBS:BOOL=ON
- name: Build
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -D ExperimentalStart
ctest -D ExperimentalConfigure
ctest -D ExperimentalBuild -j2
- name: Test with OpenMP
working-directory: ${{github.workspace}}/build
if: ${{ contains( matrix.fflags, 'openmp' ) }}
run: |
ctest -D ExperimentalTest --schedule-random -j1 --output-on-failure --timeout 100
ctest -D ExperimentalSubmit
- name: Test
working-directory: ${{github.workspace}}/build
if: ${{ !contains( matrix.fflags, 'openmp' ) }}
run: |
ctest -D ExperimentalTest --schedule-random -j2 --output-on-failure --timeout 100
ctest -D ExperimentalSubmit
- name: Install
run: cmake --build build --target install -j2
coverage:
runs-on: ubuntu-latest
env:
BUILD_TYPE: Coverage
FFLAGS: "-fopenmp"
steps:
- name: Checkout LAPACK
uses: actions/checkout@v2
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B build
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=ON
-D LAPACKE:BOOL=ON
-D BUILD_TESTING:BOOL=ON
-D LAPACKE_WITH_TMG:BOOL=ON
-D BUILD_SHARED_LIBS:BOOL=ON
- name: Install
run: cmake --build build --target install -j2
- name: Coverage
run: |
echo "Coverage"
cmake --build build --target coverage
bash <(curl -s https://codecov.io/bash) -X gcov
+95
View File
@@ -0,0 +1,95 @@
name: Makefile
on:
push:
branches:
- master
- try-github-actions
paths:
- .github/workflows/makefile.yml
- '**Makefile'
- 'BLAS/**'
- 'CBLAS/**'
- 'INSTALL/**'
- 'LAPACKE/**'
- 'SRC/**'
- 'TESTING/**'
- '!**README'
- '!**CMakeLists.txt'
- '!**md'
pull_request:
paths:
- .github/workflows/makefile.yml
- '**Makefile'
- 'BLAS/**'
- 'CBLAS/**'
- 'INSTALL/**'
- 'LAPACKE/**'
- 'SRC/**'
- 'TESTING/**'
- '!**README'
- '!**CMakeLists.txt'
- '!**md'
env:
CC: "gcc"
FC: "gfortran"
CFLAGS: "-O3 -flto -Wall -pedantic-errors"
FFLAGS: "-O2 -flto -Wall -Werror=conversion -pedantic -fimplicit-none -frecursive -fopenmp -fcheck=all"
FFLAGS_NOOPT: "-O0 -flto -Wall -fimplicit-none -frecursive -fopenmp -fcheck=all"
LDFLAGS: ""
AR: "ar"
ARFLAGS: "cr"
RANLIB: "ranlib"
defaults:
run:
shell: bash
jobs:
install-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout LAPACK
uses: actions/checkout@v2
- name: Set configurations
run: |
echo "SHELL = /bin/sh" >> make.inc
echo "FFLAGS_DRV = ${{env.FFLAGS}}" >> make.inc
echo "TIMER = INT_ETIME" >> make.inc
echo "BLASLIB = ${{github.workspace}}/librefblas.a" >> make.inc
echo "CBLASLIB = ${{github.workspace}}/libcblas.a" >> make.inc
echo "LAPACKLIB = ${{github.workspace}}/liblapack.a" >> make.inc
echo "TMGLIB = ${{github.workspace}}/libtmglib.a" >> make.inc
echo "LAPACKELIB = ${{github.workspace}}/liblapacke.a" >> make.inc
echo "DOCSDIR = ${{github.workspace}}/DOCS" >> make.inc
- name: Install
run: |
make -s -j2 all
make -j2 lapack_install
install-macos:
runs-on: macos-latest
steps:
- name: Checkout LAPACK
uses: actions/checkout@v2
- name: Set configurations
run: |
echo "SHELL = /bin/sh" >> make.inc
echo "FFLAGS_DRV = ${{env.FFLAGS}}" >> make.inc
echo "TIMER = INT_ETIME" >> make.inc
echo "BLASLIB = ${{github.workspace}}/librefblas.a" >> make.inc
echo "CBLASLIB = ${{github.workspace}}/libcblas.a" >> make.inc
echo "LAPACKLIB = ${{github.workspace}}/liblapack.a" >> make.inc
echo "TMGLIB = ${{github.workspace}}/libtmglib.a" >> make.inc
echo "LAPACKELIB = ${{github.workspace}}/liblapacke.a" >> make.inc
echo "DOCSDIR = ${{github.workspace}}/DOCS" >> make.inc
- name: Alias for GCC compilers
run: |
sudo ln -s $(which gcc-11) /usr/local/bin/gcc
sudo ln -s $(which gfortran-11) /usr/local/bin/gfortran
- name: Install
run: |
make -s -j2 all
make -j2 lapack_install
+1
View File
@@ -27,6 +27,7 @@ TESTING/LIN/xlintst*
TESTING/EIG/xeigtst*
TESTING/*.out
TESTING/*.txt
!TESTING/CMakeLists.txt
TESTING/x*
# LAPACKE example
+24 -8
View File
@@ -14,24 +14,37 @@ addons:
matrix:
include:
- os: linux
name: "CMake Release Test on Linux"
env: CMAKE_BUILD_TYPE=Release
- os: linux
name: "Makefile Test on Linux"
script:
- rm -f make.inc
- cp make.inc.example make.inc
- make FFLAGS="-fimplicit-none -frecursive -fcheck=all" -s -j2 all
- make -j2 lapack_install
- os: linux
name: "CMake Coverage Test on Linux"
env: CMAKE_BUILD_TYPE=Coverage
- os: osx
name: "CMake Release Test on macOS Big Sur"
osx_image: xcode12.3
env: CMAKE_BUILD_TYPE=Release
before_install:
- brew update > /dev/null
- brew upgrade gcc > /dev/null
- os: osx
env: CMAKE_BUILD_TYPE=Coverage
before_install:
- brew update > /dev/null
- brew upgrade gcc > /dev/null
osx_image: xcode12.3
name: "Makefile Test on on macOS Big Sur"
script:
- rm -f make.inc
- cp make.inc.example make.inc
- make FFLAGS="-fimplicit-none -frecursive -fcheck=all" -s -j2 all
- make -j2 lapack_install
script:
before_script:
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
script:
- export SRC_DIR=$(pwd)
- export BLD_DIR=${SRC_DIR}/lapack-travis-bld
- export INST_DIR=${SRC_DIR}/../lapack-travis-install
@@ -46,6 +59,9 @@ script:
-DLAPACKE:BOOL=ON
-DBUILD_TESTING=ON
-DLAPACKE_WITH_TMG:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_Fortran_FLAGS:STRING="-fimplicit-none -frecursive -fcheck=all"
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
${SRC_DIR}
- ctest -D ExperimentalStart
- ctest -D ExperimentalConfigure
+27 -11
View File
@@ -28,21 +28,32 @@
#---------------------------------------------------------
# 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(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f90
srot.f srotg.f90 sscal.f sswap.f sdsdot.f srotmg.f srotm.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(CBLAS1 scabs1.f scasum.f scnrm2.f90 icamax.f caxpy.f ccopy.f
cdotc.f cdotu.f csscal.f crotg.f90 cscal.f cswap.f csrot.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(DBLAS1 idamax.f dasum.f daxpy.f dcopy.f ddot.f dnrm2.f90
drot.f drotg.f90 dscal.f dsdot.f dswap.f drotmg.f drotm.f)
set(CB1AUX isamax.f sasum.f saxpy.f scopy.f snrm2.f sscal.f)
set(DB1AUX sscal.f isamax.f)
set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f)
set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f90 izamax.f zaxpy.f zcopy.f
zdotc.f zdotu.f zdscal.f zrotg.f90 zscal.f zswap.f zdrot.f)
set(CB1AUX
isamax.f idamax.f
sasum.f saxpy.f scopy.f sdot.f sgemm.f sgemv.f snrm2.f90 srot.f sscal.f
sswap.f)
set(ZB1AUX
icamax.f idamax.f
cgemm.f cherk.f cscal.f ctrsm.f
dasum.f daxpy.f dcopy.f ddot.f dgemm.f dgemv.f dnrm2.f90 drot.f dscal.f
dswap.f
scabs1.f)
#---------------------------------------------------------------------
# Auxiliary routines needed by both the Level 2 and Level 3 BLAS
@@ -87,7 +98,8 @@ if(BUILD_SINGLE)
list(APPEND SOURCES ${SBLAS1} ${ALLBLAS} ${SBLAS2} ${SBLAS3})
endif()
if(BUILD_DOUBLE)
list(APPEND SOURCES ${DBLAS1} ${ALLBLAS} ${DBLAS2} ${DBLAS3})
list(APPEND SOURCES
${DBLAS1} ${DB1AUX} ${ALLBLAS} ${DBLAS2} ${DBLAS3} ${SBLAS3})
endif()
if(BUILD_COMPLEX)
list(APPEND SOURCES ${CBLAS1} ${CB1AUX} ${ALLBLAS} ${CBLAS2} ${CBLAS3})
@@ -104,3 +116,7 @@ set_target_properties(
SOVERSION ${LAPACK_MAJOR_VERSION}
)
lapack_install_library(${BLASLIB})
if( TEST_FORTRAN_COMPILER )
add_dependencies( ${BLASLIB} run_test_zcomplexabs run_test_zcomplexdiv run_test_zcomplexmult run_test_zminMax )
endif()
+6
View File
@@ -56,6 +56,12 @@
TOPSRCDIR = ../..
include $(TOPSRCDIR)/make.inc
.SUFFIXES: .F .f90 .o
.F.o:
$(FC) $(FFLAGS) -c -o $@ $<
.f90.o:
$(FC) $(FFLAGS) -c -o $@ $<
.PHONY: all
all: $(BLASLIB)
+4 -4
View File
@@ -72,8 +72,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -88,10 +86,9 @@
* =====================================================================
SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
COMPLEX CA
@@ -136,4 +133,7 @@
END IF
*
RETURN
*
* End of CAXPY
*
END
+4 -4
View File
@@ -65,8 +65,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -81,10 +79,9 @@
* =====================================================================
SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -122,4 +119,7 @@
END DO
END IF
RETURN
*
* End of CCOPY
*
END
+4 -4
View File
@@ -67,8 +67,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -83,10 +81,9 @@
* =====================================================================
COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -131,4 +128,7 @@
END IF
CDOTC = CTEMP
RETURN
*
* End of CDOTC
*
END
+4 -4
View File
@@ -67,8 +67,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -83,10 +81,9 @@
* =====================================================================
COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -128,4 +125,7 @@
END IF
CDOTU = CTEMP
RETURN
*
* End of CDOTU
*
END
+2 -5
View File
@@ -165,8 +165,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -187,10 +185,9 @@
* =====================================================================
SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -385,6 +382,6 @@
*
RETURN
*
* End of CGBMV .
* End of CGBMV
*
END
+2 -5
View File
@@ -166,8 +166,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -187,10 +185,9 @@
* =====================================================================
SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -475,6 +472,6 @@
*
RETURN
*
* End of CGEMM .
* End of CGEMM
*
END
+2 -5
View File
@@ -136,8 +136,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -158,10 +156,9 @@
* =====================================================================
SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -345,6 +342,6 @@
*
RETURN
*
* End of CGEMV .
* End of CGEMV
*
END
+2 -5
View File
@@ -109,8 +109,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -130,10 +128,9 @@
* =====================================================================
SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -222,6 +219,6 @@
*
RETURN
*
* End of CGERC .
* End of CGERC
*
END
+2 -5
View File
@@ -109,8 +109,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -130,10 +128,9 @@
* =====================================================================
SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -222,6 +219,6 @@
*
RETURN
*
* End of CGERU .
* End of CGERU
*
END
+2 -5
View File
@@ -165,8 +165,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -187,10 +185,9 @@
* =====================================================================
SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -375,6 +372,6 @@
*
RETURN
*
* End of CHBMV .
* End of CHBMV
*
END
+2 -5
View File
@@ -170,8 +170,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -191,10 +189,9 @@
* =====================================================================
SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -366,6 +363,6 @@
*
RETURN
*
* End of CHEMM .
* End of CHEMM
*
END
+2 -5
View File
@@ -132,8 +132,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -154,10 +152,9 @@
* =====================================================================
SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -332,6 +329,6 @@
*
RETURN
*
* End of CHEMV .
* End of CHEMV
*
END
+2 -5
View File
@@ -114,8 +114,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -135,10 +133,9 @@
* =====================================================================
SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
REAL ALPHA
@@ -273,6 +270,6 @@
*
RETURN
*
* End of CHER .
* End of CHER
*
END
+2 -5
View File
@@ -129,8 +129,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -150,10 +148,9 @@
* =====================================================================
SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -312,6 +309,6 @@
*
RETURN
*
* End of CHER2 .
* End of CHER2
*
END
+2 -5
View File
@@ -173,8 +173,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -197,10 +195,9 @@
* =====================================================================
SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -437,6 +434,6 @@
*
RETURN
*
* End of CHER2K.
* End of CHER2K
*
END
+4 -7
View File
@@ -149,8 +149,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -173,10 +171,9 @@
* =====================================================================
SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
REAL ALPHA,BETA
@@ -355,7 +352,7 @@
200 CONTINUE
RTEMP = ZERO
DO 210 L = 1,K
RTEMP = RTEMP + CONJG(A(L,J))*A(L,J)
RTEMP = RTEMP + REAL(CONJG(A(L,J))*A(L,J))
210 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(J,J) = ALPHA*RTEMP
@@ -367,7 +364,7 @@
DO 260 J = 1,N
RTEMP = ZERO
DO 230 L = 1,K
RTEMP = RTEMP + CONJG(A(L,J))*A(L,J)
RTEMP = RTEMP + REAL(CONJG(A(L,J))*A(L,J))
230 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(J,J) = ALPHA*RTEMP
@@ -391,6 +388,6 @@
*
RETURN
*
* End of CHERK .
* End of CHERK
*
END
+2 -5
View File
@@ -127,8 +127,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -149,10 +147,9 @@
* =====================================================================
SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -333,6 +330,6 @@
*
RETURN
*
* End of CHPMV .
* End of CHPMV
*
END
+2 -5
View File
@@ -109,8 +109,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -130,10 +128,9 @@
* =====================================================================
SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
REAL ALPHA
@@ -274,6 +271,6 @@
*
RETURN
*
* End of CHPR .
* End of CHPR
*
END
+2 -5
View File
@@ -124,8 +124,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -145,10 +143,9 @@
* =====================================================================
SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -313,6 +310,6 @@
*
RETURN
*
* End of CHPR2 .
* End of CHPR2
*
END
-97
View File
@@ -1,97 +0,0 @@
*> \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
*
* Arguments:
* ==========
*
*> \param[in,out] CA
*> \verbatim
*> CA is COMPLEX
*> \endverbatim
*>
*> \param[in] CB
*> \verbatim
*> CB is COMPLEX
*> \endverbatim
*>
*> \param[out] C
*> \verbatim
*> C is REAL
*> \endverbatim
*>
*> \param[out] S
*> \verbatim
*> S is COMPLEX
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
* =====================================================================
SUBROUTINE CROTG(CA,CB,C,S)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
COMPLEX CA,CB,S
REAL C
* ..
*
* =====================================================================
*
* .. Local Scalars ..
COMPLEX ALPHA
REAL NORM,SCALE
* ..
* .. Intrinsic Functions ..
INTRINSIC CABS,CONJG,SQRT
* ..
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
+277
View File
@@ -0,0 +1,277 @@
!> \brief \b CROTG generates a Givens rotation with real cosine and complex sine.
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! CROTG constructs a plane rotation
! [ c s ] [ a ] = [ r ]
! [ -conjg(s) c ] [ b ] [ 0 ]
! where c is real, s is complex, and c**2 + conjg(s)*s = 1.
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> The computation uses the formulas
!> |x| = sqrt( Re(x)**2 + Im(x)**2 )
!> sgn(x) = x / |x| if x /= 0
!> = 1 if x = 0
!> c = |a| / sqrt(|a|**2 + |b|**2)
!> s = sgn(a) * conjg(b) / sqrt(|a|**2 + |b|**2)
!> r = sgn(a)*sqrt(|a|**2 + |b|**2)
!> When a and b are real and r /= 0, the formulas simplify to
!> c = a / r
!> s = b / r
!> the same as in SROTG when |a| > |b|. When |b| >= |a|, the
!> sign of c and s will be different from those computed by SROTG
!> if the signs of a and b are not the same.
!>
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in,out] A
!> \verbatim
!> A is COMPLEX
!> On entry, the scalar a.
!> On exit, the scalar r.
!> \endverbatim
!>
!> \param[in] B
!> \verbatim
!> B is COMPLEX
!> The scalar b.
!> \endverbatim
!>
!> \param[out] C
!> \verbatim
!> C is REAL
!> The scalar c.
!> \endverbatim
!>
!> \param[out] S
!> \verbatim
!> S is COMPLEX
!> The scalar s.
!> \endverbatim
!
! Authors:
! ========
!
!> \author Weslley Pereira, University of Colorado Denver, USA
!
!> \date December 2021
!
!> \ingroup single_blas_level1
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> Based on the algorithm from
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!> \endverbatim
!
! =====================================================================
subroutine CROTG( a, b, c, s )
integer, parameter :: wp = kind(1.e0)
!
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
!
! .. Constants ..
real(wp), parameter :: zero = 0.0_wp
real(wp), parameter :: one = 1.0_wp
complex(wp), parameter :: czero = 0.0_wp
! ..
! .. Scaling constants ..
real(wp), parameter :: safmin = real(radix(0._wp),wp)**max( &
minexponent(0._wp)-1, &
1-maxexponent(0._wp) &
)
real(wp), parameter :: safmax = real(radix(0._wp),wp)**max( &
1-minexponent(0._wp), &
maxexponent(0._wp)-1 &
)
real(wp), parameter :: rtmin = sqrt( safmin )
! ..
! .. Scalar Arguments ..
real(wp) :: c
complex(wp) :: a, b, s
! ..
! .. Local Scalars ..
real(wp) :: d, f1, f2, g1, g2, h2, u, v, w, rtmax
complex(wp) :: f, fs, g, gs, r, t
! ..
! .. Intrinsic Functions ..
intrinsic :: abs, aimag, conjg, max, min, real, sqrt
! ..
! .. Statement Functions ..
real(wp) :: ABSSQ
! ..
! .. Statement Function definitions ..
ABSSQ( t ) = real( t )**2 + aimag( t )**2
! ..
! .. Executable Statements ..
!
f = a
g = b
if( g == czero ) then
c = one
s = czero
r = f
else if( f == czero ) then
c = zero
if( real(g) == zero ) then
r = abs(aimag(g))
s = conjg( g ) / r
elseif( aimag(g) == zero ) then
r = abs(real(g))
s = conjg( g ) / r
else
g1 = max( abs(real(g)), abs(aimag(g)) )
rtmax = sqrt( safmax/2 )
if( g1 > rtmin .and. g1 < rtmax ) then
!
! Use unscaled algorithm
!
! The following two lines can be replaced by `d = abs( g )`.
! This algorithm do not use the intrinsic complex abs.
g2 = ABSSQ( g )
d = sqrt( g2 )
s = conjg( g ) / d
r = d
else
!
! Use scaled algorithm
!
u = min( safmax, max( safmin, g1 ) )
gs = g / u
! The following two lines can be replaced by `d = abs( gs )`.
! This algorithm do not use the intrinsic complex abs.
g2 = ABSSQ( gs )
d = sqrt( g2 )
s = conjg( gs ) / d
r = d*u
end if
end if
else
f1 = max( abs(real(f)), abs(aimag(f)) )
g1 = max( abs(real(g)), abs(aimag(g)) )
rtmax = sqrt( safmax/4 )
if( f1 > rtmin .and. f1 < rtmax .and. &
g1 > rtmin .and. g1 < rtmax ) then
!
! Use unscaled algorithm
!
f2 = ABSSQ( f )
g2 = ABSSQ( g )
h2 = f2 + g2
! safmin <= f2 <= h2 <= safmax
if( f2 >= h2 * safmin ) then
! safmin <= f2/h2 <= 1, and h2/f2 is finite
c = sqrt( f2 / h2 )
r = f / c
rtmax = rtmax * 2
if( f2 > rtmin .and. h2 < rtmax ) then
! safmin <= sqrt( f2*h2 ) <= safmax
s = conjg( g ) * ( f / sqrt( f2*h2 ) )
else
s = conjg( g ) * ( r / h2 )
end if
else
! f2/h2 <= safmin may be subnormal, and h2/f2 may overflow.
! Moreover,
! safmin <= f2*f2 * safmax < f2 * h2 < h2*h2 * safmin <= safmax,
! sqrt(safmin) <= sqrt(f2 * h2) <= sqrt(safmax).
! Also,
! g2 >> f2, which means that h2 = g2.
d = sqrt( f2 * h2 )
c = f2 / d
if( c >= safmin ) then
r = f / c
else
! f2 / sqrt(f2 * h2) < safmin, then
! sqrt(safmin) <= f2 * sqrt(safmax) <= h2 / sqrt(f2 * h2) <= h2 * (safmin / f2) <= h2 <= safmax
r = f * ( h2 / d )
end if
s = conjg( g ) * ( f / d )
end if
else
!
! Use scaled algorithm
!
u = min( safmax, max( safmin, f1, g1 ) )
gs = g / u
g2 = ABSSQ( gs )
if( f1 / u < rtmin ) then
!
! f is not well-scaled when scaled by g1.
! Use a different scaling for f.
!
v = min( safmax, max( safmin, f1 ) )
w = v / u
fs = f / v
f2 = ABSSQ( fs )
h2 = f2*w**2 + g2
else
!
! Otherwise use the same scaling for f and g.
!
w = one
fs = f / u
f2 = ABSSQ( fs )
h2 = f2 + g2
end if
! safmin <= f2 <= h2 <= safmax
if( f2 >= h2 * safmin ) then
! safmin <= f2/h2 <= 1, and h2/f2 is finite
c = sqrt( f2 / h2 )
r = fs / c
rtmax = rtmax * 2
if( f2 > rtmin .and. h2 < rtmax ) then
! safmin <= sqrt( f2*h2 ) <= safmax
s = conjg( gs ) * ( fs / sqrt( f2*h2 ) )
else
s = conjg( gs ) * ( r / h2 )
end if
else
! f2/h2 <= safmin may be subnormal, and h2/f2 may overflow.
! Moreover,
! safmin <= f2*f2 * safmax < f2 * h2 < h2*h2 * safmin <= safmax,
! sqrt(safmin) <= sqrt(f2 * h2) <= sqrt(safmax).
! Also,
! g2 >> f2, which means that h2 = g2.
d = sqrt( f2 * h2 )
c = f2 / d
if( c >= safmin ) then
r = fs / c
else
! f2 / sqrt(f2 * h2) < safmin, then
! sqrt(safmin) <= f2 * sqrt(safmax) <= h2 / sqrt(f2 * h2) <= h2 * (safmin / f2) <= h2 <= safmax
r = fs * ( h2 / d )
end if
s = conjg( gs ) * ( fs / d )
end if
! Rescale c and r
c = c * w
r = r * u
end if
end if
a = r
return
end subroutine
+9 -5
View File
@@ -61,8 +61,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -78,10 +76,9 @@
* =====================================================================
SUBROUTINE CSCAL(N,CA,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
COMPLEX CA
@@ -96,7 +93,11 @@
* .. Local Scalars ..
INTEGER I,NINCX
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
* .. Parameters ..
COMPLEX ONE
PARAMETER (ONE= (1.0E+0,0.0E+0))
* ..
IF (N.LE.0 .OR. INCX.LE.0 .OR. CA.EQ.ONE) RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
@@ -114,4 +115,7 @@
END DO
END IF
RETURN
*
* End of CSCAL
*
END
+4 -4
View File
@@ -91,17 +91,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level1
*
* =====================================================================
SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
*
* -- Reference BLAS level1 routine (version 3.7.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -150,4 +147,7 @@
END DO
END IF
RETURN
*
* End of CSROT
*
END
+9 -5
View File
@@ -61,8 +61,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -78,10 +76,9 @@
* =====================================================================
SUBROUTINE CSSCAL(N,SA,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
REAL SA
@@ -96,10 +93,14 @@
* .. Local Scalars ..
INTEGER I,NINCX
* ..
* .. Parameters ..
REAL ONE
PARAMETER (ONE=1.0E+0)
* ..
* .. Intrinsic Functions ..
INTRINSIC AIMAG,CMPLX,REAL
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (N.LE.0 .OR. INCX.LE.0 .OR. SA.EQ.ONE) RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
@@ -117,4 +118,7 @@
END DO
END IF
RETURN
*
* End of CSSCAL
*
END
+4 -4
View File
@@ -65,8 +65,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup complex_blas_level1
*
*> \par Further Details:
@@ -81,10 +79,9 @@
* =====================================================================
SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -126,4 +123,7 @@
END DO
END IF
RETURN
*
* End of CSWAP
*
END
+2 -5
View File
@@ -168,8 +168,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -189,10 +187,9 @@
* =====================================================================
SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -364,6 +361,6 @@
*
RETURN
*
* End of CSYMM .
* End of CSYMM
*
END
+2 -5
View File
@@ -167,8 +167,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -188,10 +186,9 @@
* =====================================================================
SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -391,6 +388,6 @@
*
RETURN
*
* End of CSYR2K.
* End of CSYR2K
*
END
+2 -5
View File
@@ -146,8 +146,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -167,10 +165,9 @@
* =====================================================================
SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA,BETA
@@ -358,6 +355,6 @@
*
RETURN
*
* End of CSYRK .
* End of CSYRK
*
END
+2 -5
View File
@@ -164,8 +164,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -186,10 +184,9 @@
* =====================================================================
SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
@@ -424,6 +421,6 @@
*
RETURN
*
* End of CTBMV .
* End of CTBMV
*
END
+2 -5
View File
@@ -168,8 +168,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -189,10 +187,9 @@
* =====================================================================
SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
@@ -427,6 +424,6 @@
*
RETURN
*
* End of CTBSV .
* End of CTBSV
*
END
+2 -5
View File
@@ -120,8 +120,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -142,10 +140,9 @@
* =====================================================================
SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -383,6 +380,6 @@
*
RETURN
*
* End of CTPMV .
* End of CTPMV
*
END
+2 -5
View File
@@ -123,8 +123,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -144,10 +142,9 @@
* =====================================================================
SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -385,6 +382,6 @@
*
RETURN
*
* End of CTPSV .
* End of CTPSV
*
END
+2 -5
View File
@@ -156,8 +156,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -177,10 +175,9 @@
* =====================================================================
SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -447,6 +444,6 @@
*
RETURN
*
* End of CTRMM .
* End of CTRMM
*
END
+2 -5
View File
@@ -125,8 +125,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -147,10 +145,9 @@
* =====================================================================
SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
@@ -368,6 +365,6 @@
*
RETURN
*
* End of CTRMV .
* End of CTRMV
*
END
+2 -5
View File
@@ -159,8 +159,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level3
*
*> \par Further Details:
@@ -180,10 +178,9 @@
* =====================================================================
SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
COMPLEX ALPHA
@@ -472,6 +469,6 @@
*
RETURN
*
* End of CTRSM .
* End of CTRSM
*
END
+2 -5
View File
@@ -128,8 +128,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup complex_blas_level2
*
*> \par Further Details:
@@ -149,10 +147,9 @@
* =====================================================================
SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
@@ -370,6 +367,6 @@
*
RETURN
*
* End of CTRSV .
* End of CTRSV
*
END
+4 -4
View File
@@ -54,8 +54,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -71,10 +69,9 @@
* =====================================================================
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -128,4 +125,7 @@
END IF
DASUM = DTEMP
RETURN
*
* End of DASUM
*
END
+4 -4
View File
@@ -73,8 +73,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -89,10 +87,9 @@
* =====================================================================
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA
@@ -149,4 +146,7 @@
END DO
END IF
RETURN
*
* End of DAXPY
*
END
+4 -4
View File
@@ -40,17 +40,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
* =====================================================================
DOUBLE PRECISION FUNCTION DCABS1(Z)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
COMPLEX*16 Z
@@ -63,4 +60,7 @@
*
DCABS1 = ABS(DBLE(Z)) + ABS(DIMAG(Z))
RETURN
*
* End of DCABS1
*
END
+4 -4
View File
@@ -66,8 +66,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -82,10 +80,9 @@
* =====================================================================
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -143,4 +140,7 @@
END DO
END IF
RETURN
*
* End of DCOPY
*
END
+4 -4
View File
@@ -66,8 +66,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -82,10 +80,9 @@
* =====================================================================
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -145,4 +142,7 @@
END IF
DDOT = DTEMP
RETURN
*
* End of DDOT
*
END
+2 -5
View File
@@ -163,8 +163,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -185,10 +183,9 @@
* =====================================================================
SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -365,6 +362,6 @@
*
RETURN
*
* End of DGBMV .
* End of DGBMV
*
END
+2 -5
View File
@@ -166,8 +166,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -187,10 +185,9 @@
* =====================================================================
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -377,6 +374,6 @@
*
RETURN
*
* End of DGEMM .
* End of DGEMM
*
END
+2 -5
View File
@@ -134,8 +134,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -156,10 +154,9 @@
* =====================================================================
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -325,6 +322,6 @@
*
RETURN
*
* End of DGEMV .
* End of DGEMV
*
END
+2 -5
View File
@@ -109,8 +109,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -130,10 +128,9 @@
* =====================================================================
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -222,6 +219,6 @@
*
RETURN
*
* End of DGER .
* End of DGER
*
END
-132
View File
@@ -1,132 +0,0 @@
*> \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
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of DX
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \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.8.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
DOUBLE PRECISION X(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
* ..
* .. Local Scalars ..
DOUBLE PRECISION ABSXI,NORM,SCALE,SSQ
INTEGER IX
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS,SQRT
* ..
IF (N.LT.1 .OR. INCX.LT.1) THEN
NORM = ZERO
ELSE IF (N.EQ.1) THEN
NORM = ABS(X(1))
ELSE
SCALE = ZERO
SSQ = ONE
* The following loop is equivalent to this call to the LAPACK
* auxiliary routine:
* CALL DLASSQ( N, X, INCX, SCALE, SSQ )
*
DO 10 IX = 1,1 + (N-1)*INCX,INCX
IF (X(IX).NE.ZERO) THEN
ABSXI = ABS(X(IX))
IF (SCALE.LT.ABSXI) THEN
SSQ = ONE + SSQ* (SCALE/ABSXI)**2
SCALE = ABSXI
ELSE
SSQ = SSQ + (ABSXI/SCALE)**2
END IF
END IF
10 CONTINUE
NORM = SCALE*SQRT(SSQ)
END IF
*
DNRM2 = NORM
RETURN
*
* End of DNRM2.
*
END
+199
View File
@@ -0,0 +1,199 @@
!> \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
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER, storage spacing between elements of X
!> If INCX > 0, X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
!> If INCX < 0, X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
!> If INCX = 0, x isn't a vector so there is no need to call
!> this subroutine. If you call it anyway, it will count x(1)
!> in the vector norm N times.
!> \endverbatim
!
! Authors:
! ========
!
!> \author Edward Anderson, Lockheed Martin
!
!> \date August 2016
!
!> \ingroup single_blas_level1
!
!> \par Contributors:
! ==================
!>
!> Weslley Pereira, University of Colorado Denver, USA
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!> Blue, James L. (1978)
!> A Portable Fortran Program to Find the Euclidean Norm of a Vector
!> ACM Trans Math Softw 4:15--23
!> https://doi.org/10.1145/355769.355771
!>
!> \endverbatim
!>
! =====================================================================
function DNRM2( n, x, incx )
integer, parameter :: wp = kind(1.d0)
real(wp) :: DNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
!
! .. Constants ..
real(wp), parameter :: zero = 0.0_wp
real(wp), parameter :: one = 1.0_wp
real(wp), parameter :: maxN = huge(0.0_wp)
! ..
! .. Blue's scaling constants ..
real(wp), parameter :: tsml = real(radix(0._wp), wp)**ceiling( &
(minexponent(0._wp) - 1) * 0.5_wp)
real(wp), parameter :: tbig = real(radix(0._wp), wp)**floor( &
(maxexponent(0._wp) - digits(0._wp) + 1) * 0.5_wp)
real(wp), parameter :: ssml = real(radix(0._wp), wp)**( - floor( &
(minexponent(0._wp) - digits(0._wp)) * 0.5_wp))
real(wp), parameter :: sbig = real(radix(0._wp), wp)**( - ceiling( &
(maxexponent(0._wp) + digits(0._wp) - 1) * 0.5_wp))
! ..
! .. Scalar Arguments ..
integer :: incx, n
! ..
! .. Array Arguments ..
real(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, ix
logical :: notbig
real(wp) :: abig, amed, asml, ax, scl, sumsq, ymax, ymin
!
! Quick return if possible
!
DNRM2 = zero
if( n <= 0 ) return
!
scl = one
sumsq = zero
!
! Compute the sum of squares in 3 accumulators:
! abig -- sums of squares scaled down to avoid overflow
! asml -- sums of squares scaled up to avoid underflow
! amed -- sums of squares that do not require scaling
! The thresholds and multipliers are
! tbig -- values bigger than this are scaled down by sbig
! tsml -- values smaller than this are scaled up by ssml
!
notbig = .true.
asml = zero
amed = zero
abig = zero
ix = 1
if( incx < 0 ) ix = 1 - (n-1)*incx
do i = 1, n
ax = abs(x(ix))
if (ax > tbig) then
abig = abig + (ax*sbig)**2
notbig = .false.
else if (ax < tsml) then
if (notbig) asml = asml + (ax*ssml)**2
else
amed = amed + ax**2
end if
ix = ix + incx
end do
!
! Combine abig and amed or amed and asml if more than one
! accumulator was used.
!
if (abig > zero) then
!
! Combine abig and amed if abig > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
abig = abig + (amed*sbig)*sbig
end if
scl = one / sbig
sumsq = abig
else if (asml > zero) then
!
! Combine amed and asml if asml > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
amed = sqrt(amed)
asml = sqrt(asml) / ssml
if (asml > amed) then
ymin = amed
ymax = asml
else
ymin = asml
ymax = amed
end if
scl = one
sumsq = ymax**2*( one + (ymin/ymax)**2 )
else
scl = one / ssml
sumsq = asml
end if
else
!
! Otherwise all values are mid-range
!
scl = one
sumsq = amed
end if
DNRM2 = scl*sqrt( sumsq )
return
end function
+4 -4
View File
@@ -76,8 +76,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -92,10 +90,9 @@
* =====================================================================
SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
DOUBLE PRECISION C,S
@@ -139,4 +136,7 @@
END DO
END IF
RETURN
*
* End of DROT
*
END
-109
View File
@@ -1,109 +0,0 @@
*> \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
*
* Arguments:
* ==========
*
*> \param[in,out] DA
*> \verbatim
*> DA is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[in,out] DB
*> \verbatim
*> DB is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[out] C
*> \verbatim
*> C is DOUBLE PRECISION
*> \endverbatim
*>
*> \param[out] S
*> \verbatim
*> S is DOUBLE PRECISION
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \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.8.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
DOUBLE PRECISION C,DA,DB,S
* ..
*
* =====================================================================
*
* .. Local Scalars ..
DOUBLE PRECISION R,ROE,SCALE,Z
* ..
* .. Intrinsic Functions ..
INTRINSIC DABS,DSIGN,DSQRT
* ..
SCALE = DABS(DA) + DABS(DB)
IF (SCALE.EQ.0.0d0) THEN
C = 1.0d0
S = 0.0d0
R = 0.0d0
Z = 0.0d0
ELSE
ROE = DB
IF (DABS(DA).GT.DABS(DB)) ROE = DA
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
+151
View File
@@ -0,0 +1,151 @@
!> \brief \b DROTG
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! DROTG constructs a plane rotation
! [ c s ] [ a ] = [ r ]
! [ -s c ] [ b ] [ 0 ]
! satisfying c**2 + s**2 = 1.
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> The computation uses the formulas
!> sigma = sgn(a) if |a| > |b|
!> = sgn(b) if |b| >= |a|
!> r = sigma*sqrt( a**2 + b**2 )
!> c = 1; s = 0 if r = 0
!> c = a/r; s = b/r if r != 0
!> The subroutine also computes
!> z = s if |a| > |b|,
!> = 1/c if |b| >= |a| and c != 0
!> = 1 if c = 0
!> This allows c and s to be reconstructed from z as follows:
!> If z = 1, set c = 0, s = 1.
!> If |z| < 1, set c = sqrt(1 - z**2) and s = z.
!> If |z| > 1, set c = 1/z and s = sqrt( 1 - c**2).
!>
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in,out] A
!> \verbatim
!> A is DOUBLE PRECISION
!> On entry, the scalar a.
!> On exit, the scalar r.
!> \endverbatim
!>
!> \param[in,out] B
!> \verbatim
!> B is DOUBLE PRECISION
!> On entry, the scalar b.
!> On exit, the scalar z.
!> \endverbatim
!>
!> \param[out] C
!> \verbatim
!> C is DOUBLE PRECISION
!> The scalar c.
!> \endverbatim
!>
!> \param[out] S
!> \verbatim
!> S is DOUBLE PRECISION
!> The scalar s.
!> \endverbatim
!
! Authors:
! ========
!
!> \author Edward Anderson, Lockheed Martin
!
!> \par Contributors:
! ==================
!>
!> Weslley Pereira, University of Colorado Denver, USA
!
!> \ingroup single_blas_level1
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!> \endverbatim
!
! =====================================================================
subroutine DROTG( a, b, c, s )
integer, parameter :: wp = kind(1.d0)
!
! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
!
! .. Constants ..
real(wp), parameter :: zero = 0.0_wp
real(wp), parameter :: one = 1.0_wp
! ..
! .. Scaling constants ..
real(wp), parameter :: safmin = real(radix(0._wp),wp)**max( &
minexponent(0._wp)-1, &
1-maxexponent(0._wp) &
)
real(wp), parameter :: safmax = real(radix(0._wp),wp)**max( &
1-minexponent(0._wp), &
maxexponent(0._wp)-1 &
)
! ..
! .. Scalar Arguments ..
real(wp) :: a, b, c, s
! ..
! .. Local Scalars ..
real(wp) :: anorm, bnorm, scl, sigma, r, z
! ..
anorm = abs(a)
bnorm = abs(b)
if( bnorm == zero ) then
c = one
s = zero
b = zero
else if( anorm == zero ) then
c = zero
s = one
a = b
b = one
else
scl = min( safmax, max( safmin, anorm, bnorm ) )
if( anorm > bnorm ) then
sigma = sign(one,a)
else
sigma = sign(one,b)
end if
r = sigma*( scl*sqrt((a/scl)**2 + (b/scl)**2) )
c = a/r
s = b/r
if( anorm > bnorm ) then
z = s
else if( c /= zero ) then
z = one/c
else
z = one
end if
a = r
b = z
end if
return
end subroutine
+4 -4
View File
@@ -89,17 +89,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -197,4 +194,7 @@
END IF
END IF
RETURN
*
* End of DROTM
*
END
+4 -8
View File
@@ -83,17 +83,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
DOUBLE PRECISION DD1,DD2,DX1,DY1
@@ -257,8 +254,7 @@
DPARAM(1) = DFLAG
RETURN
*
* End of DROTMG
*
END
+2 -5
View File
@@ -162,8 +162,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -184,10 +182,9 @@
* =====================================================================
SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -370,6 +367,6 @@
*
RETURN
*
* End of DSBMV .
* End of DSBMV
*
END
+8 -5
View File
@@ -62,8 +62,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -79,10 +77,9 @@
* =====================================================================
SUBROUTINE DSCAL(N,DA,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA
@@ -96,11 +93,14 @@
*
* .. Local Scalars ..
INTEGER I,M,MP1,NINCX
* .. Parameters ..
DOUBLE PRECISION ONE
PARAMETER (ONE=1.0D+0)
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
IF (N.LE.0 .OR. INCX.LE.0) RETURN
IF (N.LE.0 .OR. INCX.LE.0 .OR. DA.EQ.ONE) RETURN
IF (INCX.EQ.1) THEN
*
* code for increment equal to 1
@@ -133,4 +133,7 @@
END DO
END IF
RETURN
*
* End of DSCAL
*
END
+4 -4
View File
@@ -84,8 +84,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -119,10 +117,9 @@
* =====================================================================
DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.7.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -169,4 +166,7 @@
END DO
END IF
RETURN
*
* End of DSDOT
*
END
+2 -5
View File
@@ -125,8 +125,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -147,10 +145,9 @@
* =====================================================================
SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -326,6 +323,6 @@
*
RETURN
*
* End of DSPMV .
* End of DSPMV
*
END
+2 -5
View File
@@ -106,8 +106,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -127,10 +125,9 @@
* =====================================================================
SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -256,6 +253,6 @@
*
RETURN
*
* End of DSPR .
* End of DSPR
*
END
+2 -5
View File
@@ -121,8 +121,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -142,10 +140,9 @@
* =====================================================================
SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -291,6 +288,6 @@
*
RETURN
*
* End of DSPR2 .
* End of DSPR2
*
END
+4 -4
View File
@@ -66,8 +66,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -82,10 +80,9 @@
* =====================================================================
SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -150,4 +147,7 @@
END DO
END IF
RETURN
*
* End of DSWAP
*
END
+2 -5
View File
@@ -168,8 +168,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -189,10 +187,9 @@
* =====================================================================
SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -362,6 +359,6 @@
*
RETURN
*
* End of DSYMM .
* End of DSYMM
*
END
+2 -5
View File
@@ -130,8 +130,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -152,10 +150,9 @@
* =====================================================================
SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -328,6 +325,6 @@
*
RETURN
*
* End of DSYMV .
* End of DSYMV
*
END
+2 -5
View File
@@ -111,8 +111,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -132,10 +130,9 @@
* =====================================================================
SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -258,6 +255,6 @@
*
RETURN
*
* End of DSYR .
* End of DSYR
*
END
+2 -5
View File
@@ -126,8 +126,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -147,10 +145,9 @@
* =====================================================================
SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -293,6 +290,6 @@
*
RETURN
*
* End of DSYR2 .
* End of DSYR2
*
END
+2 -5
View File
@@ -170,8 +170,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -192,10 +190,9 @@
* =====================================================================
SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -394,6 +391,6 @@
*
RETURN
*
* End of DSYR2K.
* End of DSYR2K
*
END
+2 -5
View File
@@ -148,8 +148,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -169,10 +167,9 @@
* =====================================================================
SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
@@ -359,6 +356,6 @@
*
RETURN
*
* End of DSYRK .
* End of DSYRK
*
END
+2 -5
View File
@@ -164,8 +164,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -186,10 +184,9 @@
* =====================================================================
SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
@@ -393,6 +390,6 @@
*
RETURN
*
* End of DTBMV .
* End of DTBMV
*
END
+2 -5
View File
@@ -168,8 +168,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -189,10 +187,9 @@
* =====================================================================
SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,K,LDA,N
@@ -396,6 +393,6 @@
*
RETURN
*
* End of DTBSV .
* End of DTBSV
*
END
+2 -5
View File
@@ -120,8 +120,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -142,10 +140,9 @@
* =====================================================================
SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -347,6 +344,6 @@
*
RETURN
*
* End of DTPMV .
* End of DTPMV
*
END
+2 -5
View File
@@ -123,8 +123,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -144,10 +142,9 @@
* =====================================================================
SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -349,6 +346,6 @@
*
RETURN
*
* End of DTPSV .
* End of DTPSV
*
END
+2 -5
View File
@@ -156,8 +156,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -177,10 +175,9 @@
* =====================================================================
SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -410,6 +407,6 @@
*
RETURN
*
* End of DTRMM .
* End of DTRMM
*
END
+2 -5
View File
@@ -125,8 +125,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level2
*
*> \par Further Details:
@@ -147,10 +145,9 @@
* =====================================================================
SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level2 routine (version 3.7.0) --
* -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
@@ -337,6 +334,6 @@
*
RETURN
*
* End of DTRMV .
* End of DTRMV
*
END
+2 -5
View File
@@ -159,8 +159,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level3
*
*> \par Further Details:
@@ -181,10 +179,9 @@
* =====================================================================
SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
* -- Reference BLAS level3 routine (version 3.7.0) --
* -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
@@ -438,6 +435,6 @@
*
RETURN
*
* End of DTRSM .
* End of DTRSM
*
END
+2 -5
View File
@@ -136,17 +136,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup double_blas_level1
*
* =====================================================================
SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
* -- Reference BLAS level1 routine (version 3.7.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
INTEGER INCX,LDA,N
@@ -333,6 +330,6 @@
*
RETURN
*
* End of DTRSV .
* End of DTRSV
*
END
+4 -4
View File
@@ -55,8 +55,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup double_blas_level1
*
*> \par Further Details:
@@ -72,10 +70,9 @@
* =====================================================================
DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -115,4 +112,7 @@
END IF
DZASUM = STEMP
RETURN
*
* End of DZASUM
*
END
-140
View File
@@ -1,140 +0,0 @@
*> \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
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX*16 array, dimension (N)
*> complex vector with N elements
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of X
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \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.8.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
COMPLEX*16 X(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
* ..
* .. Local Scalars ..
DOUBLE PRECISION NORM,SCALE,SSQ,TEMP
INTEGER IX
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS,DBLE,DIMAG,SQRT
* ..
IF (N.LT.1 .OR. INCX.LT.1) THEN
NORM = ZERO
ELSE
SCALE = ZERO
SSQ = ONE
* The following loop is equivalent to this call to the LAPACK
* auxiliary routine:
* CALL ZLASSQ( N, X, INCX, SCALE, SSQ )
*
DO 10 IX = 1,1 + (N-1)*INCX,INCX
IF (DBLE(X(IX)).NE.ZERO) THEN
TEMP = ABS(DBLE(X(IX)))
IF (SCALE.LT.TEMP) THEN
SSQ = ONE + SSQ* (SCALE/TEMP)**2
SCALE = TEMP
ELSE
SSQ = SSQ + (TEMP/SCALE)**2
END IF
END IF
IF (DIMAG(X(IX)).NE.ZERO) THEN
TEMP = ABS(DIMAG(X(IX)))
IF (SCALE.LT.TEMP) THEN
SSQ = ONE + SSQ* (SCALE/TEMP)**2
SCALE = TEMP
ELSE
SSQ = SSQ + (TEMP/SCALE)**2
END IF
END IF
10 CONTINUE
NORM = SCALE*SQRT(SSQ)
END IF
*
DZNRM2 = NORM
RETURN
*
* End of DZNRM2.
*
END
+209
View File
@@ -0,0 +1,209 @@
!> \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 ..
! DOUBLE COMPLEX X(*)
! ..
!
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> DZNRM2 returns the euclidean norm of a vector via the function
!> name, so that
!>
!> DZNRM2 := sqrt( x**H*x )
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is COMPLEX*16 array, dimension (N)
!> complex vector with N elements
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER, storage spacing between elements of X
!> If INCX > 0, X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
!> If INCX < 0, X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
!> If INCX = 0, x isn't a vector so there is no need to call
!> this subroutine. If you call it anyway, it will count x(1)
!> in the vector norm N times.
!> \endverbatim
!
! Authors:
! ========
!
!> \author Edward Anderson, Lockheed Martin
!
!> \date August 2016
!
!> \ingroup single_blas_level1
!
!> \par Contributors:
! ==================
!>
!> Weslley Pereira, University of Colorado Denver, USA
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!> Blue, James L. (1978)
!> A Portable Fortran Program to Find the Euclidean Norm of a Vector
!> ACM Trans Math Softw 4:15--23
!> https://doi.org/10.1145/355769.355771
!>
!> \endverbatim
!>
! =====================================================================
function DZNRM2( n, x, incx )
integer, parameter :: wp = kind(1.d0)
real(wp) :: DZNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
!
! .. Constants ..
real(wp), parameter :: zero = 0.0_wp
real(wp), parameter :: one = 1.0_wp
real(wp), parameter :: maxN = huge(0.0_wp)
! ..
! .. Blue's scaling constants ..
real(wp), parameter :: tsml = real(radix(0._wp), wp)**ceiling( &
(minexponent(0._wp) - 1) * 0.5_wp)
real(wp), parameter :: tbig = real(radix(0._wp), wp)**floor( &
(maxexponent(0._wp) - digits(0._wp) + 1) * 0.5_wp)
real(wp), parameter :: ssml = real(radix(0._wp), wp)**( - floor( &
(minexponent(0._wp) - digits(0._wp)) * 0.5_wp))
real(wp), parameter :: sbig = real(radix(0._wp), wp)**( - ceiling( &
(maxexponent(0._wp) + digits(0._wp) - 1) * 0.5_wp))
! ..
! .. Scalar Arguments ..
integer :: incx, n
! ..
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, ix
logical :: notbig
real(wp) :: abig, amed, asml, ax, scl, sumsq, ymax, ymin
!
! Quick return if possible
!
DZNRM2 = zero
if( n <= 0 ) return
!
scl = one
sumsq = zero
!
! Compute the sum of squares in 3 accumulators:
! abig -- sums of squares scaled down to avoid overflow
! asml -- sums of squares scaled up to avoid underflow
! amed -- sums of squares that do not require scaling
! The thresholds and multipliers are
! tbig -- values bigger than this are scaled down by sbig
! tsml -- values smaller than this are scaled up by ssml
!
notbig = .true.
asml = zero
amed = zero
abig = zero
ix = 1
if( incx < 0 ) ix = 1 - (n-1)*incx
do i = 1, n
ax = abs(real(x(ix)))
if (ax > tbig) then
abig = abig + (ax*sbig)**2
notbig = .false.
else if (ax < tsml) then
if (notbig) asml = asml + (ax*ssml)**2
else
amed = amed + ax**2
end if
ax = abs(aimag(x(ix)))
if (ax > tbig) then
abig = abig + (ax*sbig)**2
notbig = .false.
else if (ax < tsml) then
if (notbig) asml = asml + (ax*ssml)**2
else
amed = amed + ax**2
end if
ix = ix + incx
end do
!
! Combine abig and amed or amed and asml if more than one
! accumulator was used.
!
if (abig > zero) then
!
! Combine abig and amed if abig > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
abig = abig + (amed*sbig)*sbig
end if
scl = one / sbig
sumsq = abig
else if (asml > zero) then
!
! Combine amed and asml if asml > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
amed = sqrt(amed)
asml = sqrt(asml) / ssml
if (asml > amed) then
ymin = amed
ymax = asml
else
ymin = asml
ymax = amed
end if
scl = one
sumsq = ymax**2*( one + (ymin/ymax)**2 )
else
scl = one / ssml
sumsq = asml
end if
else
!
! Otherwise all values are mid-range
!
scl = one
sumsq = amed
end if
DZNRM2 = scl*sqrt( sumsq )
return
end function
+4 -4
View File
@@ -54,8 +54,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup aux_blas
*
*> \par Further Details:
@@ -71,10 +69,9 @@
* =====================================================================
INTEGER FUNCTION ICAMAX(N,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -124,4 +121,7 @@
END DO
END IF
RETURN
*
* End of ICAMAX
*
END
+4 -4
View File
@@ -54,8 +54,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup aux_blas
*
*> \par Further Details:
@@ -71,10 +69,9 @@
* =====================================================================
INTEGER FUNCTION IDAMAX(N,DX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -123,4 +120,7 @@
END DO
END IF
RETURN
*
* End of IDAMAX
*
END
+4 -4
View File
@@ -54,8 +54,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup aux_blas
*
*> \par Further Details:
@@ -71,10 +69,9 @@
* =====================================================================
INTEGER FUNCTION ISAMAX(N,SX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -123,4 +120,7 @@
END DO
END IF
RETURN
*
* End of ISAMAX
*
END
+4 -4
View File
@@ -54,8 +54,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup aux_blas
*
*> \par Further Details:
@@ -71,10 +69,9 @@
* =====================================================================
INTEGER FUNCTION IZAMAX(N,ZX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -124,4 +121,7 @@
END DO
END IF
RETURN
*
* End of IZAMAX
*
END
+1 -4
View File
@@ -46,17 +46,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup aux_blas
*
* =====================================================================
LOGICAL FUNCTION LSAME(CA,CB)
*
* -- Reference BLAS level1 routine (version 3.1) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
*
* .. Scalar Arguments ..
CHARACTER CA,CB
-29
View File
@@ -1,29 +0,0 @@
SBLAS1 = files('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')
CBLAS1 = files('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')
DBLAS1 = files('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')
ZBLAS1 = files('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')
CB1AUX = files('isamax.f', 'sasum.f', 'saxpy.f', 'scopy.f', 'snrm2.f', 'sscal.f')
ZB1AUX = files('idamax.f', 'dasum.f', 'daxpy.f', 'dcopy.f', 'dnrm2.f', 'dscal.f')
ALLBLAS = files('lsame.f', 'xerbla.f', 'xerbla_array.f')
SBLAS2 = files('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')
CBLAS2 = files('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')
DBLAS2 = files('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')
ZBLAS2 = files('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')
SBLAS3 = files('sgemm.f', 'ssymm.f', 'ssyrk.f', 'ssyr2k.f', 'strmm.f', 'strsm.f')
CBLAS3 = files('cgemm.f', 'csymm.f', 'csyrk.f', 'csyr2k.f', 'ctrmm.f', 'ctrsm.f', 'chemm.f', 'cherk.f', 'cher2k.f')
DBLAS3 = files('dgemm.f', 'dsymm.f', 'dsyrk.f', 'dsyr2k.f', 'dtrmm.f', 'dtrsm.f')
ZBLAS3 = files('zgemm.f', 'zsymm.f', 'zsyrk.f', 'zsyr2k.f', 'ztrmm.f', 'ztrsm.f', 'zhemm.f', 'zherk.f', 'zher2k.f')
+4 -4
View File
@@ -55,8 +55,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
@@ -72,10 +70,9 @@
* =====================================================================
REAL FUNCTION SASUM(N,SX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -129,4 +126,7 @@
END IF
SASUM = STEMP
RETURN
*
* End of SASUM
*
END
+4 -4
View File
@@ -73,8 +73,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
@@ -89,10 +87,9 @@
* =====================================================================
SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
REAL SA
@@ -149,4 +146,7 @@
END DO
END IF
RETURN
*
* End of SAXPY
*
END
+4 -4
View File
@@ -39,17 +39,14 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup single_blas_level1
*
* =====================================================================
REAL FUNCTION SCABS1(Z)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
COMPLEX Z
@@ -62,4 +59,7 @@
* ..
SCABS1 = ABS(REAL(Z)) + ABS(AIMAG(Z))
RETURN
*
* End of SCABS1
*
END
+4 -4
View File
@@ -55,8 +55,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
@@ -72,10 +70,9 @@
* =====================================================================
REAL FUNCTION SCASUM(N,CX,INCX)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
@@ -114,4 +111,7 @@
END IF
SCASUM = STEMP
RETURN
*
* End of SCASUM
*
END
-140
View File
@@ -1,140 +0,0 @@
*> \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
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is COMPLEX array, dimension (N)
*> complex vector with N elements
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of X
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \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.8.0) --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
COMPLEX X(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
REAL ONE,ZERO
PARAMETER (ONE=1.0E+0,ZERO=0.0E+0)
* ..
* .. Local Scalars ..
REAL NORM,SCALE,SSQ,TEMP
INTEGER IX
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS,AIMAG,REAL,SQRT
* ..
IF (N.LT.1 .OR. INCX.LT.1) THEN
NORM = ZERO
ELSE
SCALE = ZERO
SSQ = ONE
* The following loop is equivalent to this call to the LAPACK
* auxiliary routine:
* CALL CLASSQ( N, X, INCX, SCALE, SSQ )
*
DO 10 IX = 1,1 + (N-1)*INCX,INCX
IF (REAL(X(IX)).NE.ZERO) THEN
TEMP = ABS(REAL(X(IX)))
IF (SCALE.LT.TEMP) THEN
SSQ = ONE + SSQ* (SCALE/TEMP)**2
SCALE = TEMP
ELSE
SSQ = SSQ + (TEMP/SCALE)**2
END IF
END IF
IF (AIMAG(X(IX)).NE.ZERO) THEN
TEMP = ABS(AIMAG(X(IX)))
IF (SCALE.LT.TEMP) THEN
SSQ = ONE + SSQ* (SCALE/TEMP)**2
SCALE = TEMP
ELSE
SSQ = SSQ + (TEMP/SCALE)**2
END IF
END IF
10 CONTINUE
NORM = SCALE*SQRT(SSQ)
END IF
*
SCNRM2 = NORM
RETURN
*
* End of SCNRM2.
*
END
+209
View File
@@ -0,0 +1,209 @@
!> \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
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is COMPLEX array, dimension (N)
!> complex vector with N elements
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER, storage spacing between elements of X
!> If INCX > 0, X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
!> If INCX < 0, X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
!> If INCX = 0, x isn't a vector so there is no need to call
!> this subroutine. If you call it anyway, it will count x(1)
!> in the vector norm N times.
!> \endverbatim
!
! Authors:
! ========
!
!> \author Edward Anderson, Lockheed Martin
!
!> \date August 2016
!
!> \ingroup single_blas_level1
!
!> \par Contributors:
! ==================
!>
!> Weslley Pereira, University of Colorado Denver, USA
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> Anderson E. (2017)
!> Algorithm 978: Safe Scaling in the Level 1 BLAS
!> ACM Trans Math Softw 44:1--28
!> https://doi.org/10.1145/3061665
!>
!> Blue, James L. (1978)
!> A Portable Fortran Program to Find the Euclidean Norm of a Vector
!> ACM Trans Math Softw 4:15--23
!> https://doi.org/10.1145/355769.355771
!>
!> \endverbatim
!>
! =====================================================================
function SCNRM2( n, x, incx )
integer, parameter :: wp = kind(1.e0)
real(wp) :: SCNRM2
!
! -- Reference BLAS level1 routine (version 3.9.1) --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021
!
! .. Constants ..
real(wp), parameter :: zero = 0.0_wp
real(wp), parameter :: one = 1.0_wp
real(wp), parameter :: maxN = huge(0.0_wp)
! ..
! .. Blue's scaling constants ..
real(wp), parameter :: tsml = real(radix(0._wp), wp)**ceiling( &
(minexponent(0._wp) - 1) * 0.5_wp)
real(wp), parameter :: tbig = real(radix(0._wp), wp)**floor( &
(maxexponent(0._wp) - digits(0._wp) + 1) * 0.5_wp)
real(wp), parameter :: ssml = real(radix(0._wp), wp)**( - floor( &
(minexponent(0._wp) - digits(0._wp)) * 0.5_wp))
real(wp), parameter :: sbig = real(radix(0._wp), wp)**( - ceiling( &
(maxexponent(0._wp) + digits(0._wp) - 1) * 0.5_wp))
! ..
! .. Scalar Arguments ..
integer :: incx, n
! ..
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, ix
logical :: notbig
real(wp) :: abig, amed, asml, ax, scl, sumsq, ymax, ymin
!
! Quick return if possible
!
SCNRM2 = zero
if( n <= 0 ) return
!
scl = one
sumsq = zero
!
! Compute the sum of squares in 3 accumulators:
! abig -- sums of squares scaled down to avoid overflow
! asml -- sums of squares scaled up to avoid underflow
! amed -- sums of squares that do not require scaling
! The thresholds and multipliers are
! tbig -- values bigger than this are scaled down by sbig
! tsml -- values smaller than this are scaled up by ssml
!
notbig = .true.
asml = zero
amed = zero
abig = zero
ix = 1
if( incx < 0 ) ix = 1 - (n-1)*incx
do i = 1, n
ax = abs(real(x(ix)))
if (ax > tbig) then
abig = abig + (ax*sbig)**2
notbig = .false.
else if (ax < tsml) then
if (notbig) asml = asml + (ax*ssml)**2
else
amed = amed + ax**2
end if
ax = abs(aimag(x(ix)))
if (ax > tbig) then
abig = abig + (ax*sbig)**2
notbig = .false.
else if (ax < tsml) then
if (notbig) asml = asml + (ax*ssml)**2
else
amed = amed + ax**2
end if
ix = ix + incx
end do
!
! Combine abig and amed or amed and asml if more than one
! accumulator was used.
!
if (abig > zero) then
!
! Combine abig and amed if abig > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
abig = abig + (amed*sbig)*sbig
end if
scl = one / sbig
sumsq = abig
else if (asml > zero) then
!
! Combine amed and asml if asml > 0.
!
if ( (amed > zero) .or. (amed > maxN) .or. (amed /= amed) ) then
amed = sqrt(amed)
asml = sqrt(asml) / ssml
if (asml > amed) then
ymin = amed
ymax = asml
else
ymin = asml
ymax = amed
end if
scl = one
sumsq = ymax**2*( one + (ymin/ymax)**2 )
else
scl = one / ssml
sumsq = asml
end if
else
!
! Otherwise all values are mid-range
!
scl = one
sumsq = amed
end if
SCNRM2 = scl*sqrt( sumsq )
return
end function
+4 -4
View File
@@ -66,8 +66,6 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date November 2017
*
*> \ingroup single_blas_level1
*
*> \par Further Details:
@@ -82,10 +80,9 @@
* =====================================================================
SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
*
* -- Reference BLAS level1 routine (version 3.8.0) --
* -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2017
*
* .. Scalar Arguments ..
INTEGER INCX,INCY,N
@@ -143,4 +140,7 @@
END DO
END IF
RETURN
*
* End of SCOPY
*
END

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