Compare commits

...
675 Commits
Author SHA1 Message Date
langou d134ca0070 Merge pull request #1362 from mgates3/bdsvdx
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
2026-08-21 20:23:06 -06:00
Mark Gates 525fccc323 bdsvdx: fix docs to match code, D and E are not const 2026-08-21 20:53:03 -04:00
langou 51b349470b Merge pull request #1354 from ACSimon33/coverage_ci
CI: Try to fix the code coverage reports
2026-08-06 08:28:47 -06:00
langou 5c2c24f547 Merge pull request #1353 from ACSimon33/extended-api-generator
CMAKE: generalize the 64-bit suffixed-source generator
2026-08-06 08:27:40 -06:00
langou a2d651f8f0 Merge pull request #1352 from ACSimon33/lapacke-set-alloc
LAPACKE: runtime allocator override (`LAPACKE_set_alloc`)
2026-08-06 08:21:26 -06:00
Simon Maertens ed5f25bb22 Try to fix the code coverage reports 2026-08-06 15:35:51 +02:00
Simon Maertens f556d04306 Formatting/Comments of new allocation proxies 2026-08-05 16:28:57 +01:00
Simon MaertensandClaude Fable 5 aa622d1183 LAPACKE: add runtime allocator override (LAPACKE_set_alloc)
Route the LAPACKE_malloc / LAPACKE_free defaults through function
pointers so the LAPACKE test suite can inject allocation failures at
run time, mirroring LAPACKE_set_nancheck. Compile-time macro overrides
are unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 16:28:57 +01:00
Simon MaertensandClaude Fable 5 3705542eac CMAKE: generalize the 64-bit suffixed-source generator
SUFFIX is now a required argument and an optional SYMBOL_ALLOWLIST
restricts the renaming to the listed symbols (needed by the upcoming
LAPACKE test suite). All 3523 generated _64 sources stay byte-identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 16:19:11 +01:00
langou f0f3e5f9a8 Merge pull request #1348 from ACSimon33/test_summary_gh_actions
CI: publish test results as artifacts and GitHub Actions step summaries
2026-08-03 18:37:41 -06:00
Simon Maertens 0a70a8c212 Don't just print the summary in GITHUB_STEP_SUMMARY; also print the errors 2026-08-02 18:13:32 +02:00
Simon MaertensandClaude Opus 5 e273ca7370 lapack_testing.py: two-decimal percentages in the text summary too
Shares error_percent with the Markdown report, including the 0.01%
floor for nonzero counts; the error columns are rebalanced by one
character so (100.00%) still fits under the rule.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 18:13:32 +02:00
Simon MaertensandClaude Opus 5 538cf81a3a lapack_testing.py: two-decimal percentages in the Markdown report
A nonzero error count whose percentage would display as 0.00% is
shown as 0.01% instead, so it cannot read as a zero error rate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 18:13:31 +02:00
Simon MaertensandClaude Opus 5 b7667ec54d CI: upload test results and write step summaries in the CMake jobs
testing_results.txt and the JUnit XML are kept for 14 days even when
the tests fail; the step summary links to the artifact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 18:13:31 +02:00
Simon MaertensandClaude Opus 5 6d0ac95f50 lapack_testing.py: add --markdown report for CI step summaries
Summary tables first, then one entry per failing output file with
its notable lines collapsed; sized in UTF-8 bytes to stay under
GitHub's 1 MiB step-summary limit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 18:13:30 +02:00
langou fad42f8ece Merge pull request #1347 from ACSimon33/random_il_iu_selection 2026-08-01 21:27:12 -06:00
Simon MaertensandClaude Opus 5 f955756bf5 TESTING: draw IL and IU from the full [1,N] range
1+INT((N-1)*u) with u in (0,1) can never reach N, so the IU=N branch
of the RANGE='V' bound in xDRVST has been unreachable since the code
was written.  xLARND excludes 0 and 1, so 1+INT(N*u) covers [1,N].

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 02:13:24 +01:00
Simon MaertensandClaude Opus 5 cdb89685bd TESTING: fix random IL and IU selection in xCHKST and DDRVST
INT was applied to the (0,1) deviate instead of the scaled value, so
IL and IU were always 1 and the RANGE='I'/'V' paths never tested more
than a single eigenvector.  Matches the form already used in xDRVBD,
xDRVSG and the other xDRVST variants.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 02:13:20 +01:00
langou 9b124563b8 Merge pull request #1346 from ACSimon33/sep_stein_threshold
TESTING: raise SEP threshold to account for xSTEIN's orthogonality guarantee
2026-08-01 09:37:51 -06:00
langou 018bf9f330 Merge pull request #1344 from ACSimon33/rotmg_compact_flags
BLAS: Restore compact ROTMG flag output when no rescaling occurs
2026-08-01 09:02:06 -06:00
Simon Maertens 28457943b3 Reduce threshold to 60.0; add additional info in input file 2026-07-30 23:27:57 +02:00
Simon MaertensandClaude Fable 5 947e0afc63 TESTING: raise SEP thresholds to cover xSTEIN's orthogonality bound
xSTEIN reorthogonalizes only eigenvectors whose eigenvalues lie within
1e-3*|T|; pairs just past that cutoff are orthogonal only to
O(ulp*|T|/gap), so test 21 of xCHKST legitimately reaches about
1000*H(n-1)/n =~ 500 at n=3.  Seen in-suite: 53.7 (csep/cse2, n=5,
type 21); handcrafted worst cases reach 170.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 19:17:53 +02:00
Simon MaertensandClaude Fable 5 7e1c743aef BLAS: Restore compact ROTMG flag output when no rescaling occurs
6dc1a78ea normalized DFLAG 0/1 to -1 for every regular result,
contradicting the documented compact DPARAM forms and failing the
xblat1 ROTMG tests at points 1-2. The ELSE IF guard alone is enough
to fix the #244 clobber, so keep the normalization inside the loops.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 18:40:36 +02:00
langou cf47d31736 Merge pull request #1343 from ACSimon33/extended_api_xerbla_tests
Fix extended API xerbla tests
2026-07-30 09:46:02 -06:00
Simon Maertens ab2a097f93 BLAS: Don't truncate routine names in extended API xerbla tests 2026-07-30 17:21:30 +02:00
Simon Maertens 12879438bd BLAS: Fix complex level 2 extended API xerbla tests 2026-07-30 17:21:29 +02:00
Simon Maertens 92dd179c2b CBLAS: Fix the expected routine name in xerbla tests for extended API builds 2026-07-30 16:59:48 +02:00
langou fb9b904cc2 Merge pull request #1342 from ACSimon33/dmd_test_singvqx_index
TESTING: scale the xGEDMDQ residual check by SINGVQX(KQ)
2026-07-30 08:07:39 -06:00
langou c3b628bfd7 Merge pull request #1341 from ACSimon33/cblas_testing_counts
CBLAS: count tests and report CBLAS results in the test summary
2026-07-30 08:05:52 -06:00
Simon MaertensandClaude Opus 5 e5757e68ee TESTING: scale the xGEDMDQ residual check by SINGVQX(KQ)
SINGVQX is only filled to KQ, so SINGVQX(K) read uninitialized memory
whenever DGEDMD's rank K exceeded DGEDMDQ's KQ -- harmless in the
default API by luck, an abort in the _64 build. cchkdmd/zchkdmd
already use KQ.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 15:13:24 +02:00
Simon Maertens ff94382e72 Whitespace fix 2026-07-30 15:12:47 +02:00
Simon Maertens 4b40962a13 Added JUnit XML output to lapack_testing.py script. 2026-07-30 15:10:28 +02:00
Simon Maertens 25fa8f2f6b Merge branch 'master' into cblas_testing_counts 2026-07-30 13:14:51 +02:00
langou c08a083be7 Merge pull request #1340 from ACSimon33/cblas_xerbla_unify
CBLAS: unify the XERBLA name/INFO logic between the library and the test harness
2026-07-29 19:27:08 -06:00
langou 48d198aadb Merge pull request #1339 from ACSimon33/blas_testing_counts
Report BLAS test counts and summarize the BLAS tests in `lapack_testing.py`
2026-07-29 19:26:23 -06:00
Simon Maertens 54964f8f88 Use --merge-apis in the CTest and Makefile test summaries 2026-07-29 17:19:51 +01:00
Simon Maertens fdc78becbc lapack_testing.py: add --merge-apis to combine identical API sections
Collapses a library's two API sections into one table when they report
the same errors. Compared per output file, so a missing file or two
different failures with equal totals keep the sections split.
2026-07-29 16:04:10 +01:00
Simon MaertensandClaude Opus 5 6e157dd062 lapack_testing.py: analyze the CBLAS test output
Add the CBLAS suite as its own library, alongside LAPACK and BLAS:

  - A test case per precision and BLAS level. The CBLAS inputs carry no
    output file name, so the same input serves both APIs and the harness
    redirects the output for every level, unlike the BLAS Level 2 and 3
    drivers.
  - --cblas-dir, defaulting to CBLAS/testing, which is the correct
    relative path from both a CMake build root and the source tree. A
    missing directory is skipped silently, since CBLAS is off by
    default.
  - The verdict and count patterns accept the COLUMN-MAJOR and ROW-MAJOR
    tags the CBLAS drivers add, which the BLAS drivers do not emit.

The parser itself is shared with BLAS: both suites report their counts
in the same form, so only the layout tags and the test tables differ.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:09 +01:00
Simon MaertensandClaude Opus 5 a88a328c9f CBLAS: count tests in the Level 1 drivers
Like their BLAS counterparts, the Level 1 testers print only a PASS line
or a bare FAIL per subprogram, with no counts and no footer. Report:

     CBLAS_SDOT      COMPUTATIONAL TESTS:       16 RUN,        0 FAILED

One test is one element comparison in STEST or ITEST1; CTEST delegates
to STEST and is not counted separately. The counters travel in a new
/CNTBLA/ block and the subprogram name reaches the main program from
HEADER through /NAMBLA/, matching the BLAS Level 1 drivers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:08 +01:00
Simon MaertensandClaude Opus 5 8250cb5ce2 CBLAS: count error-exit tests
The C error-exit checkers report only a pass/fail verdict per routine.
Report the counts too, matching the Fortran drivers:

     cblas_sgemv      ERROR-EXIT TESTS:       13 RUN,        0 FAILED

One test is one chkxer() call. A test fails either because the routine
never reached xerbla, which chkxer already detects through cblas_lerr,
or because c_xerbla.c was reached with the wrong routine name, which
clears cblas_ok without chkxer noticing. The extended API build hits
exactly that second case, reporting cblas_sgemv_64 against an expected
cblas_sgemv, so a new cblas_xbad flag carries it across and the counts
agree with the verdict.

The Windows path that skips the xerbla tests returns before printing a
verdict and so prints no counts either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:07 +01:00
Simon MaertensandClaude Opus 5 1be34149cb CBLAS: count computational tests in the Level 2 and 3 drivers
Report how many tests each routine ran and how many failed, in the same
shape as the BLAS drivers, tagged with the data layout so the two passes
stay distinguishable:

     cblas_sgemv      COLUMN-MAJOR COMPUTATIONAL TESTS:  3456 RUN, 0 FAILED
     cblas_sgemv      ROW-MAJOR    COMPUTATIONAL TESTS:  3456 RUN, 0 FAILED

As in the BLAS drivers, NTESTS and NFAILS sit beside the existing
ERRMAX, are incremented where ERRMAX accumulates, and are reported at
the common exit so every verdict path carries them. The paths that set
FATAL bump them too, so an aborting routine cannot report zero failures.

Existing output lines are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:06 +01:00
Simon MaertensandClaude Opus 5 6d6643bdb5 CBLAS: report the data layout in the complex Level 2 verdicts
c_sblat2.f, c_dblat2.f and all four Level 3 drivers dispatch on IORDER
and report the column-major and row-major passes with distinct wording.
c_cblat2.f and c_zblat2.f never got that dispatch, so they print two
textually identical lines per routine:

     cblas_cgemv  PASSED THE COMPUTATIONAL TESTS (  3460 CALLS)
     cblas_cgemv  PASSED THE COMPUTATIONAL TESTS (  3460 CALLS)

There is no way to tell which layout a verdict belongs to, or to notice
that one of the two is missing. Add the dispatch, reusing the wording
and the 10000..10003 labels the other drivers already use. Those labels
also name the layout banner in the main program, which is fine: FORMAT
labels are local to a program unit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:02 +01:00
Simon Maertens f0b01be34a Ignore shared libraries and debugging info anywhere in the tree 2026-07-29 14:16:09 +02:00
Simon Maertens d270dac898 Apply const where possible. Use CBLAS_XERBLA_API_PREFIX instead of plain "cblas_" 2026-07-29 12:52:44 +02:00
Simon Maertens 745782750e Report the cblas routine in xerbla with the _64 suffix in extended API builds 2026-07-29 12:38:57 +02:00
Simon Maertens b22eed6a58 Fix indent 2026-07-29 11:24:08 +01:00
Simon Maertens 054422e6d3 Remove unnecessary comments in CMake 2026-07-29 11:24:07 +01:00
Simon MaertensandClaude Opus 5 c56597bfbf lapack_testing.py: analyze the BLAS test output
The BLAS tests run under both build systems but nothing reported on
them: the script knew only the LAPACK drivers and scanned only the
LAPACK testing directory.

Add the BLAS suite as its own library:

  - A test case per precision and BLAS level, with the Level 1 drivers
    marked as reading no input, and the Level 2 and 3 drivers marked as
    opening their own output file.
  - parse_blas, which takes run and failure counts from the driver's
    report lines. Computational failures are numerical errors and
    error-exit failures are other errors.
  - --blas-dir, defaulting to BLAS/TESTING. That relative path is
    correct from a CMake build root and from the source tree alike, so
    no existing invocation needs changing. A missing directory is
    skipped silently, since builds against an optimized BLAS have none.
  - --run support, which needs the input-less Level 1 drivers handled
    and the output redirection suppressed for Level 2 and 3. A _64 run
    of Level 2 or 3 requires the generated _64 input; without it the
    driver would write over the default-API output, so it is skipped
    with a message instead.

The drivers exit 0 even when they abandon a run, and print END OF TESTS
even when routines failed, so breakage is read from the text: an
abandoned or misconfigured run, and a Level 2 or 3 file that never
reached its footer, each count as one other error. Detail lines behind
an already counted verdict are shown but not counted, which otherwise
inflates a failing file several fold.

Output from a build whose drivers do not report counts is still
summarized, by counting one test per verdict. That is coarse, but never
silently zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:24:06 +01:00
Simon MaertensandClaude Opus 5 8bcfbf8d33 lapack_testing.py: report each library in its own summary section
The script is built around a single testing directory and a single set
of test families. Adding another test suite means teaching it that a
test case belongs to a library, that each library has its own directory,
and that each gets its own section of the summary table.

Introduce that structure without changing what is analyzed:

  - TestCase gains a library field, defaulting to LAPACK.
  - The testing directories are held in a per-library mapping, which
    read_output_file, run_test_case and the unrecognized-output scan now
    resolve through instead of assuming one directory.
  - find_unrecognized_outputs takes that mapping and matches each
    directory against only the cases of the library that owns it, so
    --fail-on-unrecognized stays accurate once more directories exist.
  - discover_suffixes takes the cases and directory of one library, so
    the extended API is detected per library rather than globally.
  - The summary loop iterates over (library, API) sections, and
    section_title names both.
  - -t gains a lapack value selecting all LAPACK families, so the
    previous default remains expressible once other libraries are added.

The only visible change is that section headings now read
"LAPACK: Default API" rather than "Default API". Analyzed output is
otherwise byte for byte identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:24:05 +01:00
Simon MaertensandClaude Opus 5 a3e6a89dd6 BLAS: capture the Level 1 test output in CMake builds
The Level 1 tests are registered with neither -DINPUT nor -DOUTPUT, so
xblat1s writes to stdout and the harness lets it go to the ctest log
only. No .out file is produced, and the four Level 1 results per
precision cannot be summarized after the fact.

Pass -DOUTPUT for the no-input branch, giving {s,d,c,z}blat1.out in the
testing binary directory. These are the names BLAS/TESTING/Makefile's
run target already produces, so both build systems now yield the same
set of files.

The Level 2 and 3 branch deliberately keeps no -DOUTPUT: those drivers
OPEN their own summary file on unit 6, and redirecting stdout onto the
same path would put two writers on one file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:24:04 +01:00
Simon MaertensandClaude Opus 5 9429724146 BLAS: count tests in the Level 1 drivers
The Level 1 testers print "----- PASS -----" or a bare FAIL per
subprogram, with no counts and no footer at all, so a summary tool can
only say which subprograms failed, not how much was checked. Report the
same line the Level 2 and 3 drivers now do:

     SDOT   COMPUTATIONAL TESTS:       16 RUN,        0 FAILED

One test is one element comparison in STEST, TESTDSDOT or ITEST1. CTEST
converts complex pairs and delegates to STEST, so it is not counted
separately.

The counters live in a new /CNTBLA/ block rather than in /COMBLA/,
because ?B1NRM2 takes N and INCX as arguments and could not declare
/COMBLA/ without a name collision. The subprogram name reaches the main
program from HEADER through /NAMBLA/, mirroring /SRNAMC/ in the Level 2
and 3 drivers.

?B1NRM2 failures never cleared PASS, so a case could print NRM2 failure
lines and "----- PASS -----" together. They are counted as failures,
which makes them visible for the first time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:24:04 +01:00
Simon MaertensandClaude Opus 5 ca1e0166df BLAS: count error-exit tests in the Level 2 and 3 drivers
?CHKE reports only a pass/fail verdict per routine, with no indication
of how many error exits it checked. Report those counts too, in the same
shape as the computational ones:

     SGEMV      ERROR-EXIT TESTS:        6 RUN,        0 FAILED

One test is one CHKXER call. CHKXER is called between 96 and 229 times
per driver, so threading counters through its argument list is not an
option; they travel in a new /XERCNT/ block instead, following the
/INFOC/ and /SRNAMC/ pattern these files already use.

A test fails in two distinct ways. Either the routine never called
XERBLA, which CHKXER already detects through LERR; or XERBLA was called
with the wrong INFO or the wrong routine name, which clears OK inside
XERBLA without CHKXER ever noticing. The second case is not theoretical:
it is what the extended API drivers hit, where the BLAS reports SRNAME
as CGEMV_ against an expected CGEMV. NXBAD carries that across so the
counts agree with the verdict instead of reporting zero failures beside
a FAILED line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:24:03 +01:00
Simon MaertensandClaude Opus 5 447a75e381 BLAS: count computational tests in the Level 2 and 3 drivers
The Level 2 and 3 testers report a per-routine verdict and a cumulative
count of BLAS calls, but never how many tests they ran or how many of
them failed. The call count is also absent from the hard-failure path,
so it shrinks exactly when something goes wrong, and nothing downstream
can tell a clean run from a broken one without reading the prose.

Each ?CHKn already computes a test ratio per accuracy check and compares
the worst of them against the threshold; it just discards the rest. Keep
NTESTS and NFAILS alongside the existing ERRMAX, incremented at the one
point where ERRMAX accumulates, and report them at the common exit so
the line appears on the PASSED, the COMPLETED/SUSPECT and the
FAILED ON CALL NUMBER paths alike:

     SGEMV      COMPUTATIONAL TESTS:     3456 RUN,        0 FAILED

A corrupted argument or a spurious error exit is not a threshold
failure, so those paths bump the counters where they set FATAL.
Otherwise a routine could abort and still report zero failures.

Every existing output line is unchanged; the report line is additive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 11:23:58 +01:00
Simon Maertens 3cd79c329f Remove unnecessary (int) casts of info return values in CBLAS tests 2026-07-28 21:59:49 +02:00
Simon MaertensandClaude Opus 5 6c493e6508 CBLAS: add a clang-format configuration
Describes the style the xerbla sources are written in: three-space
indent, Allman braces, 80 columns, and the return type on its own line
for definitions. Every option clang-format knows about is listed, with
the ones inherited from the LLVM base style commented out, so that the
uncommented lines are exactly what this style changes.

The file applies to all of CBLAS, but the older sources here do not
follow it, so format only the lines you touch, e.g. with
git clang-format.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:14 +02:00
Simon MaertensandClaude Opus 5 e2fd85389f CBLAS: use the shared XERBLA helper in the xerbla sources
Switch cblas_xerbla(), F77_xerbla_base() and the test harness over to
cblas_xerbla_internal.h. Two diagnostic bugs go away with the duplicated
code:

  - the row-major remap keyed off strstr(rout, "gemm"), which also
    matches gemmtr and so wrongly swapped its arguments 4 and 5;

  - the six-character name buffer truncated cblas_sgemmtr and
    cblas_sskewsyr2k in the library, while the harness used an
    eleven-character buffer and did not, so the two disagreed about the
    same routine.

The Fortran entry points now take FCHAR and read the argument number
through F77_INT consistently, honour the hidden string length instead of
assuming six characters, and carry doxygen comments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:14 +02:00
Simon MaertensandClaude Opus 5 bfadf61f2f CBLAS: add a shared helper header for XERBLA name and INFO handling
cblas_xerbla_internal.h collects the routine-name construction and the
row-major INFO remapping that the library and the test harness each
open-code today, so the two copies can no longer drift apart.

Relative to those copies the helper also trims the blank padding Fortran
supplies, drops the _64 suffix that BUILD_INDEX64_EXT_API rewrites into
the XERBLA name literals, matches operation names exactly rather than by
substring, and derives its buffer size from a named maximum so that long
names are clamped instead of silently truncated.

It has no user yet; the xerbla sources are switched over next.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:13 +02:00
Simon MaertensandClaude Opus 5 2ba64b0003 CBLAS: provide F77_INT and FCHAR to the testing headers
c_xerbla.c needs the Fortran integer and character types to declare
F77_xerbla(), but the testing sources deliberately do not include
cblas_f77.h: that header maps every F77_* name to the real BLAS symbol
while cblas_test.h maps them to the Fortran test wrappers, and 141 of
those names collide.

Copy the two fallbacks into cblas_test.h instead, alongside the
BLAS_FORTRAN_STRLEN_END and FORTRAN_STRLEN definitions it already
duplicates for the same reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:13 +02:00
Simon MaertensandClaude Opus 5 58cff20b27 CBLAS: add CBLAS_WEAK_SYMBOL and use it for the xerbla declarations
Replace the repeated

    void
    #ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
    __attribute__((weak))
    #endif

preamble on the cblas_xerbla(), cblas_xerbla_64() and F77_xerbla_base()
declarations with a single CBLAS_WEAK_SYMBOL macro.

Define it in cblas.h ahead of the cblas_64.h include: cblas_64.h declares
cblas_xerbla_64() with the macro, and its own include of cblas.h is a
no-op while cblas.h is still inside its own include guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:08 +02:00
langou 6737170823 Merge pull request #1338 from ACSimon33/fix-chkbl-missing-abs
Fix SGEBAL test failure
2026-07-28 13:09:44 -06:00
langou e2a3ec48ec Merge pull request #1337 from ACSimon33/cblas_rowmajor_error_exits
CBLAS: fix & enhance error handling for row-major layout
2026-07-28 10:54:03 -06:00
Simon MaertensandClaude Fable 5 f754f09454 CBLAS: reject invalid Trans values in row-major complex rank-k updates
The row-major branches of cherk/zherk and cher2k/zher2k mapped the
invalid CblasTrans to 'N', and those of csyrk/zsyrk and csyr2k/zsyr2k
mapped the invalid CblasConjTrans to 'N', silently computing a
different operation instead of rejecting the argument. The
column-major branches forward these values to the Fortran routine,
which reports them as an illegal second argument (parameter 3 of the
CBLAS call). Drop the bogus mappings so the invalid values reach the
row-major branches' existing error exits, which also report
parameter 3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 15:46:52 +02:00
Simon Maertens c749e19a2f CBLAS: correct row-major error diagnostics 2026-07-28 15:46:51 +02:00
Simon MaertensandClaude Fable 5 cf265acf5a CBLAS: test error exits under row-major layout
The error-exit testers only exercised the option arguments (Side,
Uplo, Trans, Diag) with CblasColMajor, so the diagnostics in the
row-major branches of the level-3 routines were never tested. Mirror
every column-major option-argument test under CblasRowMajor, add the
missing row-major N/K dimension tests for the syrk/herk/syr2k/her2k/
skewsyr2k families, turn the duplicated column-major blocks in the
spr/hpr sections into the intended row-major tests, and make the
mislabelled gemmtr ldb "row major" tests actually use CblasRowMajor.

The new tests expose wrong INFO values in the row-major branches of
cgemm (TransB) and the syrk/syr2k/herk/skewsyr2k families (Uplo), and
silently accepted invalid Trans values in the row-major branches of
the complex herk/her2k/syrk/syr2k routines; these are fixed in the
following commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 15:46:28 +02:00
Simon MaertensandClaude Fable 5 01218ae45d Add missing ABS in the error metric of schkbl/dchkbl
The relative-error denominator used MAX(A(I,J), AIN(I,J)) without
taking absolute values. For entries where both matrices are negative,
the subsequent clamp replaced the denominator with SFMIN, and the
difference divided by SFMIN overflowed to Infinity in single precision
(sbal.in example 11). The complex checkers already use CABS1 here.

sbal now reports the same finite largest error (0.100E+01, example 5)
as the other three precisions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 15:05:18 +02:00
langou cea993b201 Merge pull request #1336 from ACSimon33/lapack_testing_script_modernization
Modernize lapack_testing.py script
2026-07-26 19:10:27 -06:00
Simon Maertens 1fdd793af9 Comsolidated LIN test family 2026-07-27 00:05:42 +02:00
Simon Maertens b730744392 Refactor lapack_testing.py script, to fix several shortcomings and moderize the script as a whole 2026-07-26 18:47:05 +02:00
langou 7a7d7453ed Merge pull request #1334 from ACSimon33/windows_shared_lib_intelllvm
Fix shared LAPACKE library build on Windows with IntelLLVM compilers
2026-07-23 10:01:04 -06:00
langou d8b427ad63 Merge pull request #1335 from ACSimon33/windows_ci
Update Windows CI
2026-07-23 09:59:37 -06:00
Simon Maertens 467bb93f7e Split Windows CI job into 2 jobs (defaul API and extended API) to reduce the build time per job 2026-07-23 15:25:19 +01:00
Simon Maertens e073bf5f0a Fix shared LAPACKE library build on Windows with IntelLLVM compilers (link error LNK1170). 2026-07-23 12:22:07 +02:00
langou b11f5bd89d Merge pull request #1331 from ACSimon33/underflow_warning
Avoid computing ONE / HUGE(ZERO) unless it is needed.
2026-07-22 10:49:23 -06:00
langou a23bdceb22 Merge pull request #1332 from ACSimon33/lapacke_deallocation_order
Fixed wrong deallocation order in LAPACKE routines
2026-07-22 10:49:12 -06:00
langou ef0747856e Merge pull request #1333 from ACSimon33/mixed_enum_warnings
Fix mixed enum and integer sign change warnings
2026-07-22 10:48:52 -06:00
Simon Maertens f3a91b74f6 Remove redefined macros 2026-07-22 16:59:31 +01:00
Simon Maertens 549f4a6299 Fix mixed enum and integer sign change warnings by using explicitly typed invalid values in CBLAS tests. 2026-07-22 16:47:26 +01:00
Simon Maertens b904bef7ea Fixed wrong deallocation order in LAPACKE routines 2026-07-22 17:08:38 +02:00
Simon Maertens 81d28e7b13 Avoid computing ONE / HUGE(ZERO) unless it is needed. Some compilers (e.g., flang) warn about underflow when folding the expression. 2026-07-22 16:40:10 +02:00
langou 7093b0e439 Merge pull request #1330 from ACSimon33/constant_nan
NAG Fortran constant NaN propagation
2026-07-22 08:35:31 -06:00
Simon Maertens 651fe14d01 Disable constant propagation (NAG Fortran compiler) for extended API test sources which propagate NaNs 2026-07-22 11:09:53 +02:00
langou 99fe793bc0 Merge pull request #1276 from ACSimon33/refactor_ext_64_api
Index-64 extended API overhaul
2026-07-21 12:10:27 -06:00
langou 9324991fa7 Merge branch 'master' into refactor_ext_64_api 2026-07-21 11:02:11 -06:00
langou 14398a8125 Merge pull request #1329 from ACSimon33/constant_nan
Explicit NaNs with NAG Fortran and LAPACKE mangling issue fix
2026-07-21 10:56:55 -06:00
Simon Lukas MärtensandCopilot Autofix powered by AI 1ffc7344b0 Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-21 17:23:00 +02:00
Simon Maertens 4ff99a6b8f Fix variable / list name clash in extended API generator 2026-07-21 16:57:42 +02:00
Simon Maertens 3a33d2ea37 Replace unknown character 2026-07-21 16:54:21 +02:00
Simon Maertens 8caa798f9a Fix missing ?GELQF declaration in ?chklq 2026-07-21 16:38:52 +02:00
Simon Maertens 30cb700441 Minor readibility improvement 2026-07-21 16:24:27 +02:00
Simon Maertens d12f7ad148 Fix extended API CBLAS tests 2026-07-21 16:24:00 +02:00
Simon Maertens 4fc8389ed9 The include directory in the binary directory should take precedence over the one in the source. 2026-07-21 15:31:11 +02:00
Simon Maertens 7d732a4c54 Removed lapacke_mangling.h. The header is generated on the fly and the one that was checked into the repository interfered with the generated one. 2026-07-21 15:04:28 +02:00
Simon Maertens 3b108cbd6a Fixed constant NaN propagation for NAG Fortran compiler 2026-07-21 13:22:00 +02:00
Simon Maertens f012b82fd9 Merge branch 'master' into refactor_ext_64_api 2026-07-20 22:45:22 +02:00
langou c1c5b726be Merge pull request #1249 from martin-frbg/issue1223
Adjust line reflow in complex (GER/POR/SYR)FSX for ILP64 build
2026-07-15 03:30:25 -06:00
langou 1954919f2f Merge pull request #1260 from ACSimon33/export_import_cblas_globals
Fix CBLAS tests for shared Windows builds
2026-07-15 03:28:26 -06:00
langou bceadf3238 Merge pull request #1278 from ACSimon33/index_64_conversion_errors
Fix Index-64 conversion errors
2026-07-15 03:25:51 -06:00
langou ee81e65267 Merge pull request #1250 from martin-frbg/issue1118
Allow using gfortran even with the Cray PE_ENV set to something else
2026-07-15 03:23:35 -06:00
langou 379b30d311 Merge pull request #1245 from nakatamaho/fix/lartg-stable-complex-s
avoid large intermediates in complex LARTG
2026-07-15 03:22:29 -06:00
langou 31a1d7844b Merge pull request #1325 from langou/add_path_in_ilaenv_for_tzrzf_and_unmrz 2026-07-14 14:07:54 -06:00
langou 06060fb7f6 Merge pull request #1161 from scr2016/scr2016-dgecx-draft
adding GECXX to LAPACK
2026-07-14 10:09:40 -06:00
langou 212bf98263 add a return to line 2026-07-14 06:51:01 -06:00
langou 5b484b2ae5 Merge branch 'master' into scr2016-dgecx-draft 2026-07-14 06:39:18 -06:00
Julien Langou 0e9dea7351 add path for TRTRZ and UNMRZ in ILAENV 2026-07-14 04:17:11 -06:00
langou 693f114224 Merge pull request #1324 from Reference-LAPACK/revert-1295-issue1277
Revert "*evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I…"
2026-07-13 10:59:55 -06:00
langou e0b72f6a9f Merge pull request #1279 from ACSimon33/fix-external-declarations
Fix external declarations
2026-07-13 10:52:33 -06:00
Simon Lukas Märtens 1068fdbe9c Merge branch 'master' into fix-external-declarations 2026-07-13 18:19:35 +02:00
langou 7551f87f5e Merge pull request #1305 from jschueller/issue608
TGSJA: replace HUGE intrinsic with LAMCH('O')
2026-07-13 09:10:40 -06:00
langou d62eebccd4 Revert "*evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I…" 2026-07-13 08:11:05 -06:00
langou 9e55d36949 Merge pull request #1297 from jschueller/issue744
*drgev: relax eigenvalue consistency test
2026-07-13 06:31:33 -06:00
langou c0b35f8a83 Merge pull request #1323 from langou/remove_many_IF_statements_in_TRSM
Remove IF statement related to initial zeros in X for triangular multiplications and solves ( tbmv, tbsv, tpmv, tpsv, trmm, trmv, trsm, and trsv )
2026-07-13 06:20:27 -06:00
langou ee358af929 Merge pull request #1322 from Reference-LAPACK/lapack__comments_in_geqrf
comments in geqrf based on #1304 and #257
2026-07-13 06:20:12 -06:00
langou 6bf019efd1 Merge pull request #1298 from jschueller/issue973
*chklq: fix test failures when NB=1 with M=N
2026-07-13 06:09:06 -06:00
langou 05a6d9f4e9 Merge pull request #1295 from jschueller/issue1277
*evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I…
2026-07-13 03:30:18 -06:00
langou 9cf8bd2378 Merge pull request #1288 from jschueller/issue1108
slaruv/dlaruv: fix seed advancement on rejected uniform deviate
2026-07-13 03:09:45 -06:00
langou 76bb13e396 Merge pull request #1290 from jschueller/issue938
slarfgp/dlarfgp: avoid overflow when computing 1/ALPHA
2026-07-13 03:07:53 -06:00
Julien Langou 114140a8ba remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:55:23 -06:00
Julien Langou ba20cd239b remove the IF (A(J,K).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:47:44 -06:00
Julien Langou acff87b05a remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:37:27 -06:00
Julien Langou c9e94a06c5 remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:35:24 -06:00
Julien Langou 6e7b86cda4 remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:19:57 -06:00
Julien Langou ce673d064d remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:15:11 -06:00
Julien Langou b8607fe70f remove the IF (X(J).NE.ZERO) THEN that saves FLOPS but might prevent NaN propagation 2026-07-12 10:09:50 -06:00
Julien Langou 301097afd8 remove a TEMP = that is good to make the real arithmetic code looks like the complex arithmetic one but weird otherwise 2026-07-12 10:08:38 -06:00
Julien Langou e8785e4e1e remove all TEMP = ONE/A(J,J) and force explicit division like B(I,J)/A(J,J) instead of TEMP*B(I,J) 2026-07-12 09:54:04 -06:00
Julien Langou 38ccf80859 remove all IF (A(K,J).NE.ZERO) 2026-07-12 09:26:24 -06:00
Julien Langou f0aaa58e14 remove all (ALPHA.NE.ONE) in TRSM family 2026-07-12 09:09:04 -06:00
Julien Langou b7c0841b09 comments in geqrf based on #1304 and #257 2026-07-09 06:43:06 -06:00
langou 552873f0a9 Merge pull request #1306 from jschueller/issue977
{d/s}sytrf: fix documentation error in UPLO='U' factorization
2026-07-09 06:18:26 -06:00
langou 36c931cac2 Merge pull request #1304 from jschueller/issue257
{s/c/d/z}geqrf: document workspace query for empty matrices
2026-07-09 05:34:06 -06:00
langou d1e64796ed Merge pull request #1317 from jschueller/issue255_bis
{d/s}laed2/8: Increase deflation tolerance to match {d/s}lasd2/7
2026-07-09 05:32:29 -06:00
langou 6840252146 Merge pull request #1301 from jschueller/issue636
*trsm: remove zero-RHS skip for consistent NaN on singular matrix
2026-07-09 04:40:03 -06:00
langou fc09e73853 Merge pull request #1319 from langou/tmp_remove_extra_comments_introduced_in_PR1318
remove extra comments introduced in PR #1318
2026-07-08 08:48:00 -06:00
Julien Langou 46b06d80b6 remove extra comments introduced in PR #1318 2026-07-08 07:22:30 -06:00
langou fff42b8aeb Merge pull request #1318 from meng004/fix-lapacke-lacpy-rowmajor-729
Fix LAPACKE_?lacpy_work row-major triangular copy corrupting the untouched triangle (#729)
2026-07-08 07:18:02 -06:00
meng004 3a30b715ff Fix LAPACKE_?lacpy_work row-major triangular copy (#729)
The row-major branch transposed the full m-by-n matrix through
temporaries and copied the never-written complementary region of the
destination temporary back over B, corrupting the triangle uplo requires
to be preserved and reading uninitialized memory. Call the Fortran kernel
directly with uplo swapped (U<->L) and m/n swapped, exactly as the
correct column-major path does. Applies identically to s/d/c/z.
2026-07-06 15:03:58 +00:00
Julien Schueller 9e64af6288 {d/s}laed2/8: Increase deflation tolerance to match {d/s}lasd2/7
The eigenvalue divide-and-conquer helper routines DLAED2/SLAED2 and
DLAED8/SLAED8 used a deflation tolerance of 8*EPS, while the SVD
routines DLASD2/SLASD2 and DLASD7/SLASD7 now use 64*EPS (since
PR #1286). The downstream eigenvector computation in DLAED3 divides
by eigenvalue differences (DLAMBDA(I) - DLABMDA(J)), causing the same
catastrophic cancellation when close eigenvalues escape deflation with
the tighter tolerance.

Raise all four routines to 64*EPS (EIGHT*EIGHT*EPS), matching the SVD
path, so close eigenvalues are deflated and the eigenvector computation
remains stable.

Follow-up for #255
2026-06-30 22:50:07 +02:00
langou 98e5d7a237 Merge pull request #1315 from sameer-amd-in/issue1314
{s/c/d/z}larf{/1f/1l}: fix negative increment vector handling
2026-06-24 02:20:05 -06:00
samahmad 77abd25204 {s/c/d/z}larf{/1f/1l}: fix negative increment vector handling
Handle negative increment values in vector offsetting.

Change-Id: I2a0993e1ec22f8029d49d30d18be0152db480ded
2026-06-23 22:06:06 -07:00
Julien Schueller 683f28cd41 {s/c/d/z}geqrf: document workspace query for empty matrices
Clarify that the workspace query returns a valid LWORK (>= 1) even
when MIN(M,N) = 0. The code already handles this correctly; this
is purely a documentation update.
2026-06-15 20:37:06 +02:00
langou 122f8924ed Merge pull request #1309 from amilsted/issue_995 2026-06-15 12:23:09 -06:00
Ashley Milsted b7966d4acd Scale FAIL with SPDIAM in xLARRF. Fixes #995. 2026-06-15 10:38:52 -07:00
langou 0f819939d2 Merge pull request #1307 from jschueller/issue326
DLASQ3, SLASQ3: stop modifying QMAX
2026-06-15 05:47:52 -06:00
Julien Schueller 3e177d2306 DLASQ3, SLASQ3: document QMAX as in/out
Closes #326
2026-06-15 13:37:49 +02:00
langou 966a012664 Merge pull request #1296 from jschueller/arm
CI: Enable ubuntu/arm
2026-06-15 01:13:15 -06:00
Julien Schueller bfd0a585c9 {d/s}sytrf: fix documentation error in UPLO='U' factorization
Correct the decomposition formula from U**T*D*U to U*D*U**T
in the doc header and comments for dsytrf.f and ssytrf.f.
The complex variants (csytrf, zsytrf) already used the correct form.

Closes #977
2026-06-13 17:31:41 +02:00
Julien Schueller b962ce0d84 TGSJA: replace HUGE intrinsic with LAMCH('O')
Replace the Fortran intrinsic HUGE with SLAMCH('O')/DLAMCH('O')
for consistency with the rest of LAPACK.  HUGENUM is changed from
a compile-time PARAMETER to a runtime assignment since LAMCH is a
function call.

Closes #608
2026-06-13 17:29:56 +02:00
Julien Schueller 4c6ffa55b3 *trsm: remove zero-RHS skip for consistent NaN on singular matrix
The left-solving non-transposed path in DTRSM/S/CTRSM/ZTRSM has an
optimization that skips the division B(K,J)/A(K,K) when B(K,J) is
exactly zero. When A(K,K) is also zero (singular matrix), this
leaves B(K,J)=0 instead of computing 0/0=NaN, producing inconsistent
results across different calling variants of the same triangular
solve.

Closes #636
2026-06-13 13:39:33 +02:00
Julien Schueller 063ccf0a1d *chklq: fix test failures when NB=1 with M=N
The LQ test drivers (dchklq, schklq, cchklq, zchklq) called DGELS/SGELS
which re-factorizes AF internally using GEQRF when M>=N. This corrupted
the LQ factorization expected by subsequent LQT02/LQT03 calls on later
K iterations, causing test(1) and test(2) failures.

Fix by re-copying A to AF and re-factorizing with GELQF after the GELS
call, restoring the LQ factorization for the remaining tests.

Closes #973
2026-06-13 12:52:10 +02:00
Julien Schueller 390567a6fd *evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on IEEE machines
The *evr and *stevr routines now call CSTEMR/DSTEMR/SSTEMR with the
user-specified RANGE argument on IEEE-754 compliant machines, instead of
only using the fast path when the full spectrum is requested
(ALLEIG or IL=1, IU=N). Partial eigenvalue ranges with eigenvectors
now also benefit from the faster algorithm.

Fix a bug where WANTZ=.FALSE. with a partial range on IEEE machines
would incorrectly set M=N and skip the DSTEBZ fallback, because INFO
remained 0 from initialization when SSTERF was skipped (it can only
compute all eigenvalues). The IF(INFO.EQ.0) success check is now
moved inside each computational branch so it only triggers when
SSTERF or CSTEMR was actually called and succeeded.

Closes #1277
2026-06-13 12:47:29 +02:00
Julien Schueller 1f7b0760a9 *drgev: relax eigenvalue consistency test
The ZGGEV/DGGEV/SGGEV/CGGEV test drivers compared eigenvalues
from full (both L/R eigenvectors) and partial (eigenvalues only)
computations using exact Fortran .NE. This is fragile because the
QZ algorithm applies orthogonal transformations to a different
scope of columns depending on the JOB parameter ('S' vs 'E'),
causing 1-ULP differences in eigenvalues on some architectures.

Replace the binary ULPINV sentinel with a relative tolerance
comparison: RESULT(5/6/7) now reports the maximum relative
difference across ALPHA/ALPHAI/BETA, which is compared against
the regular THRESH threshold.  Fixes the spurious failure on
Intel Xeon E5-2698 v4 and other platforms.

Closes #744
2026-06-13 12:40:05 +02:00
Julien Schueller ad435c2ad3 CI: Enable ubuntu-24.04-arm 2026-06-13 12:23:25 +02:00
langou fbd4146ce5 Merge pull request #1286 from jschueller/issue255
dlasd2/slasd2: Increase deflation tolerance to match dlasd7/slasd7
2026-06-13 04:02:37 -06:00
langou 1b2cbb7649 Merge pull request #1293 from jschueller/issue965
dbbcsd/sbbcsd/cbbcsd/zbbcsd: fix insufficiently accurate U2 in CS dec…
2026-06-13 03:58:48 -06:00
langou 048d12f150 Merge pull request #1292 from jschueller/issue546
ormqr/ormlq/ormrq/ormql, unmqr/unmlq/unmrq/unmql: fix minimum workspa…
2026-06-13 03:57:23 -06:00
langou 21af89cef0 Merge pull request #1287 from jschueller/issue734
LAPACKE/tprfb_work: fix row-major A dimensions for SIDE='R'
2026-06-13 03:55:39 -06:00
langou e938bbbe24 Merge pull request #1285 from jschueller/issue242
bdsqr: Fix INFO return when NCVT=NRU=NCC=0
2026-06-13 03:54:01 -06:00
langou f5340708e6 Merge pull request #1294 from changangela/fix-lapacke-nancheck-overflow
Fix integer overflow in LAPACKE nancheck helpers for large matrices
2026-06-12 01:55:18 -06:00
langou 192037884c Merge pull request #1261 from ACSimon33/fix_warnings
Fix Intel Classic build on Windows and various warnings
2026-06-12 01:42:07 -06:00
langou 078d8978db Merge pull request #1280 from ACSimon33/cherry-pick-7872e2d6
Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64
2026-06-12 01:38:54 -06:00
langou fd8e6db995 Merge pull request #1289 from jschueller/issue676
gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ
2026-06-12 01:37:02 -06:00
langou d5dbabe3f5 Merge pull request #1291 from jschueller/issue549
dorcsd2by1/uncsd2by1: avoid OOB access with zero rows
2026-06-12 01:34:55 -06:00
Yue Chang 23b489104f Fix integer overflow in LAPACKE nancheck helpers for large matrices
Offset computations like j*lda overflow 32-bit lapack_int once
n = lda >= 46341, e.g. LAPACKE_dpotrf crashes in its NaN check before
the factorization runs. Cast to size_t (or int64_t for the tz offsets)
the same way ge/gb/tp/tf already do.
2026-06-12 01:41:44 -04:00
Julien Schueller a73f4a6524 dbbcsd/sbbcsd/cbbcsd/zbbcsd: fix insufficiently accurate U2 in CS decomposition
The Golub-Reinsch-SVD-style iteration in xBBCSD used an absolute
convergence threshold THRESH ~ 90*EPS to decide when off-diagonal
bulges are negligible and can be skipped.  For rows where the
diagonal entries are small (tiny singular values in the ratio),
this absolute threshold is too large relative to the diagonal,
causing the algorithm to stop chasing bulges prematurely and
producing inaccurate singular vectors (||X21 - U2 D2 V^*|| up to
50*EPS ||X21||).

Fix: change all bulge-convergence checks (RESTART flags in the
inner loop, initial bulge-chase decisions, and the IMAX-1 cleanup)
from absolute to relative by scaling THRESH by the adjacent diagonal
entries:

  RESTART11 = |B11E|^2+|BULGE|^2 <= (THRESH * MAX(|B11D(I-1)|,|B11D(I)|,UNFL))^2

This mirrors DBDSQR's relative convergence check |E| <= TOL*|D|.
Applied to all 4 bidiagonal blocks (B11/B21/B12/B22) at all 3
check-points in the iteration.

Fixes #965
2026-06-11 19:15:11 +02:00
Julien Schueller 05628e3e0d ormqr/ormlq/ormrq/ormql, unmqr/unmlq/unmrq/unmql: fix minimum workspace for tiny M,N,K
The workspace query formula LWKOPT = NW*NB + TSIZE used TSIZE = LDT*NBMAX
= 65*64 = 4160, a hardcoded constant.  The blocked algorithm only stores
one T matrix block at a time (reused across loop iterations), so the
per-iteration workspace is LDT*NB, not LDT*NBMAX.  For tiny M,N,K where
a single block suffices (NB >= N or NB >= K), LWKOPT was always >= 4160
regardless of problem size.

Fix: change LWKOPT = NW*NB + TSIZE  ->  LWKOPT = NW*NB + LDT*NB.

The NB adjustment formula when LWORK is limited must consistently use
the per-iteration T storage instead of TSIZE:

  NB = (LWORK - TSIZE) / LDWORK  ->  NB = LWORK / (LDWORK + LDT)

Applied to all 16 routines (s,d,c,z x {orm,unm}{qr,rq,lq,ql}).

Closes #546
2026-06-11 17:06:32 +02:00
Julien Schueller 6649f3999f dorcsd2by1/uncsd2by1: avoid OOB access with zero rows
When P=0 and M=Q (U2 is M-by-M, X21 is M-by-M and orthogonal),
or P=M and M=Q (U1 is M-by-M, X11 is M-by-M and orthogonal),
or Q=0, the minimal dimension R = MIN(P, M-P, Q, M-Q) is zero,
so C and S are empty.  In these degenerate cases the preceding
code entered the R == P or R == M-P branch and called the
bidiagonalization subroutines (SORBDB2/SORBDB3) which then
accessed elements X21(I,I+1) or X11(I,I+1) out of bounds in
the second DO loop (I = P+1, Q or I = M-P+1, Q).

Fix: handle R = 0 directly in the four driver routines before
the case-dependent bidiagonalization path.  The three trivial
CSD cases are:

  Q = 0:     set U1 = I, U2 = I, return.
  P = 0, M = Q:  copy X21 to U2, set V1T = I, return.
  P = M, M = Q:  copy X11 to U1, set V1T = I, return.

All other R=0 configurations are non-standard and still fall
through to the existing path (which may fail).

Fixes #549
2026-06-11 16:58:16 +02:00
Julien Schueller 72b151245e slarfgp/dlarfgp: avoid overflow when computing 1/ALPHA
In the general case (xnorm > eps*|alpha|, beta >= 0), the
Householder reflector formula computes

  ALPHA = -XNORM^2 / (alpha + beta)

which can be subnormal even when beta itself is safely above
SMLNUM.  When this subnormal ALPHA was used in the subsequent

  CALL SSCAL( N-1, ONE / ALPHA, X, INCX )

the reciprocal overflowed (e.g. ALPHA = 2^-137 → ONE/ALPHA = 2^137
which exceeds SP max ~3.4e38).

Fix: guard the SSCAL with ABS(ALPHA) < SMLNUM.  When ALPHA is very
small, scale X by ONE/SMLNUM then by SMLNUM/ALPHA — both safe
since ONE/SMLNUM = BIGNUM is below the overflow threshold and
SMLNUM/ALPHA ≤ MAX_EXPONENT.

The complex variants (clarfgp/zlarfgp) are already safe because
they compute 1/ALPHA via CLADIV/ZLADIV, which internally handles
overflow/underflow without intermediate overflow.

Fixes #938
2026-06-11 16:33:37 +02:00
Julien Schueller ed7d20cd23 gelsy: fix ILAENV workspace query routines for TZRZF/UNMRZ
The workspace NB queries in all four ?gelsy variants used
?GERQF and ?UNMRQ, but the routines actually called at runtime
are ?TZRZF and ?UNMRZ (real) / ?UNMRZ (complex).

While ?GERQF and ?TZRZF are related (both produce an RQ-like
factorization), their block sizes may differ in ILAENV's tuned
values.  If the user relied on LWKOPT from the query to allocate
exactly the right workspace, the actual ?TZRZF/?UNMRZ calls could
underflow or overflow the work array.

Fix the ILAENV calls to match the routines actually invoked:
  ?GERQF -> ?TZRZF
  ?UNMRQ -> ?UNMRZ

Closes #676
2026-06-11 16:26:07 +02:00
langou 077667a1be Merge pull request #1284 from jschueller/cblas
Misc fixes
2026-06-11 08:14:19 -06:00
Julien Schueller 0ce0f75f76 slaruv/dlaruv: fix seed advancement on rejected uniform deviate
When the computed random value rounds to exactly 1.0 (once every
~2^24 single-precision calls), both SLARAN and SLARUV reject it and
recompute — but they advanced the seed differently:

  SLARAN:   ISEED(1:4) = IT1..IT4   (correct — carry forward the
                                       multiplier-transformed state)
  SLARUV:   I1 = I1 + 2              (wrong — ad-hoc skip in seed
                                       space)

SLARUV's +2 produces a different subsequent random sequence than
SLARAN would for the same initial seed.  Fix by using the same
seed advancement in both: set I1..I4 = IT1..IT4, matching SLARAN.

Applies to DLARUV as well.

Closes #1108
2026-06-11 16:12:55 +02:00
Julien Schueller fd020b441b LAPACKE/tprfb_work: fix row-major A dimensions for SIDE='R'
The row-major path hardcoded `lda_t = MAX(1,k)`, which is only correct
when SIDE='L' (A is K-by-N). When SIDE='R', A is M-by-K and the
transposition dimensions, allocation, and leading-dimension checks were
all wrong.

- Introduce nrowsA/ncolsA/nrowsV determined by SIDE (following the
  same pattern as the LAPACKE_?tpmqrt_work fix in PR #540).
- lda_t now uses nrowsA instead of always k.
- lda check compares against ncolsA instead of always m.
- A transpose uses (nrowsA, ncolsA) instead of (k, m).
- LDV check depends on STOREV: ldv >= nrowsV for STOREV='C',
  ldv >= k for STOREV='R'.
- V transpose uses nrowsV rows instead of ldv.

Closes #734
2026-06-11 16:08:45 +02:00
Julien Schueller 0e0f23592e dlasd2/slasd2: Increase deflation tolerance to match dlasd7/slasd7
Fix DBDSDC/SBDSDC returning non-orthogonal U/V for bidiagonal matrices
with many nearly-equal singular values (e.g., all singular values ≈ 1).

The divide-and-conquer bidiagonal SVD has two code paths:
- Full vector path (DLASD2/SLASD2): deflation tolerance = 8 * EPS
- Compact path  (DLASD7/SLASD7): deflation tolerance = 64 * EPS

With the weaker tolerance (8*EPS), singular values differing by only
~10*EPS (e.g., ~2e-15 for double precision) escape deflation.  The
subsequent Z computation in DLASD3 then suffers catastrophic
cancellation from denominators (σ_i - σ_j) that are tiny, polluting the
singular vectors and causing loss of orthogonality.

Raise DLASD2 and SLASD2 to 64*EPS, matching DLASD7 and SLASD7, so more
close singular values are deflated and the singular-vector computation
remains stable.

Closes #255
2026-06-11 15:56:56 +02:00
langou 92ef3aaeb8 Merge pull request #1259 from ACSimon33/fix_python_test_summary
Fix Python test summary
2026-06-11 07:47:29 -06:00
Julien Schueller 3ecbd1d097 bdsqr: Fix INFO return when NCVT=NRU=NCC=0
Problem: When NCVT = NRU = NCC = 0 (no singular vectors requested),
BDSQR calls the dqds algorithm. If dqds failed with INFO = 1 or 3,
the routine returned immediately with that error, even though the
standard QR algorithm could still compute the singular values. Only
INFO = 2 triggered the fallback.

Change `IF( INFO .NE. 2 ) RETURN` to `IF( INFO .EQ. 0 ) RETURN`
after the dqds call, so the standard QR fallback runs on any
dqds failure (INFO=1,2,3) and not only INFO=2.

Closes #242
2026-06-11 15:33:25 +02:00
langou 6e88a11703 Merge pull request #1251 from martin-frbg/issue1183
Optimize looping over the lower triangular in fat matrix cases of LACPY/LANTR/LASCL
2026-06-11 07:16:58 -06:00
Julien Schueller 283cf5b76d Make LAPACKE_[cz]tgexc pass ifst/ilst as pointer outputs
Per LAPACK docs, in [cz]tgexc, ilst is [in,out]. The LAPACKE C
interface was passing both ifst and ilst by value as input-only
scalars, so callers could never observe the updated ilst value.

Change both ifst and ilst to lapack_int* pointers in the complex
tgexc variants to match the real-precision stgexc/dtgexc interface
and the underlying Fortran semantics.

Fixes #771
2026-06-11 15:05:22 +02:00
Julien Schueller 91c0f61b87 Guard ?GEEV/?GEEVX undo-scaling against negative INFO
When ?HSEQR encounters non-finite input, it can return a negative
INFO. The undo-scaling block at label 50 then computes N-INFO (which
exceeds N) and indexes WR( INFO+1 ) (out of bounds), causing memory
corruption through ?LASCL.

Add INFO.GE.0 to the outer IF( SCALEA ) guard so the undo-scaling
block is skipped entirely when INFO is negative. The inner
IF( INFO.GT.0 ) guard only covered the second pair of ?LASCL calls.

Fixes #1128
2026-06-11 15:05:19 +02:00
Julien Schueller 6dc1a78eae Fix DROTMG/SROTMG rescaling overwriting DH12
When DFLAG=0 and both DD1 and DD2 need rescaling, the first
scaling loop transitions DFLAG from 0 to -1 and correctly
scales DH11 and DH12. But the second scaling loop then hits
the ELSE branch (matching DFLAG=-1) which unconditionally
resets DH21=-1 and DH12=1, overwriting the scaled DH12.

Change ELSE to ELSE IF (DFLAG.EQ.ONE) so the implied-element
initialization (DH21=-1, DH12=1) only fires when DFLAG=1,
not when DFLAG=-1 (where all elements are already explicit).

Fixes #244
2026-06-11 15:05:19 +02:00
Julien Schueller 526a4fbbd3 Fix mislabeled comments in dget38.f
Two comments in the DGEHRD/DHSEQR test incorrectly say "Compute
Schur form":
- The DGEHRD call reduces to upper Hessenberg form, not Schur.
- The DHSEQR call computes eigenvalues and the Schur form, so
  use a more descriptive label.

Fixes #587
2026-06-11 15:05:19 +02:00
Julien Schueller 3d668fe93f LAPACKE: Make LDU/LDVT checks in GESVD conditional on JOBU/JOBVT
When JOBU='N' or JOBVT='N', the U and VT matrices are not referenced,
so the leading dimension checks should be skipped.  Previously the
code rejected ldvt=0 (and ldu=0) even when those matrices were not
used, causing a spurious INFO=12 error on row-major calls with
JOBVT='N' (or INFO=10 for JOBU='N').

Fixes #1090
2026-06-11 14:39:38 +02:00
Julien Schueller fd16118505 cblas_ctrmm: fix error check
Closes #1188
2026-06-11 14:39:38 +02:00
Julien Schueller 7a721b3fac lapacke: fix memory allocation on error 2026-06-11 14:39:38 +02:00
Julien Schueller d296703051 lapacke_zgedmdq: fix routine name 2026-06-11 14:39:38 +02:00
Julien Schueller 8a43b6869a cblas_zgemmtr: Fix routine name 2026-06-11 14:39:38 +02:00
Julien Schueller ea7f51048f cblas_dgemmtr: Fix syntax error 2026-06-11 14:39:38 +02:00
langou 54b6620d27 Merge pull request #1264 from AymenQ/fix-complex-nrm2-inf-test
Fix complex NRM2 tests for matching infinite results
2026-06-11 04:15:19 -06:00
scr2016 5a4f0955d4 cgecxx.f: added lapacke interface
modified:   LAPACKE/include/lapack.h
	modified:   LAPACKE/include/lapacke.h
	modified:   LAPACKE/include/lapacke_64.h
	modified:   LAPACKE/src/CMakeLists.txt
	modified:   LAPACKE/src/Makefile
	new file:   LAPACKE/src/lapacke_cgecxx.c
	new file:   LAPACKE/src/lapacke_cgecxx_work.c
2026-06-11 02:01:32 -07:00
scr2016 3227cca8d8 zgecxx.f: added lapacke interface
modified:   LAPACKE/include/lapack.h
	modified:   LAPACKE/include/lapacke.h
	modified:   LAPACKE/include/lapacke_64.h
	modified:   LAPACKE/src/CMakeLists.txt
	modified:   LAPACKE/src/Makefile
	new file:   LAPACKE/src/lapacke_zgecxx.c
	new file:   LAPACKE/src/lapacke_zgecxx_work.c
2026-06-11 01:38:31 -07:00
scr2016 250e3fde67 sgecxx.f: added lapacke interface
modified:   LAPACKE/include/lapack.h
	modified:   LAPACKE/include/lapacke.h
	modified:   LAPACKE/include/lapacke_64.h
	modified:   LAPACKE/src/CMakeLists.txt
	modified:   LAPACKE/src/Makefile
	new file:   LAPACKE/src/lapacke_sgecxx.c
	new file:   LAPACKE/src/lapacke_sgecxx_work.c
2026-06-11 00:11:16 -07:00
scr2016 966342e40d dgecxx.f: added lapecke interface
modified:   LAPACKE/include/lapack.h
	modified:   LAPACKE/include/lapacke.h
	modified:   LAPACKE/include/lapacke_64.h
	new file:   LAPACKE/include/lapacke_mangling.h
	modified:   LAPACKE/include/lapacke_mangling_with_flags.h.in
	modified:   LAPACKE/src/CMakeLists.txt
	modified:   LAPACKE/src/Makefile
	new file:   LAPACKE/src/lapacke_dgecxx.c
	new file:   LAPACKE/src/lapacke_dgecxx_work.c
2026-06-10 23:07:49 -07:00
scr2016 d12b2bd748 changed location of (Z,C)ERRCXX declaration in (z,c)errcxx.f
modified:   TESTING/LIN/cchkcxx.f
	modified:   TESTING/LIN/zchkcxx.f
2026-06-02 00:55:19 -07:00
scr2016 ccb2daf5fd TESTING/LIN/schkcxx.f dchkcxx.f fixed typos in code comments
modified:   TESTING/LIN/dchkcxx.f
        modified:   TESTING/LIN/schkcxx.f
2026-06-02 00:49:31 -07:00
scr2016 626a56e75f added test code for SRC/cgecxx.f
modified:   TESTING/LIN/CMakeLists.txt
	modified:   TESTING/LIN/Makefile
	modified:   TESTING/LIN/cchkaa.F
	new file:   TESTING/LIN/cchkcxx.f
	new file:   TESTING/LIN/cerrcxx.f
	modified:   TESTING/LIN/clatb4.f
	modified:   TESTING/ctest.in
2026-06-02 00:39:35 -07:00
scr2016 e07a5fe438 TESTING/LIN/zchkcxx.f: fixed a typo in code comments
modified:   TESTING/LIN/zchkcxx.f
2026-06-02 00:01:55 -07:00
scr2016 f6dff25c8c TESTING/LIN/zchkcxx.f: added ZERRCXX declaration
modified:   TESTING/LIN/zchkcxx.f
2026-06-01 23:33:43 -07:00
scr2016 c77af53968 SRC/cgecxx.f added complex precision CX factorization routine
modified:   SRC/CMakeLists.txt
	modified:   SRC/Makefile
	new file:   SRC/cgecxx.f
	modified:   SRC/lapack_64.h
2026-06-01 22:35:17 -07:00
langou a66e2a37c4 Merge pull request #1252 from scr2016/refactor-github-workflow-file-cmake_yml--config
in .github/workflows/cmake.yml, removed redundant '--config ${{env.BUILD_TYPE}}' from 'cmake --build build'
2026-06-01 00:25:52 -06:00
scr2016 040441d824 added test code for SRC/zgecxx.f
modified:   TESTING/LIN/CMakeLists.txt
	modified:   TESTING/LIN/Makefile
	modified:   TESTING/LIN/zchkaa.F
	new file:   TESTING/LIN/zchkcxx.f
	new file:   TESTING/LIN/zerrcxx.f
	modified:   TESTING/LIN/zlatb4.f
	modified:   TESTING/ztest.in
2026-05-31 18:18:26 -07:00
scr2016 f36ff17acf SRC/zgecxx.f changed the description of LWORK, and fixed ZUNMQR transpose argument
Fixed ZUNMQR call transpose argumnet 'T' into conjugate transpose 'C'.

	modified:   SRC/zgecxx.f
2026-05-31 18:02:05 -07:00
langou 7e4e6bf07e Merge pull request #1039 from haox1/stebz
Fixes of STEBZ
2026-05-24 09:08:06 -06:00
langou 8515a319e7 Merge pull request #1283 from sergey-v-kuznetsov/fixes_for_issue-1282
Fixes for LAPACK test crashes -ffpe-trap
2026-05-21 03:08:53 -06:00
sergey-v-kuznetsov 40abea27f7 Fixes for LAPACK test crashes -ffpe-trap 2026-05-20 15:41:08 -07:00
Simon Maertens c0e868327e Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64 2026-05-13 14:03:03 +02:00
Simon Maertens db9aa259c7 Initialize complex variables with CMPLX, not just REAL 2026-05-13 13:57:42 +02:00
Simon Maertens 5da24275b9 Some reformatting to shorten lines below 72 characters with preprocessor replacements 2026-05-13 12:54:05 +02:00
Simon Maertens 83fdf63e7f Don't generate _64 suffixed sources for XBLAS related routines, because XBLAS doesn't ship extended APIs. 2026-05-13 11:30:20 +01:00
scr2016 778a5370b1 TESTING/LIN/(d,s)chkcxx.f improved comments for WORK parameter
modified:   TESTING/LIN/dchkcxx.f
        modified:   TESTING/LIN/schkcxx.f
2026-05-12 23:43:37 -07:00
scr2016 1ccf4a6640 TESTING/LIN/(d,s)chkcxx.f corrected the descriptio of WORK parameter
modified:   TESTING/LIN/dchkcxx.f
	modified:   TESTING/LIN/schkcxx.f
2026-05-12 22:14:03 -07:00
scr2016 7fbc3e7bb0 TESTING/LIN/(d,s)chkcxx.f changed how workspace is calculated 2026-05-12 18:43:30 -07:00
Simon Maertens ce313deecd Add missing external declarations in SRC (and removed unused ones) 2026-05-12 16:59:16 +01:00
Simon Maertens 57e7ee9724 Add missing external declarations in CBLAS/TESTING 2026-05-12 16:58:18 +01:00
Simon Maertens a3b6a89b5f Removed unnecessary external declarations in TESTING/EIG 2026-05-12 16:58:07 +01:00
Simon Maertens 0232856846 Add missing external declarations in TESTING/LIN (and removed unnecessary ones) 2026-05-12 16:57:21 +01:00
Simon MaertensandCopilot d653fbe98a Add missing EXTERNAL declarations in TESTING/EIG
Co-authored-by: Copilot <copilot@github.com>
2026-05-12 16:56:39 +01:00
Simon Maertens fb2905ff94 Fixed missing EXTERNAL declarations in LAPACK sources 2026-05-12 16:55:50 +01:00
Simon Maertens c131da97cb Fix -Wconversion errors in XBLAS sources during Index-64 builds 2026-05-12 16:41:01 +01:00
Simon Maertens 46ec5a4b1c Fix -Wconversion errors in single TESTING/LIN sources during Index-64 builds 2026-05-12 16:01:45 +01:00
Simon Maertens 9549c351ba Fix -Wconversion errors in single complex TESTING/LIN sources during Index-64 builds 2026-05-12 15:52:37 +01:00
Simon Maertens f9ade3eade Fix -Wconversion errors in single TESTING/EIG sources during Index-64 builds 2026-05-12 15:24:05 +01:00
Simon Maertens 9bbf60ca45 Fix -Wconversion errors in single complex TESTING/EIG sources during Index-64 builds 2026-05-12 15:04:26 +01:00
Simon Maertens acdcf84b5c Fix -Wconversion errors in CBLAS/testing during Index-64 builds 2026-05-12 12:01:26 +01:00
Simon Maertens e4dac9573a Fix -Wconversion errors in BLAS/TESTING during Index-64 builds 2026-05-12 11:49:28 +01:00
Simon MaertensandCopilot b9ee49b63d Merge branch 'master' into refactor_ext_64_api
Co-authored-by: Copilot <copilot@github.com>
2026-05-11 17:26:11 +02:00
Simon Maertens 04643e103e Added CI pipeline to test _64 extended API on its own. 2026-05-11 17:21:49 +02:00
langou 67c7c8ac05 Merge pull request #1274 from kyungminlee/fix-sggev3-query
Gate SGGEV3 workspace query on ILV, not ILVL
2026-05-11 07:54:43 -06:00
langou e014d6ce59 Merge pull request #1275 from kyungminlee/fix-dlaswlq-nb
Reject NB=0 in DLASWLQ argument validation
2026-05-11 07:38:43 -06:00
Kyungmin Lee 971961bd21 Gate SGGEV3 workspace query on ILV, not ILVL
The actual SLAQZ0 call uses 'S' when ILV is true and 'E' otherwise,
but the query gated that choice on ILVL, undersizing LWORK for
JOBVL='N', JOBVR='V'. Mirror DGGEV3: gate SLAQZ0 and SGGHD3 on ILV,
SORGQR on ILVL.
2026-05-11 04:58:16 -07:00
Kyungmin Lee f51069fa5e Reject NB=0 in DLASWLQ argument validation
DLASWLQ tested NB.LT.0 instead of NB.LE.0, accepting NB=0 silently and
falling into the divide-by-(NB-M) path on line 255 (KK = MOD((N-M),(NB-M)))
when M=0. The single/complex/double-complex siblings all use NB.LE.0.
2026-05-11 04:38:33 -07:00
langou 5da5348aa0 Merge pull request #1242 from nakatamaho/cleanup/con-lsame-norm
SRC: use LSAME for NORM checks in condition routines
2026-05-11 04:45:26 -06:00
langou 382c275cb1 Merge pull request #1273 from kyungminlee/fix-laqz0-xerbla-sign
Fix XERBLA sign in ?LAQZ0 LWORK check
2026-05-11 01:59:23 -06:00
langou a2303521f8 Merge pull request #1272 from kyungminlee/fix-info-position-drift
Fix INFO=-N in argument-validation
2026-05-11 01:59:04 -06:00
langou 6e881c3dce Merge pull request #1271 from kyungminlee/fix-stale-externals
Fix stale externals and documentation typo
2026-05-11 01:58:31 -06:00
langou 6d7772085a Merge pull request #1270 from kyungminlee/fix-dgejsv-lwork
Fix workspace size argument in DGEJSV inner DGESVJ call
2026-05-11 01:57:58 -06:00
langou 62b2396d7b Merge pull request #1269 from kyungminlee/fix-sgejsv-joba
Fix JOBA argument in SGEJSV inner SGESVJ call (LSVEC && RSVEC branch)
2026-05-11 01:12:32 -06:00
Kyungmin LeeandClaude Opus 4.7 b172f0b839 Fix XERBLA sign in ?LAQZ0 LWORK check
The argument-validation block at the top of ?LAQZ0 sets INFO=-i and
correctly calls XERBLA(name, -INFO), but the second validation block
(LWORK .LT. LWORKREQ) calls XERBLA(name, INFO) with the negative
value. XERBLA prints its argument verbatim, so this would emit
"parameter number -18 had an illegal value" instead of "18".

Affects S/D/C/Z LAQZ0; ?LAQZ2 and the rest of LAPACK already use
the correct -INFO form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 04:43:38 -07:00
Kyungmin LeeandClaude Opus 4.7 34fffb77e7 Fix INFO=-N in argument-validation
INFO=-N value reported to XERBLA on a too-small workspace
(or LRWORK) does not match the actual signature position of the
argument being tested.

Sites:
- ?ORBDB4 / ?UNBDB4: LWORK test reported -14 (WORK), should be -15.
- ?GGSVD3: LWORK.LT.1 test reported -24 (the INFO arg in S/D;
  IWORK in C/Z), should be -22 (LWORK).
- ?ORCSD / ?UNCSD: LWORK test reported -22 (LDU2), should be -28
  (LWORK). Z/C also report LRWORK as -24 (LDV1T), should be -30.
- C/ZLAQZ0: LWORK test reported -19 (RWORK), should be -18.
  (S/DLAQZ0 use ALPHAR+ALPHAI instead of ALPHA, so LWORK is at
  position 19 there and -19 is already correct.)
- C/ZLAQZ2: LWORK test reported -26 (RWORK), should be -25.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 04:39:07 -07:00
Kyungmin Lee effffd0f9a Add SGGES XERBLA EXTERNAL and fix ZRSCL doc-header typo
SGGES body calls XERBLA at line 423 but the EXTERNAL block omits it;
DGGES correctly lists XERBLA. Add it.

ZRSCL's Doxygen header advertised the routine as ZDRSCL (which is a
different routine that ZRSCL calls internally). Fix the brief, the
download links, and the filename references so the generated docs
correspond to ZRSCL.
2026-05-09 04:08:29 -07:00
Kyungmin Lee 12711abd19 Fix stale / missing EXTERNAL declarations in 6 routines
- dlaqp2.f:171: replace stale DLARF with DLARF1F
  (body calls DLARF1F; slaqp2 already declares SLARF1F).
- zhetrf_aa.f:166: drop stale ZGEMV
  (body calls only ZGEMM; chetrf_aa correctly omits CGEMV).
- zlahef_aa.f:173: drop stale ZGEMM
  (body calls only ZGEMV; clahef_aa correctly omits CGEMM).
- slaqr2.f:314: replace stale SLARF1L with SLARF1F
  (body calls SLARF1F).
- sgelqt.f:147: drop stale SGEQRT2 and SGEQRT3
  (body calls only SGELQT3 and SLARFB).
2026-05-09 04:07:17 -07:00
Kyungmin Lee 151acca477 Fix JOBA argument in SGEJSV inner SGESVJ call (LSVEC && RSVEC branch)
In the LSVEC && RSVEC branch of SGEJSV, the IF arm fills the strict
upper triangle of U with U(p,q) = -SIGN(TEMP1, U(q,p)) while the
ELSE arm zeros it via SLASET('U', ...). Both arms then call SGESVJ
on U with JOBA='L', which tells SGESVJ that U is lower triangular
and the strict upper is zero. After the IF arm that is not true:
SGESVJ silently drops the upper-triangular data the IF arm just
deposited, biasing the SVD result. JOBA='G' (general) is correct
for both arms; DGEJSV already uses 'G' at the matching call site.
2026-05-09 03:55:34 -07:00
Kyungmin Lee 4543266101 Fix workspace size argument in DGEJSV inner DGESVJ call
In the RSVEC && !LSVEC && !ALMORT branch of DGEJSV, the inner DGESVJ
call passes WORK(N+1) as the workspace base (offset by N) but the
full LWORK as the workspace size. DGESVJ may then write up to N
entries past the end of WORK(LWORK). The float sibling SGEJSV
correctly passes LWORK-N at the same call site.
2026-05-09 03:55:18 -07:00
langou fd5303c002 Merge pull request #1268 from kyungminlee/fix-typo
Fix typo in ZLA_SYRFSX_EXTENDED
2026-05-08 03:50:59 -06:00
langou ceb69d600f Merge pull request #1267 from kyungminlee/fix-max
Remove unused intrinsic MAX
2026-05-08 03:50:28 -06:00
langou ea1b145b04 Merge pull request #1266 from kyungminlee/master
Remove unused parameter ONE
2026-05-08 03:48:01 -06:00
Kyungmin Lee ead2f6c8b3 Fix typo in ZLA_SYRFSX_EXTENDED
XERBLA reports ZLA_HERFSX_EXTENDED. Fix the routine name
2026-05-07 21:35:54 -07:00
Kyungmin Lee f038bec2de Remove unused intrinsic MAX
Contrary to their single precision counterparts,
DLANSF and ZLANHT declare MAX intrinsic which is not used.
2026-05-07 21:30:03 -07:00
Kyungmin Lee e830eed287 Remove unused parameter ONE
There are a number of places on the double precision half with
unused parameter ONE.
2026-05-07 21:23:25 -07:00
scr2016 b4a0548f94 SRC/zgecxx.f: added COMPLEX*16 code for CXX
modified:   SRC/CMakeLists.txt
	modified:   SRC/Makefile
	modified:   SRC/lapack_64.h
	new file:   SRC/zgecxx.f
2026-05-07 14:48:47 -07:00
scr2016 05fc5d31f2 SRC/dgecxx.f and sgecxx.f edited comments in workspace calculation
modified:   SRC/dgecxx.f
	modified:   SRC/sgecxx.f
2026-05-07 13:42:26 -07:00
scr2016 d5f8b88837 SRC/dgecxx.f and sgecxx.f changed MAX to max in WORK and IWORK descript.
modified:   SRC/dgecxx.f
	modified:   SRC/sgecxx.f
2026-05-07 11:09:26 -07:00
scr2016 0e096623f2 SRC/dgecxx.f and sgecxx.f changed formattting in description of LWORK and LIWORK
modified:   SRC/dgecxx.f
	modified:   SRC/sgecxx.f
2026-05-07 10:11:52 -07:00
langou d6b82864ed Merge pull request #1265 from kyungminlee/master
Fix typo in ?orbdb3/?unbdb3
2026-05-07 05:39:30 -06:00
Kyungmin Lee eed4e74fcb Fix typo in ?orbdb3/?unbdb3
Bug: In ?ROT call LDX11 is passed as the leading dimension of X21.

Fix: use LDX21 as the INCY argument, matching how X21 is addressed
everywhere else in the same loop body.
2026-05-06 20:39:24 -07:00
Aymen Qader 6af853258b Fix complex NRM2 tests for matching infinite results
The extended complex NRM2 tests can compare an expected +Inf norm with
a computed +Inf norm. The relative-error path then evaluates Inf - Inf,
producing NaN and reporting a spurious failure.

Treat exactly equal results as zero test ratio before computing the
relative difference. This matches the existing SNRM2 and DNRM2 test
logic.

Fixes #1047.
2026-05-06 11:29:34 +01:00
scr2016 9c3d06a1b6 added single precision test code for SGECXX
modified:   TESTING/LIN/CMakeLists.txt
	modified:   TESTING/LIN/Makefile
	modified:   TESTING/LIN/schkaa.F
	new file:   TESTING/LIN/schkcxx.f
	new file:   TESTING/LIN/serrcxx.f
	modified:   TESTING/LIN/slatb4.f
	modified:   TESTING/stest.in
2026-05-05 11:18:44 -07:00
scr2016 656fbeb7a3 LIN/dchkcxx.f: chnaged comments for test 5.
modified:   LIN/dchkcxx.f
2026-05-05 11:03:09 -07:00
Simon Maertens 01b6937a37 NAG Fortran on Windows expected -i8 not /i8 2026-05-05 17:44:57 +02:00
scr2016 5c1c526b52 TESTING/LIN/dchkaa.F: added DCHKCXX to routine declaration
modified:   TESTING/LIN/dchkaa.F
2026-05-04 23:38:48 -07:00
scr2016 95f751d9e0 TESTING/LIN/dchkcxx.f: replaced constant 0D+0 with ZERO parameter
from
RESULT( 5 ) = 0D+0
to
RESULT( 5 ) = ZERO

	modified:   TESTING/LIN/dchkcxx.f
2026-05-04 23:10:41 -07:00
scr2016 0346d21074 TESTING/LIN/dchkcxx.f: removed more unsused routine declarations
modified:   TESTING/LIN/dchkcxx.f
2026-05-04 22:48:58 -07:00
scr2016 24e0eafe29 TESTING/LIN/dchkcxx.f: removed unused function declaration fro DLANGE
modified:   TESTING/LIN/dchkcxx.f
2026-05-04 22:39:09 -07:00
scr2016 0a260664a9 TESTING/LIN/dchkcxx.f: removed unused variable and routine declarations
also changed Definition sections in the top comments

	modified:   TESTING/LIN/dchkcxx.f
2026-05-04 22:25:49 -07:00
scr2016 bd16e52268 TESTING/LIN/dchkaa.F: fixed routine declaraiton truncation
modified:   TESTING/LIN/dchkaa.F
2026-05-04 22:23:59 -07:00
scr2016 b6c54a758f added single precision file SRC/sgecxx.f
Also included sgecxx.f in to
SRC/CMakeLists.txt
SRC/Makefile

and modified SRC/lapack_64.h to reflect the addition
SRC/sgecxx.f

	modified:   SRC/CMakeLists.txt
	modified:   SRC/Makefile
	modified:   SRC/lapack_64.h
	new file:   SRC/sgecxx.f
2026-05-04 20:49:19 -07:00
scr2016 26a38b10fb SRC/dgecxx.f: reordered the variables in variable declarations
cosmetic change
  modified:   SRC/dgecxx.f
2026-05-04 19:44:49 -07:00
Simon Maertens 5a79404258 Fix replaced string literals in _64 suffixed sources 2026-05-04 19:07:15 +02:00
Simon Maertens 9524bb79f0 Added _64 suffix to LAPACKE_lsame as well 2026-05-04 18:22:18 +02:00
Simon Maertens de3200808f Fix CMAKE while loops for older CMake versions 2026-05-04 18:17:39 +02:00
Simon MaertensandCopilot 0fdfcd6e8a Warn the user if Index-64 API is build as extended API and as the default API redundantly.
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 17:46:06 +02:00
Simon Maertens 3e31f5a146 Remove old WIndows complex settings 2026-05-04 16:49:37 +02:00
Simon MaertensandCopilot fdee741c8a Make sure to net generate 64bit suffixed source multiple times
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 16:49:03 +02:00
Simon Maertens 275bc4c7b3 Add some more CMake messages during configure 2026-05-04 15:08:22 +02:00
Simon MaertensandCopilot a32aa4b33d Added _64 suffixed CBLAS tests
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 15:05:05 +02:00
Simon Maertens 531e611e92 Added _64 suffixed BLAS tests 2026-05-04 14:52:10 +02:00
Simon Maertens a59517ba04 Added _64 suffixed CTests 2026-05-04 14:41:37 +02:00
Simon Maertens 932ae47213 Added _64 suffixed LAPACK test suite targets 2026-05-04 14:37:35 +02:00
Simon Maertens 84ec80d3c4 Added BUILD_DEFAULT_API guards around default CBLAS/LAPACKE examples 2026-05-04 14:36:42 +02:00
langou 8cd9026676 Merge pull request #1240 from nakatamaho/cleanup/lalsd-lsame-uplo
SRC: use LSAME for UPLO checks in lalsd
2026-05-03 06:48:09 -06:00
langou 71bf5ec123 Merge pull request #1239 from nakatamaho/cleanup/gttrs-lsame-trans
SRC: use LSAME for TRANS checks in gttrs
2026-05-03 06:14:36 -06:00
langou 20318b7f72 Merge pull request #1238 from nakatamaho/cleanup/pttrs-lsame-uplo
SRC: use LSAME for UPLO checks in pttrs
2026-05-03 05:18:55 -06:00
Simon Maertens b4ba901b29 Added API_SUFFIX to CBLAS tests 2026-05-02 18:05:38 +02:00
Simon Maertens 7872e2d6e6 Fixed CBLAS symbol name: cblas_zaxbpy_64 -> cblas_zaxpby_64 2026-05-02 18:05:38 +02:00
Simon Maertens b8c9a988df Add missing external declarations in SRC (and removed unused ones) 2026-05-02 18:05:38 +02:00
Simon Maertens d4fbf36e37 Add missing external declarations in CBLAS/TESTING 2026-05-02 18:05:38 +02:00
Simon Maertens a6c1fd8083 Removed unnecessary external declarations in TESTING/EIG 2026-05-02 18:05:37 +02:00
Simon Maertens d31bf01141 Add missing external declarations in TESTING/LIN (and removed unnecessary ones) 2026-05-02 18:05:33 +02:00
Simon MaertensandCopilot 80b4f5328f Add missing EXTERNAL declarations in TESTING/EIG
Co-authored-by: Copilot <copilot@github.com>
2026-05-02 18:05:02 +02:00
Simon Maertens 2eaac71bfd Fixed missing EXTERNAL declarations in LAPACK sources 2026-05-02 18:05:02 +02:00
Simon Maertens b92efb680a Added BUILD_DEFAULT_API CMake open to build only the 64bit extended API 2026-05-02 18:05:02 +02:00
Simon Maertens 530d74ca35 Added BUILD_DEFAULT_API CMake open to build only the 64bit extended API 2026-05-02 18:05:02 +02:00
Simon Maertens 01ad09c38b New 64bit extended APi generator works 2026-05-02 18:05:02 +02:00
Simon Maertens 76dee5d357 Added CMake helper which generate a 64bit suffixed Fortran source from the original source file 2026-05-02 18:05:02 +02:00
Simon Maertens d620756357 Bump required CMake version to 3.18 because we rely on Fortran_PREPROCESS 2026-05-02 18:05:02 +02:00
Simon Maertens e18912f647 Use CMAKE_POSITION_INDEPENDENT_CODE instead of enabling PIC for each target individually 2026-05-02 18:05:02 +02:00
Simon Maertens 5a687f4922 Remove the explicit __declspec(dllexport) since that is handles already by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 2026-05-02 18:05:02 +02:00
Simon Maertens 7cca0ea223 Skip cblas xerbla tests for shared Windows builds, since weak symbols are not supported and the trick to load the test xerbla first doesn't work on Windows when using shared libraries. 2026-05-02 18:05:02 +02:00
Simon Maertens 1092f35f41 Remove complex ?asum and ?nrm2 routines from real tests since they are already tested in the complex tests 2026-05-02 18:05:01 +02:00
Simon Maertens cd40e85a40 Remove unnecessary test_inlude directory in the build folder 2026-05-02 18:05:01 +02:00
Simon Maertens 3afa8276ef Fix export & import of global CBLAS symbols for shared Windows builds 2026-05-02 18:05:01 +02:00
scr2016 40f50c003e SRC/dgecxx.f: changed TAU parameter description
modified:   SRC/dgecxx.f
2026-04-30 17:47:46 -07:00
scr2016 2dc6a54930 SRC/dgecxx.f: Corrected the descriptions of K and TAU parameters.
modified:   SRC/dgecxx.f
2026-04-30 17:17:19 -07:00
scr2016 c90d404e5f SRC/dgecxx.f: Simplified quick return condition.
since min( M, N) = 0 implies min( MSUB, NSUB) = 0,

changed

From:

      IF( MIN( MINMN, MIN( MSUB, NSUB )).EQ.0 ) THEN
         K = 0
         MAXC2NRMK = ZERO
         RELMAXC2NRMK = ZERO
         FNRMK = ZERO
         RETURN
      END IF
To:
     IF( MIN( MSUB, NSUB ).EQ.0 ) THEN
         K = 0
         MAXC2NRMK = ZERO
         RELMAXC2NRMK = ZERO
         FNRMK = ZERO
         RETURN
      END IF

	modified:   SRC/dgecxx.f
2026-04-30 16:40:33 -07:00
scr2016 b26a74e496 SRC/dgecxx.f: Changed how the number of selected columns K is updated
after NSEL columns and NFREE columns factorization:
from update style K = NSEL,  and K = NSEL + KFREE
to increment style K = K + NSEL, K = K + KFEE

	modified:   SRC/dgecxx.f
2026-04-30 16:26:12 -07:00
scr2016 9c27a24524 SRC/dgecxx.f: Coorrrected spelling mistakes comments.
modified:   SRC/dgecxx.f
2026-04-30 14:50:30 -07:00
scr2016 83a7af2acd SRC/lapack_64.h: restored blank line 29 to #define CGBMV CGBMV_64
Line 29 was emtied in error while adding

at commit
ce5b69cbf0

index 9980399df..7a7c50f83 100644
--- a/SRC/lapack_64.h
+++ b/SRC/lapack_64.h
@@ -26,7 +26,7 @@
 #define CGBCON CGBCON_64
 #define CGBEQU CGBEQU_64
 #define CGBEQUB CGBEQUB_64
-
+#define CGBMV CGBMV_64
 #define CGBRFS CGBRFS_64
 #define CGBRFSX CGBRFSX_64

modified:   SRC/lapack_64.h
2026-04-30 13:56:07 -07:00
scr2016 f6574307ed dgecxx.f: improved algorithm how the matrix C is generated.
In case, when we return the matrrix X as well, we use the copy
of the origonal matrix A that is stored in X. So that we do not need
to save the matrix A into the array C, and do not need to select the
columns of A in the array C in place. Instead, we just copy the selected
columns of the matrix A into the matrix C.

   modified:   SRC/dgecxx.f
2026-04-28 20:27:58 -07:00
scr2016 ed5b8231df dgecxx.f: added 'On exit' parameter descriptions to DESEL_ROWS and SEL_DESEL_COLS, since they are modified on output.
1) added 'On exit' parameter descriptions to DESEL_ROWS and SEL_DESEL_COLS, since they are modified on output.

2) For row deselection, changed:

                   IPIV( I ) = IPIV( MSUB )
                  IPIV( MSUB ) = I
                  ITEMP = DESEL_ROWS( I )
                  DESEL_ROWS( I ) = DESEL_ROWS( MSUB )
                  DESEL_ROWS( MSUB ) = ITEMP    into:

into
                  IPIV( I ) = IPIV( MSUB )
                  IPIV( MSUB ) = I
                  DESEL_ROWS( MSUB ) = DESEL_ROWS( I )
                  DESEL_ROWS( I ) = -1

2) cleaned up comments in the code dgecxx.f

modified:   SRC/dgecxx.f
2026-04-28 19:20:54 -07:00
scr2016 7940afb9f9 dgecxx.f: Updated comments before row deselection code.
modified:   SRC/dgecxx.f
2026-04-28 16:57:59 -07:00
scr2016 1612cd6768 Optimized quick return when (M=0 or N=0), and (MSUB=0 or NSUB=0).
Quick rfturn if possible for
     a)  M = 0 or N = 0. There is no matrix A(1:M,1:N).
     b)  MSUB = 0 or NSUB = 0. There is no matrix A_sub(1:MSUB,1:NSUB).

     modified:   SRC/dgecxx.f
2026-04-28 14:33:49 -07:00
scr2016 b05e6148ad dgecxx.f: rearranged the leading comments
modified:   SRC/dgecxx.f
2026-04-28 12:45:23 -07:00
scr2016 1cbb16845e DOCS/groups-usr.dox: added new groups for CX factorization
@defgroup low_rank_top          Low-rank factorizations (CX, CUR, etc.)
    @{
        @defgroup cx_grp            CX factorization
        @{
            @defgroup gecxx         gecxx:          CX factorization, expert interface
        @}
    @}

modified:   DOCS/groups-usr.dox
2026-04-27 22:45:36 -07:00
scr2016 45e761e1a8 dgecxx.f: added testing code for DOUBLE PRECISION.
modified:   TESTING/LIN/CMakeLists.txt
	modified:   TESTING/LIN/Makefile
	modified:   TESTING/LIN/alaerh.f
	modified:   TESTING/LIN/alahd.f
	modified:   TESTING/LIN/dchkaa.F
	new file:   TESTING/LIN/dchkcxx.f
	new file:   TESTING/LIN/derrcxx.f
	modified:   TESTING/LIN/dlatb4.f
	modified:   TESTING/dtest.in
2026-04-27 21:03:16 -07:00
scr2016 adcce9c91c dgecxx.f: added quick return for (M=0 or N=0) and (M_sub=0 or N_sub=0)
If (M=0 or N=0), there is no matrix A(1:M,1:N).
If (M_sub=0 or N_sub=0), there is no matrix A_sub(1:M_sub,1:N_sub).

  modified: SRC/dgecxx.f
2026-04-27 20:51:44 -07:00
langou 20044bbd95 Merge pull request #1225 from ndingle-arm/cumlq-workspace-patch
Calculate CUNMLQ LWORK consistently when K=0
2026-04-24 13:53:49 -06:00
Simon Maertens 2328018b6a Set C standard explicitly to C99 (needed by Intel classic compiler to support _Complex) 2026-04-24 13:35:39 +02:00
Simon Maertens 1bc5d3a9ec Added fp-model=strict for Intel on Windows; disabled deprecation warnings for Intel Classic compilers 2026-04-24 13:35:38 +02:00
Simon Maertens 8d8df56471 Remove unnessesary blas lib from LAPACKE examples (caused warning from macOS linker) 2026-04-24 13:35:38 +02:00
Simon Maertens c59b28a9d1 Fixed all lines that were longer than 72 characters. That caused the Intel Classic compiler to fail on Windows 2026-04-24 13:35:31 +02:00
Simon Maertens 8bcbf5d7ca Remove type specifiers of intrinsic function ETIME, since it has no effect (flang warning) 2026-04-23 18:00:17 +02:00
Simon Maertens 8d8625a502 Quoting Python3_EXECUTABLE in CTEST_CUSTOM_POST_TEST to make sure it works for paths with spaces (e.g. on Windows) 2026-04-23 17:09:50 +02:00
Simon Maertens 8834606520 Remove the explicit __declspec(dllexport) since that is handles already by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 2026-04-23 16:43:57 +02:00
Simon Maertens 59a4d448f0 Skip cblas xerbla tests for shared Windows builds, since weak symbols are not supported and the trick to load the test xerbla first doesn't work on Windows when using shared libraries. 2026-04-23 16:32:39 +02:00
Simon Maertens f484d0ef41 Remove complex ?asum and ?nrm2 routines from real tests since they are already tested in the complex tests 2026-04-23 16:31:29 +02:00
Simon Maertens 793ab6b649 Remove unnecessary test_inlude directory in the build folder 2026-04-23 16:29:51 +02:00
Simon Maertens 43764cd0bc Merge branch 'master' into export_import_cblas_globals 2026-04-23 14:54:10 +02:00
Simon Maertens a466518dea Fix the python test summary by using Python3_EXECUTABLE instead of the old PYTHON_EXECUTABLE 2026-04-23 13:01:59 +01:00
langou 7d2bfce176 Merge pull request #1253 from ACSimon33/getenv_s
Improve getenv usage
2026-04-22 20:16:55 -06:00
langou 8a1ae32a4c Merge pull request #1255 from ACSimon33/remove_bind_c
Remove BIND(C) for 3.13.0 release
2026-04-22 19:36:56 -06:00
langou d1d33467ee Merge pull request #1256 from ACSimon33/intel_compilers_on_windows
Fixes for Intel compilers on Windows
2026-04-22 19:33:37 -06:00
langou 1f86b23382 Merge pull request #1257 from ACSimon33/wrong_external_symbols
Fixed wrong external symbol declarations
2026-04-22 19:32:02 -06:00
Simon Maertens 58c4bc1d30 Fix export & import of global CBLAS symbols for shared Windows builds 2026-04-23 01:36:22 +02:00
Simon Maertens 5e1838bed7 Fixed wrong external symbol declarations: CGER -> CGERC and ZLARF1 -> ZLARF1L 2026-04-23 00:34:09 +02:00
Simon Maertens fd686cd6b9 Disable weak linkage of cblas_xerbla on Windows 2026-04-22 23:46:04 +02:00
Simon Maertens f4ba39a0ab Choose correct C complex types for Intel compilers on Windows 2026-04-22 23:44:55 +02:00
Simon Maertens c2340cf803 Remove BIND(C) statements since they break armflang, nvfortran, and nagfor builds. 2026-04-22 22:01:38 +01:00
Simon Maertens de2f9be7f8 Fixed some minor suggestions from copilot 2026-04-22 17:35:03 +02:00
scr2016 6faf643a39 in .github/workflows/cmake.yml, removed redundant '--config ${{env.BUILD_TYPE}}' from 'cmake --build build
(1) removed redundant '--config ${{env.BUILD_TYPE}}' from 'cmake --build build -config ${{env.BUILD_TYPE}}' for a sigle configuration generator Ninja.
(2) wrote comments before each 'cmake --build build' about '--config ${{env.BUILD_TYPE}}' redundancy.
(3) in test-install-cblas-lapacke-without-fortran-compiler job, addded 'env' field 'BUILD_TYPE: Release' to make it consistent with other jobs in the script.
2026-04-21 21:02:01 -07:00
Simon Maertens 5969737ba1 Use getenv_s on Windows and make the use of gentenv on unix safer by allocating a new char array for the environment variable. 2026-04-21 19:02:30 +02:00
Martin Kroeker 968119f2bb Optimize looping over the lower triangular in fat matrix cases 2026-04-21 10:53:22 +02:00
scr2016 ce5b69cbf0 dgecxx.f: added to SRC/CMakeLists.txt and SRC/lapack_64.h 2026-04-20 23:07:03 -07:00
Martin Kroeker 4a6c2b11b9 Allow using gfortran even with the Cray PE_ENV set to something else 2026-04-20 19:24:32 +02:00
Martin Kroeker de15f6a8bd Adjust line reflow for ILP64 build 2026-04-20 18:22:29 +02:00
langou 09e8a7b317 Merge pull request #1173 from foxtran/update/function-arguments
Update Function Arguments in `?gees`, `?geesx`, `?gges`, `?ggesx`, and `?gges3`
2026-04-18 18:06:48 -06:00
langou 88dc26084d Merge pull request #1247 from martin-frbg/appveyor-flang22
Update the ancient flang version used in Appveyor CI
2026-04-17 07:47:34 -06:00
langou 5276a67314 Merge pull request #1248 from martin-frbg/cmake-findpython
Update the search strategy for a Python3 interpreter
2026-04-17 07:41:14 -06:00
Martin Kroeker a53ab62307 Update the search strategy for a Python interpreter 2026-04-17 12:38:58 +02:00
Martin Kroeker 9aed94de6d Update flang to 22 (requiring newer cmake and Visual Studio 2017 too) 2026-04-17 12:23:14 +02:00
langou eb4f2b1d7f Merge pull request #1228 from ndingle-arm/dmd-patch
Testing: initialize ISPEC=9 before running DMD tests
2026-04-15 06:48:15 -06:00
NAKATA Maho cb988d7863 SRC: avoid large intermediates in complex LARTG
Rewrite the complex sine computation in CLARTG and ZLARTG to avoid forming a large intermediate value before the final multiplication by the conjugate of g.

The existing scaling keeps f2*h2 in a safe range, so this is not an overflow or underflow fix for f2*h2 itself. However, expressions such as

    conjg(g) * ( f / sqrt(f2*h2) )

can still form a large intermediate value in the division before it is multiplied by conjg(g). Use the mathematically equivalent form

    ( f / sqrt(f2) ) * ( conjg(g) / sqrt(h2) )

so that the factors stay closer to unit scale. Apply the same rewrite to the scaled branch using fs and gs.
2026-04-15 15:12:23 +09:00
langou f6fb1114ab Merge pull request #1232 from nakatamaho/fix/testing-csd-input-count
TESTING: fix inconsistent entry count in csd.in
2026-04-14 09:28:24 -06:00
NAKATA Maho 11b673cf82 SRC: use LSAME for NORM checks in condition routines
Replace direct NORM character comparisons for the one-norm option with LSAME in the condition estimation routines. This keeps the '1' checks consistent with the existing LSAME handling for the equivalent 'O' option.
2026-04-14 08:34:56 +09:00
NAKATA Maho c537b6b5d3 TESTING/LIN: use LSAME for UPLO checks in latsp and latsy
Replace direct UPLO character comparisons in the LATSP and LATSY test helpers with LSAME. This keeps option handling consistent with the LAPACK convention for case-insensitive checks.
2026-04-14 08:24:10 +09:00
NAKATA Maho bb2bda9ed3 SRC: use LSAME for UPLO checks in lalsd
Replace direct UPLO character comparisons in the LALSD routines with LSAME. This keeps option handling consistent with the surrounding LAPACK convention for case-insensitive checks.
2026-04-14 08:17:35 +09:00
NAKATA Maho c1afcaef18 SRC: use LSAME for TRANS checks in gttrs
Replace direct case-sensitive TRANS character comparisons in the GTTRS routines with LSAME. This keeps option handling consistent with the surrounding LAPACK convention for case-insensitive checks.
2026-04-14 07:56:55 +09:00
NAKATA Maho 6a1be421a1 SRC: use LSAME for UPLO checks in pttrs
Replace direct case-sensitive UPLO character comparisons in CPTTRS and ZPTTRS with LSAME. This matches the surrounding LAPACK convention for case-insensitive option checks.
2026-04-14 07:52:43 +09:00
NAKATA Maho 9def0ea171 TESTING/EIG: use named constants in errgg and zerrhs tests
Replace hard-coded floating-point constants with named constants in selected TESTING/EIG error-exit tests. This keeps the test setup code consistent with surrounding LAPACK test style.
2026-04-14 07:41:30 +09:00
NAKATA Maho 46604b2708 cleanup: normalize ZERO/ONE declaration order in TESTING/EIG error-exit tests
Reorder ZERO and ONE declarations and PARAMETER definitions
for consistency in the TESTING/EIG error-exit test sources.

No functional change intended.
2026-04-14 07:36:16 +09:00
NAKATA Maho a52fb44456 Merge branch 'Reference-LAPACK:master' into master 2026-04-14 07:16:53 +09:00
langou 14f3af6976 Merge pull request #1234 from nakatamaho/cleanup/csdts
cleanup: separate real and complex zero/one constants in {c,z}csdts
2026-04-13 07:32:58 -06:00
langou 1c493c4c5b Merge pull request #1233 from nakatamaho/cleanup/testing-lin-drvrf-constants
TESTING/LIN: use named constants in drvrf tests
2026-04-13 07:31:56 -06:00
NAKATA Maho c21b6a6754 ci: retrigger actions 2026-04-12 12:15:24 +09:00
NAKATA Maho d811e37cb1 Merge branch 'Reference-LAPACK:master' into master 2026-04-12 06:40:49 +09:00
langou ff3f98214f Merge pull request #1230 from nakatamaho/cleanup/eig-errbd-errhs-constants
TESTING/EIG: use named ONE constants in several error-exit tests
2026-04-11 09:08:37 -06:00
NAKATA Maho 820ef1d794 cleanup: separate real and complex zero/one constants in {c,z}csdts
Replace REALONE/REALZERO and complex ZERO/ONE with
type-specific named constants in the CSD test routines:
ZERO/ONE for real scalars, and CZERO/CONE for complex values.

Update {C,Z}LASET, {C,Z}GEMM, and {C,Z}HERK call sites to use
the matching constant type, and replace literal imaginary zeros
in CMPLX/DCMPLX calls with the named real ZERO constant.

No functional change intended.
2026-04-11 23:02:17 +09:00
NAKATA Maho 25d74b31a7 TESTING/LIN: use named constants in drvrf tests
Replace hard-coded floating-point constants with existing named
  constants in the drvrf3 and drvrfp test drivers. This keeps the test
  initialization code consistent with surrounding LAPACK test style.
2026-04-11 20:29:54 +09:00
NAKATA Maho 8380fe2c40 TESTING: fix inconsistent entry count in csd.in
TESTING/csd.in declares that the number of values of M, P, and Q
is 10, but each of the three data lines actually contains 11
entries.

Update the count to 11 so the header matches the test input data.
This is a test-data consistency fix only.
2026-04-11 20:15:23 +09:00
NAKATA Maho dd5d8da796 fix build 2026-04-11 20:12:06 +09:00
NAKATA Maho 7f8ab7bfac cleanup: use named ONE constants in TESTING/EIG error-exit tests
Replace hard-coded 1./1.D0 literals with the named constant ONE
in several TESTING/EIG error-exit test routines.

Add missing ONE parameter declarations where needed so the test
setup code follows the surrounding named-constant style.
2026-04-11 14:19:18 +09:00
Nick Dingle 88e91a5f23 Testing: initialize ISPEC=9 before running DMD tests
The DMD test drivers use the testing ILAENV from TESTING/EIG, where
ISPEC=9 returns IPARMS(9). The drivers never initialized that entry,
so the xGESDD/xBDSDC divide-and-conquer cutoff SMLSIZ came from
undefined state.

This undefined test state can lead to invalid xLASD0 calls and a large
number of false failures. In this patch we initialize XLAENV(9,25) in
the s/c/d/z DMD test drivers so the tests start from a defined ILAENV
configuration.
2026-04-10 16:17:19 +01:00
NAKATA Maho e3a0a153db bbcsd: use named constant ONE consistently in {s,d,c,z}bbcsd
Replace the literal 1.0 / 1.0D0 in the computation of
MU = SQRT(ONE - NU**2) so the BBCSD routines consistently use
the named parameter constants already defined in each source.

Also reorder the parameter declarations to match the PARAMETER list
and remove trailing blank lines at end of file.

No functional change intended.
2026-04-10 14:12:59 +09:00
scr2016 e73e1b0715 extended the expressions for USE_DESEL_ROWS and USE_SEL_DESEL_COLS to the second line 2026-04-09 15:07:57 -07:00
scr2016 059442bcf7 added dgecxx.f to Makefile 2026-04-09 13:20:03 -07:00
scr2016 f3f65e386b dgecxx.f: changed 2 LQUERY and LIQEURY variables into 1 LQUERY 2026-04-09 13:16:36 -07:00
scr2016 3af8533300 dgecxx.f: added top comments 2026-04-09 10:15:35 -07:00
Nick Dingle 1ece76f528 Calculate CUNMLQ LWORK consistently when K=0
CUNMLQ's documentation says LWORK must be:

          If SIDE = 'L', LWORK >= max(1,N);
          if SIDE = 'R', LWORK >= max(1,M).

In the current implementation, however, when K=0 a workspace query
will return LWORK=1 in WORK(1). This means a subsequent call to CUNMLQ
with a workspace of that size will fail with INFO = -12.

The other ???MLQ routines return consistent values of LWORK when K=0
(that is, equal to or greater than NW) so this patch makes CUNMLQ's
behaviour match theirs.
2026-04-09 11:31:59 +01:00
scr2016 b21e888fb3 dgecxx.f: upadated the description of the parameters C and QRC 2026-04-07 20:36:58 -07:00
scr2016 7de15adde6 dgecxx.f: corrected the description of the parameter LIWORL 2026-04-06 13:43:56 -07:00
scr2016 5506815863 dgecxx.f: updated the workspace dimension parameter LIWORK description 2026-04-05 23:32:27 -07:00
scr2016 8db5d4774b dgecxx.f: corrected comments in the version 3 algorithm to generate the matrix C 2026-04-05 23:01:24 -07:00
scr2016 4c99ae7661 dgecxx.f: changed the algorithm to generated matrix C, now it is verision 3. 2026-04-05 20:46:40 -07:00
scr2016 caf8581367 dgecxx.f: corrected and updated the description of the parameter X. 2026-04-03 15:00:28 -07:00
scr2016 926e28e16c dgecxx.f: cahanged the description of X, added notation for lls problem as min|| A - C*X||_F for the unknown X 2026-04-02 14:44:25 -07:00
scr2016 b7445a3f93 dgecxx.f: commit 68d8fba5c1 was incorrect, so I reverted the description of LDX to now say again If FACT = 'X', LDX >= max(1,M), plus expanded the description of the parameter X. 2026-04-02 14:06:02 -07:00
scr2016 5478f985ad dgecxx.f: version 2 of the factor C generation algorithm 2026-04-02 00:04:45 -07:00
scr2016 d35cd9a296 dgecxx.f: corrected speclling the comments inside the code 2026-04-01 13:26:51 -07:00
langou 774b05d15d Merge pull request #1221 from langou/origin/follow_up_on_PR1146
Follow up on pr1146 (v2)
2026-03-31 16:57:12 -06:00
scr2016 68d8fba5c1 dgecxx.f: corrected the LDX minimum value and description from: If FACT = 'X', LDX >= max(1,M) to LDX >= max(1,min(M,N)) 2026-03-31 13:06:44 -07:00
Julien Langou 944e920ac6 address @mgates' suggestion: "I tend to reset pointers to NULL after freeing them, to avoid any possible confusion." 2026-03-31 09:18:46 -06:00
Julien Langou 6c4efb0307 address @mgates' suggestion: "A comment that joba == e is using V as workspace would be helpful. (Per later comment when transposing results.)" 2026-03-31 09:07:39 -06:00
Julien Langou bb1afab469 went back and forth on how to handle the case ((m==0)||(n==0)) 2026-03-28 14:23:22 -06:00
Julien Langou 077a97f9d7 address @mgates3 requested changes on this pull request (thanks!) 2026-03-28 14:15:52 -06:00
langou ed4d486f65 Merge branch 'Reference-LAPACK:master' into follow_up_on_PR1146 2026-03-28 13:40:15 -06:00
langou a884b29254 Merge pull request #1213 from langou/MINMN_EQ_0 2026-03-28 10:19:46 -06:00
langou d3388ade69 Merge pull request #1220 from nakatamaho/topic/xLARGV-fix-helper-naming
clargv,zlargv: rename local ABS1 helper to CABSMAX
2026-03-28 08:09:49 -06:00
langou 9130566c33 Merge pull request #1219 from nakatamaho/refactor/unify-abs1-to-cabs1
refactor: rename ABS1 statement function to CABS1 for consistency
2026-03-28 08:05:47 -06:00
langou d6bd7e3f4e Merge pull request #1218 from nakatamaho/fix/blas-cabs1_axpy
BLAS: inline SCABS1/DCABS1 into CAXPY/ZAXPY as statement function CABS1
2026-03-28 08:05:11 -06:00
NAKATA Maho 1ed1f080da clargv,zlargv: rename local ABS1 helper to CABSMAX
The local ABS1 statement function in CLARGV and ZLARGV does not compute
the usual complex ABS1/CABS1 quantity. It returns

    max(abs(real(z)), abs(aimag(z)))

and is used only as a scaling helper in the same algorithmic path as
CLARTG/ZLARTG.

Rename the helper to CABSMAX so that the name matches its actual
behavior and does not suggest CABS1 semantics.

No numerical behavior is changed.
2026-03-28 16:55:08 +09:00
NAKATA Maho ac82605ea9 refactor: rename ABS1 statement function to CABS1 for consistency
Several LAPACK, BLAS, and CBLAS source files defined a local statement
function named ABS1 for the complex 1-norm approximation:

    ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
    ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )

The majority of the codebase already uses CABS1 for this identical
purpose. This commit renames ABS1 to CABS1 in all remaining files
(definition line, declaration line, and all call sites within the
same file) to make the naming consistent across the repository.

A small number of fixed-form lines required continuation-line splits
to stay within the 72-column limit after the rename.

No numerical change. Statement functions are file-local in Fortran,
so there is no ABI or interface impact.

This is a preparatory cleanup before inlining these statement
functions (see issue #1200).
2026-03-28 14:46:42 +09:00
NAKATA Maho 0843d3ed4b BLAS: inline SCABS1/DCABS1 into CAXPY/ZAXPY as statement function CABS1
Replace external function references to SCABS1 and DCABS1 with a local
statement function CABS1 in CAXPY and ZAXPY respectively, eliminating
the dependency on those auxiliary routines.
2026-03-28 14:10:56 +09:00
langou c550a3638b Merge pull request #1215 from langou/typo_in_comment_of_xrotmg 2026-03-27 12:48:18 -06:00
langou 64e47cf7e2 Merge pull request #840 from weslleyspereira/try-lapack_namespace
In CMake, install BLAS::BLAS and LAPACK::LAPACK
2026-03-27 08:31:31 -06:00
scr2016 7689fc123b dgecxx.f: corrected the description of LWORK parameter regarding NX crossover point. 2026-03-26 22:38:25 -07:00
scr2016 6ce7d80602 dgecxx.f: corrected the descriptions of QRC, X and LDX parameters 2026-03-26 20:18:44 -07:00
scr2016 9168094c89 dgecxx.f: updated description of FACT parameter, and LWORK parameter to include NX crosspver point 2026-03-26 15:47:58 -07:00
Julien Langou 8d54a91fee typo, thanks to @jasonriedy for letting me know
issue with doxygen comments
2026-03-26 13:05:33 -06:00
Julien Langou e7b6349d39 oops 2026-03-26 12:56:16 -06:00
Julien Langou dc69275836 rewrite of lapacke_[x]gesvdq_work.c 2026-03-26 12:45:49 -06:00
Julien Langou e67e3b47d2 minor typos in ZGESVDQ 2026-03-26 08:36:49 -06:00
langou d6bf599fd7 (typo) Fix variable name 2026-03-26 08:30:15 -06:00
Julien Langou ea65bb77ba As suggested by Angelika,see PR#1035, use MINMN.EQ.0 instead of M.EQ.0 2026-03-26 08:05:24 -06:00
langou 034ada14fa Merge pull request #1035 from frjohnst/geqp3_Jul2024
xGEQP3 changes July 2024
2026-03-26 07:55:41 -06:00
langou 2ec774a2f6 Merge branch 'master' into try-lapack_namespace 2026-03-25 14:41:24 -06:00
langou a22074819d Merge pull request #967 from christoph-conrads/943-xBBCSD-read-of-unitialised-value
xBBCSD: fix uninitialized read
2026-03-25 14:31:29 -06:00
langou 89791177a7 Merge branch 'master' into 943-xBBCSD-read-of-unitialised-value 2026-03-25 13:21:59 -06:00
langou 1d7b5c10a5 Merge pull request #1052 from angsch/master
Converge >= and > usage in docs and implementation of GESVJ
2026-03-25 13:15:16 -06:00
langou 4f84ecc5ca Merge pull request #774 from mgates3/tgsen
fix workspace size in tgsen
2026-03-25 12:58:51 -06:00
langou 95640a9031 Merge pull request #1140 from MaartenBaert/fix-dlasd7
Fix documentation error and ordering bug in DLASD7
2026-03-25 12:52:49 -06:00
langou f954f62cd1 Merge pull request #1146 from yizeyi18/xgesvdq-more-jobuv
Fix `xGESVDQ`'s jobu and jobv support in LAPACKE
2026-03-25 12:36:10 -06:00
langou 8104c32fe8 Merge pull request #1168 from foxtran/refactor/ieeeck
Refactor IEEECK to avoid generating IEEE exceptions by using IEEE_ARITHMETIC
2026-03-25 12:32:58 -06:00
langou ac573b73bb Merge pull request #1187 from krystophny/fix/dgd-test-seed-fma-sensitivity
Fix DGS test seed to avoid FMA-sensitive ill-conditioned matrix
2026-03-25 12:24:30 -06:00
langou 92ca29dc64 Merge pull request #1212 from nakatamaho/fix/typo-fix-dmd 2026-03-25 04:11:13 -06:00
NAKATA Maho 33ec2a652c Fix typos in comment strings of [csdzd]chkdmd.f90
- intial/inital -> initial (K_traj loop and K_TRAJ==2 branch)
- eigencalues -> eigenvalues (GEDMD and GEDMDQ comment blocks)
- Rezidual -> Residual (WRITE output strings)
- rayleigh -> Rayleigh (proper noun, z/s/dchkdmd.f90)
- aigenvectors -> eigenvectors (s/dchkdmd.f90)
- localy -> locally (s/dchkdmd.f90 MKL note)
- whith -> with (s/dchkdmd.f90 MKL note)
- worksapce -> workspace (s/dchkdmd.f90 MKL note)
- ZGEDMDQ -> CGEDMDQ in comment blocks (cchkdmd.f90)
- ZGEDMD and ZGEDMDQ -> CGEDMD and CGEDMDQ in WRITE string (cchkdmd.f90)
2026-03-25 13:50:09 +09:00
langou 3aba0da0db Merge pull request #1211 from nakatamaho/fix/testparams 2026-03-24 20:55:26 -06:00
langou a4641a28a5 Merge pull request #1169 from sh-zheng/skew-symmetric-presubmit 2026-03-24 20:53:50 -06:00
NAKATA Maho ca938b93df Enable disabled test options in LAPACK TESTING input files
Turn on test options that were left disabled in several TESTING input files.

Set "Put T to test the driver routines" to T in cgg.in, dgg.in, sgg.in,
and zgg.in so the generalized nonsymmetric eigenvalue driver tests are run.

Also set "Put T to test the error exits" to T in cbb.in, dbb.in, sbb.in,
and zbb.in to restore the corresponding error-exit checks.
2026-03-25 10:34:36 +09:00
NAKATA Maho 4486765327 Enable disabled test options in LAPACK TESTING input files
Turn on test options that were left disabled in several TESTING input files.

Set "Put T to test the driver routines" to T in cgg.in, dgg.in, sgg.in,
and zgg.in so the generalized nonsymmetric eigenvalue driver tests are run.

Also set "Put T to test the error exits" to T in cbb.in, dbb.in, sbb.in,
and zbb.in to restore the corresponding error-exit checks.
2026-03-25 10:24:35 +09:00
langou 2f098d0fbe Merge pull request #1195 from jberg5/fix-f32-issue
Fix truncating large workspace values
2026-03-24 19:16:02 -06:00
langou dd3608ade7 Merge pull request #1208 from Reference-LAPACK/zrot_and_srot__NaN_checks_on_input_scalar
add NaN check for input scalars `s` and `c` to lapacke_crot and lapacke_srot
2026-03-24 19:15:36 -06:00
langou 7a5f0f890f Merge pull request #1209 from Reference-LAPACK/minor___zunbdb3
remove unused parameter ONE
2026-03-24 19:15:19 -06:00
Mark Gates 0dddb40aaf fix indentation 2026-03-24 20:43:58 -04:00
langou 93f72dd1f7 Merge branch 'master' into fix-f32-issue 2026-03-24 15:08:51 -06:00
langou c806564313 Merge pull request #1136 from langou/try__fix_1128__adding_part_of_angsch_suggestion
add NaN checks for input matrix A in GEEV, return error if NaN are in matrix A, NaNs in input are detected with LANGE (needed for scaling)
2026-03-24 14:40:09 -06:00
Julien Langou 7f4dff6336 oops 2026-03-24 14:35:02 -06:00
Julien Langou 8b52b5e82f remove unused parameter ONE 2026-03-24 14:27:06 -06:00
Julien Langou 8fa1db366b add NaN check for input scalars s and c to lapacke_crot and lapacke_srot 2026-03-24 14:18:29 -06:00
langou 10d120966e Merge pull request #1192 from kevinsung/zrot
add crot and zrot to LAPACKE
2026-03-24 14:13:46 -06:00
langou b760323bc5 Merge pull request #1196 from ilayn/fix_zunbdb3
FIX: Revert the conjugation removal in zunbdb3
2026-03-24 13:54:04 -06:00
langou eb5f719947 Merge pull request #1206 from nakatamaho/fix/trsyl3-ldswork-overwrite
Fix LDSWORK being overwritten during workspace query in xTRSYL3
2026-03-24 06:59:14 -06:00
langou a52f5fa69d Merge pull request #1207 from nakatamaho/fix/xpgvx-info-to-iinfo
fix(TESTING/EIG): pass IINFO instead of INFO to xSPGVX/xHPGVX in *drvsg2stg
2026-03-24 06:42:12 -06:00
langou c6e6948e8f Merge pull request #1205 from nakatamaho/remove_redundant_DBLE_REAL_in_testing
Remove redundant DBLE()/REAL() type conversions in TESTING
2026-03-24 06:37:12 -06:00
NAKATA Maho 4e013d710c fix(eig): pass IINFO instead of INFO to xSPGVX/xHPGVX in *drvsg2stg
In cdrvsg2stg.f, ddrvsg2stg.f, sdrvsg2stg.f, and zdrvsg2stg.f, the
three RANGE='A'/'V'/'I' calls to CHPGVX, DSPGVX, SSPGVX, and ZHPGVX
were passing INFO as the output error argument instead of IINFO.

The error-check block immediately following each call tests IINFO.NE.0,
but IINFO was never updated by the routine, so errors were silently
ignored. Additionally, the block sets INFO = ABS(IINFO), which would
overwrite the value ZHPGVX/xSPGVX had written into INFO with the
stale value of IINFO.

All other driver calls in these files (ZHEGV, ZHEGVD, ZHEGVX, ZHPGV,
ZHPGVD, ZHBGV, ZHBGVD, ZHBGVX and their s/d/c equivalents) correctly
use IINFO. This commit brings the xSPGVX/xHPGVX calls into line with
the established pattern.

Affected routines (3 call sites each):
  CHPGVX in cdrvsg2stg.f
  DSPGVX in ddrvsg2stg.f
  SSPGVX in sdrvsg2stg.f
  ZHPGVX in zdrvsg2stg.f
2026-03-24 18:21:30 +09:00
NAKATA Maho 989ffdd779 Fix LDSWORK being overwritten during workspace query in xTRSYL3
Remove the erroneous "LDSWORK = 2" assignment inside the LQUERY branch
of STRSYL3, DTRSYL3, CTRSYL3, and ZTRSYL3. The assignment overwrites
the caller's input argument, which is declared as intent(in) in the
documentation. The assignment was unnecessary because SWORK(1,1) and
SWORK(2,1) access column 1 only, making the leading dimension
irrelevant for these stores (offset = (i-1) + (j-1)*LDSWORK, j=1).
2026-03-24 13:22:39 +09:00
NAKATA Maho 8b1494be8c Remove redundant DBLE()/REAL() type conversions in TESTING
In ddrvst.f, ddrvst2stg.f, and dlatm4.f, DBLE() was applied to
DOUBLE PRECISION array elements assigned to DOUBLE PRECISION
variables ― a no-op conversion. Similarly, in sdrvst.f,
sdrvst2stg.f, and slatm4.f, REAL() was applied to REAL array
elements assigned to REAL variables.

Remove these 168 redundant calls. Integer-to-real conversions
(e.g., DBLE(N), DBLE(KLEN-1), REAL(MAX(1,N))) are retained as
they are semantically necessary.
2026-03-24 11:37:16 +09:00
langou 7f18edae13 Merge pull request #1203 from nakatamaho/fix-gvd-workspace-query-roundup
Use ROUNDUP_LWORK and remove redundant type conversions in *gvd routines
2026-03-23 08:35:50 -06:00
langou 5dfd515e90 Merge pull request #1202 from nakatamaho/xLAQP2RK
fix(xlaqp2rk): do not modify [in] argument KMAX; introduce KBOUND
2026-03-23 08:30:31 -06:00
langou 6fe88c7ac8 Merge pull request #1204 from nakatamaho/fix/stebz-error-propagation
Fix incorrect INFO return codes from xSTEBZ in driver routines
2026-03-23 08:12:35 -06:00
NAKATA Maho 94f05be6c3 Fix incorrect INFO return codes from xSTEBZ in driver routines
In 26 driver routines across all four precisions (S, D, C, Z),
xSTEBZ was called writing directly to INFO, which was then
silently overwritten by xSTEIN.  Two bugs are fixed:

1. xSTEBZ errors were not propagated to the caller at all.

2. When xSTEBZ returned INFO > 0, eigenvectors were computed
   with an incomplete or empty eigenvalue set (INFO=2,3,4) or
   with reduced accuracy (INFO=1), producing silently wrong
   results.

Fix: route xSTEBZ return value through IINFO.  For INFO != 1,
skip xSTEIN entirely via GO TO.  For INFO == 1 (bisection
convergence warning), xSTEIN is still called since M eigenvalues
are available; the warning is preserved in INFO.

The xSTEBZ error is encoded as INFO = N + IINFO to distinguish
it from xSTEIN failures (1..N), matching the convention already
used for xPBSTF errors in the xBGVX routines.  For the four
xBGVX routines, which already use INFO = N+i for xPBSTF, the
xSTEBZ error is encoded as INFO = 2*N + IINFO.

Update INFO documentation in all 26 files accordingly.
Also add IINFO to the INTEGER declaration in dstevx.f and
sstevx.f where it was missing.

Files modified (26):
  SRC/chbevx.f, SRC/chbevx_2stage.f, SRC/chbgvx.f,
  SRC/cheevx.f, SRC/cheevx_2stage.f, SRC/chpevx.f,
  SRC/dsbevx.f, SRC/dsbevx_2stage.f, SRC/dsbgvx.f,
  SRC/dspevx.f, SRC/dstevx.f, SRC/dsyevx.f, SRC/dsyevx_2stage.f,
  SRC/ssbevx.f, SRC/ssbevx_2stage.f, SRC/ssbgvx.f,
  SRC/sspevx.f, SRC/sstevx.f, SRC/ssyevx.f, SRC/ssyevx_2stage.f,
  SRC/zhbevx.f, SRC/zhbevx_2stage.f, SRC/zhbgvx.f,
  SRC/zheevx.f, SRC/zheevx_2stage.f, SRC/zhpevx.f
2026-03-23 13:58:37 +09:00
NAKATA Maho c2023d8f93 Use ROUNDUP_LWORK and remove redundant type conversions in *gvd routines
Fix workspace size handling in {s,d,c,z}{sy,sp,he,hp}gvd:

1. Workspace readback: remove redundant REAL()/DBLE() casts on INTEGER
   and same-type operands in the post-CHEEVD/ZHEEVD/etc. MAX expressions.
   The old pattern INT(MAX(REAL(int_var), REAL(fp_var))) needlessly
   round-tripped integers through floating-point; for IWORK (already
   INTEGER) the conversion was entirely spurious and risks precision
   loss when 5*N+3 exceeds the 23-bit (single) or 52-bit (double)
   significand.

2. WORK(1) writes: use SROUNDUP_LWORK/DROUNDUP_LWORK in dspgvd, dsygvd,
   zhegvd, zhpgvd where the optimal workspace size was previously stored
   via bare assignment (WORK(1) = LOPT), losing the ceiling guarantee
   that ROUNDUP_LWORK provides.

3. RWORK(1) writes: replace REAL(LROPT) with SROUNDUP_LWORK (chegvd,
   chpgvd) or DROUNDUP_LWORK (zhegvd, zhpgvd).  The zhegvd/zhpgvd case
   was a latent bug: RWORK is DOUBLE PRECISION but REAL() truncated to
   single precision before storing.

4. Add DROUNDUP_LWORK declarations (type + EXTERNAL) to the four
   double-precision / complex-16 routines that lacked them.  Remove
   now-unused REAL/DBLE from INTRINSIC lists where applicable.
2026-03-23 10:12:30 +09:00
NAKATA Maho 4f13bb0d6c Fix 72-column violation in {c,d,s,z}laqp2rk.f
The INTEGER declaration line added by PR #1202 exceeds column 72,
causing 'MINMNFACT' to extend into the sequence number field
(columns 73-80). In fixed-form Fortran, compilers silently truncate
at column 72, so 'MINMNFACT' is parsed as 'MINMNF', leaving the
actual variable undeclared.

Move KBOUND, MINMNFACT to the continuation line to keep all code
within columns 1-72.
2026-03-23 09:47:29 +09:00
NAKATA Maho bdbce3ebd3 fix(xlaqp2rk): introduce KBOUND to avoid modifying [in] argument KMAX
In all four variants (SLAQP2RK, DLAQP2RK, CLAQP2RK, ZLAQP2RK),
KMAX was declared as [in] in the documentation but was overwritten
internally via:

    KMAX = MIN( KMAX, MINMNFACT )

This is a bug in the reference LAPACK implementation: the Fortran
calling convention silently tolerates this when the caller passes
a temporary expression, but the intent annotation is violated and
C/C++ translations fail to compile (cannot bind rvalue to non-const
reference).

Introduce local variable KBOUND to hold the clamped value:

    KBOUND = MIN( KMAX, MINMNFACT )

and replace all subsequent uses of KMAX in the executable section
(loop bound and final assignment K = KBOUND) with KBOUND.
KMAX itself is no longer modified.
2026-03-21 09:12:26 +09:00
scr2016 caea640080 dgecxx.f modified the description of LWORK and LIWORK 2026-03-20 15:39:35 -07:00
scr2016 15b48d2e5b dgecxx.f : simplified workspace calculation 2026-03-18 17:25:10 -07:00
scr2016 8fc7d537b1 dgecxx.f Corrected calculation of check for LDX input parameter and refined calculation for workspace LWORK and LIWORK 2026-03-18 15:21:30 -07:00
langou 4f1773e766 Merge pull request #1199 from nakatamaho/master
fix: correct trailing routine comment in dgemmtr
2026-03-06 22:46:07 -07:00
Nakata Maho 507c1dd7c9 fix: correct trailing routine comment in dgemmtr 2026-03-07 14:41:49 +09:00
langou 58ba032b06 Merge pull request #1197 from nakatamaho/master
TESTING/LIN: align ISEED declarations with documented dimension in four test routines
2026-03-06 19:47:21 -07:00
Nakata Maho fa23a2dc2d TESTING/LIN: declare ISEED as dimension(4) in clatsp/clatsy/zlatsp/zlatsy
The four TESTING/LIN routines currently document ISEED as an
INTEGER array of dimension (4), but their dummy argument
declarations use ISEED(*).

All four routines pass ISEED to CLARND or ZLARND, whose interfaces
require ISEED(4) and document that the fourth element must be odd.

Replace the assumed-size declaration with an explicit size of 4 in
both the commented argument declarations and the actual dummy
argument declarations, so that the source matches the documented
contract and the callee interfaces.

No functional change is intended.
2026-03-07 11:10:10 +09:00
langou 00cf62bc1b Merge pull request #1191 from angsch/issue-1166
Update step length selection in LAED4 overshoot fallback
2026-03-05 22:36:31 -07:00
ilayn 97567d934d FIX:Revert the conjugation step in zunbdb3 2026-03-05 13:44:09 +01:00
Igor 6c5bc6ac65 Merge branch 'Reference-LAPACK:master' into scr2016-dgecx-draft 2026-03-04 13:09:33 -08:00
Igor ecac9d22f7 Rename subroutine DGECXX22 to DGECXX 2026-03-04 13:09:06 -08:00
J Berg 15f395c678 Fix truncating large workspace values 2026-02-27 13:31:21 -08:00
Kevin J. Sung caab666dd4 add crot and zrot to LAPACKE 2026-02-21 08:29:46 -05:00
Angelika Schwarz b6b6288080 Update step length selection in LAED4 overshoot fallback 2026-02-16 10:27:00 +01:00
Igor 39c3a5083d Fix LIWORK calculations and JPIV adjustment comments 2026-02-12 06:40:12 -08:00
Igor be99d8943c Refactor comments and some efficiency improvements 2026-02-11 09:52:06 -08:00
Christopher Albert aca0bc17e7 Fix DGS test seed to avoid FMA-sensitive ill-conditioned matrix
The default seed generates a matrix for N=6, JTYPE=21 that causes
DGGES to fail (INFO=9) when compiled without FMA instructions.

Use a custom seed that avoids this specific ill-conditioned case
while maintaining full test coverage.
2026-01-21 23:26:10 +01:00
langou c0c64400da Merge pull request #1185 from adam-sim-dev/fix_issue_1184
For building shared libs with flang, use C linker instead of Fortran linker to avoid macOS-specific flags that CMake adds (tested CMake 4.2).
2026-01-20 09:14:32 -07:00
adam-sim-dev 7d2118331c For building shared libs with flang, use C linker instead of Fortran linker to avoid macOS-specific flags that CMake adds (tested CMake 4.2). 2026-01-19 20:26:38 +08:00
Simon Maertens 76a3a41e70 Fix typo 2026-01-13 10:58:50 -06:00
langou 4327756d94 Merge pull request #1181 from ACSimon33/fortran_strlen_type
Change FORTRAN_STRLEN type in installed headers.
2026-01-13 07:32:08 -07:00
Simon Maertens eeed198193 Only enable Fortran for CBLAS if Fortran compiler is found 2026-01-13 14:34:05 +01:00
Simon Maertens 583e0e289f Enable Fortran for CBLAS since it also contains Fortran files 2026-01-13 13:11:47 +01:00
Simon Maertens daed92441d Replace FORTRAN_STRLEN type in the cblas_f77.h and handle the header like the lapack.h header. 2026-01-13 12:11:05 +01:00
Simon Maertens 54817e9385 Replace FORTRAN_STRLEN type in the lapack.h header if it's different from size_t 2026-01-13 12:07:05 +01:00
langou 8856fad0cf Merge pull request #1179 from ACSimon33/fix-asan-errors
Fix ASAN errors and FORMAT specifiers
2026-01-07 05:22:09 -07:00
Simon Maertens 3bd8b3124b Increase the size of TAU in tall-skinny QR error tests to 5 to fix reads from outside the array bounds. 2026-01-07 12:13:04 +01:00
Simon Maertens 794b0ba0ab Fix format specifiers with lines longer than 72 characters. 2026-01-07 12:09:56 +01:00
langou 1ff794a959 Merge pull request #1158 from michael-chuvelev/zdrscl_csrscl_infinite_loop
Prevent csrscl/zdrscl from going to infinite loop on Infinity input
2025-12-19 07:04:00 -07:00
Igor 3497aaae88 Edited leading comments in dgecxx.f 2025-12-11 06:55:25 -08:00
langou 67f9279da4 Merge pull request #1174 from Reference-LAPACK/langou-patch-1
Add output-on-failure to ctest command
2025-12-03 00:38:32 -07:00
langou 75248ffe0d Merge pull request #1175 from Reference-LAPACK/langou-patch-2
Enhance test output with failure details
2025-12-03 00:38:20 -07:00
langou 97c0e32f36 Enhance test output with failure details 2025-12-01 06:57:12 -07:00
langou 2b2879eef7 Add output-on-failure to ctest command 2025-12-01 02:04:58 -07:00
Igor S. Gerasimov efe84a130d Update Function Arguments in dgees, dgeesx, dgges3, dgges, dggesx 2025-11-30 10:29:08 +01:00
Igor S. Gerasimov 5a22051d73 Update Function Arguments in sgees, sgeesx, sgges3, sgges, sggesx 2025-11-30 10:26:12 +01:00
Igor S. Gerasimov 8492fc3cc7 Update Function Arguments in zgees, zgeesx, zgges3, zgges, zggesx 2025-11-30 10:19:36 +01:00
Igor S. Gerasimov d8a000d4ff Update Function Arguments in cgees, cgeesx, cgges3, cgges, cggesx 2025-11-30 10:16:11 +01:00
sh-zheng fc2a4fd659 Add skew-symmetric cblas subroutines and tests 2025-11-27 01:15:36 +08:00
Igor S. Gerasimov bf486fecc0 Refactor IEEECK to avoid generating IEEE exceptions by using IEEE_ARITHMETIC support queries 2025-11-26 14:43:35 +01:00
langou 06f5ba3143 Merge pull request #1155 from sh-zheng/skew-symmetric-presubmit
Add skew-symmetric blas subroutines and tests
2025-11-23 12:38:28 -07:00
langou 8d44c30685 Merge pull request #1165 from ACSimon33/fno-tree-loop-vectorize
Disable loop vectorization for gfortran on ARM
2025-11-14 16:58:11 -07:00
Simon Maertens 54726b8177 Format message better. 2025-11-14 14:51:38 +01:00
Simon Maertens cbaf8d377f Disable loop vectorization for GNU Fortran 14.0-14.4 and 15.0-15.2 on ARM due to a compiler bug. 2025-11-14 14:48:08 +01:00
Igor 3833d89e01 Added DGECXX routine in dgecxx.f 2025-11-11 23:33:19 -08:00
Igor b01d1b213b Delete SRC/dgecx.f 2025-11-11 23:24:16 -08:00
Igor de15bcca59 Delete SRC/DGECX.f 2025-11-11 23:23:52 -08:00
langou d5026069ba Merge pull request #1164 from mgorny/msvc-complex
Implement MSVC complex types
2025-11-07 13:37:46 -07:00
Michał Górny 548f62369e Implement MSVC complex types
Implement the support for the `_Fcomplex` and `_Dcomplex` types used
by MSVC in place of the standard C99 complex types.  This is necessary
to make LAPACK build out of the box with MSVC, since it does not
implement the default C99 types.

See: https://learn.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support

I went for the simplest implementation possible, limiting the changes
to swapping the default types used when MSVC is used as the compiler,
also when `lapack_config.h` is not used.  I haven't added
a `LAPACK_COMPLEX_*` ifdef for it, but I can do that if you prefer.

Signed-off-by: Michał Górny <mgorny@quansight.com>
2025-11-07 19:25:44 +01:00
langou 9f4032ec97 Merge pull request #1154 from mgorny/lapack64-pc
fix library names in `lapack64.pc`
2025-11-03 14:24:46 -07:00
sh-zheng 968b45006b Fix error of array's length 2025-10-28 23:07:24 +08:00
sh-zheng 24534338bd Update the skew-symmetric blas doc 2025-10-28 21:38:27 +08:00
sh-zheng fb80127153 Optimize the parsing of SNAME in skew-symmetric blas testing cases 2025-10-28 01:41:58 +08:00
langou 48677eea06 Merge pull request #1162 from ACSimon33/LAPACKE_const_correctness
LAPACKE const correctness fixes
2025-10-23 17:55:27 -06:00
langou 7014148a5b Merge pull request #1163 from jprhyne/dlarftTermCase
Add non-trivial terminating case to xLARFT
2025-10-23 10:20:45 -06:00
Johnathan Rhyne dd076164da Merge branch 'dlarftTermCase' of github.com:jprhyne/lapack into dlarftTermCase 2025-10-23 08:47:56 -06:00
Johnathan Rhyne 746f7afb2b attempt at fixing build errors for CI tests 2025-10-22 19:47:38 -06:00
Johnathan Rhyne 6529fc14bc Merge branch 'master' into dlarftTermCase 2025-10-22 14:01:45 -06:00
Johnathan Rhyne 87d679164c changing names 2025-10-22 14:00:14 -06:00
Johnathan Rhyne 9ea006008e Adding larft VARIANTS folder back to test CI failures 2025-10-22 13:59:17 -06:00
Johnathan Rhyne 81c48a0a3a removed larft build instructions from VARIANTS Makefile 2025-10-22 13:53:19 -06:00
Johnathan Rhyne 68a1389c4b Added NX variable declaration to clarft that was initially missed 2025-10-22 13:32:08 -06:00
Johnathan Rhyne b9d53f4c5c adding nx behavior to *larft 2025-10-22 13:24:50 -06:00
Simon Maertens 0de6ae0fc4 Fixed const specifiers in several LAPACKE function signatures and removed some spurious transpositions of output matrices that are in fact pure input parameters. 2025-10-22 16:50:10 +02:00
langou c08dcfa106 Merge pull request #1159 from ACSimon33/nagfor_constant_propagation_fix
Fixes for the NAG Fortran compiler
2025-10-20 12:16:23 -06:00
Igor b36b9b76eb Fix documentation for ABSTOL and factor flags
changed the description of DGECX
2025-10-16 07:00:56 -07:00
Igor df8c7393af Added dgecx.f, a DRAFT for DGECX routine 2025-10-14 23:56:55 -07:00
Igor 4619f613cd Addded a DRAFT of DGECS routine. 2025-10-14 23:38:08 -07:00
Simon Maertens 9630b23c4f Fixed FORMAT lines that were longerthan 72 characters 2025-10-02 16:42:00 +02:00
Simon Maertens 362029e383 Add missing intrinsics in icamax.f90 and izamax.f90 2025-10-02 16:41:30 +02:00
Simon Maertens d2d2625019 Disable constant propagation for the NAG Fortran compiler in BLAS tests. 2025-10-02 16:40:58 +02:00
Chuvelev, Michael 3c9f92b391 Prevent csrscl/zdrscl from going to infinite loop on Infinity input 2025-09-19 09:24:38 -07:00
langou 66380df1ca Merge pull request #1157 from amontoison/precompilation
Provide precompiled artifacts for future releases
2025-09-19 10:17:48 -06:00
langou 6b92a7affa Merge pull request #1048 from grisuthedragon/implement-axpby 2025-09-19 09:11:21 -06:00
Alexis Montoison 3c59d1725d Provide precompiled artifacts for future releases 2025-09-18 20:37:22 -06:00
langou b4cf815965 Merge pull request #1156 from TiborGY/fix_gelqt_docs
Fix errors in the documentation of ?gelqt
2025-09-16 15:07:24 -06:00
GYT 44d9a1636b FIx errors in the documentation of ?gelqt 2025-09-16 22:54:01 +02:00
sh-zheng 593f69fc0c Update doxygen organization 2025-09-16 22:11:25 +08:00
sh-zheng a0e44d7434 Add skew-symmetric blas subroutines and tests 2025-09-15 20:42:26 +08:00
Michał Górny b73a7c9e4d fix library names in lapack64.pc
Add substitutions to `lapack.pc.in`, in order to ensure that
the generated `lapack64.pc` file correctly references the index64
library and BLAS dependency.  It seems that other pkg-config templates
have been updated as part of #462 but this one was omitted.
As a result, finding a lapack64 via pkg-config gave non-index64
libraries.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-09-14 11:43:24 +02:00
langou 3c1abe4166 Merge pull request #1152 from mgates3/implicit-none 2025-08-27 06:10:33 -06:00
Mark Gates d0b1591e28 fix PROGRAM line in INSTALL 2025-08-26 23:27:58 -04:00
Mark Gates 594dc253ae implicit none in INSTALL 2025-08-26 23:27:58 -04:00
Mark Gates 83ed564b46 implicit none in CBLAS 2025-08-26 23:27:58 -04:00
Mark Gates ce817407f3 implicit none in TESTING 2025-08-26 23:27:58 -04:00
Mark Gates 62b1d4a032 implicit none in TESTING/LIN 2025-08-26 23:27:58 -04:00
Mark Gates 971f19940e implicit none in SRC 2025-08-26 23:27:57 -04:00
Mark Gates 04bb0de13a implicit none in SRC/s 2025-08-26 23:27:57 -04:00
Mark Gates f111b2dc42 implicit none in SRC/d 2025-08-26 23:27:57 -04:00
Mark Gates 8caa3ff67b implicit none in SRC/c 2025-08-26 23:27:57 -04:00
Mark Gates 4c76e9deb6 implicit none in SRC/z 2025-08-26 23:00:36 -04:00
Mark Gates b23d944046 implicit none in SRC/VARIANTS 2025-08-26 22:36:12 -04:00
Mark Gates 97b0bedb32 implicit none in BLAS 2025-08-22 01:02:05 -04:00
langou 5ce7a26f49 Merge pull request #1098 from TiborGY/gemm_docs
Add NaN propagation and array initialization notes to ?GEMM docs
2025-08-16 13:56:26 -06:00
langou bfbef596de Merge pull request #1150 from grisuthedragon/cblas-xerbla-fix
Fix cblas_xerbla wrong parameter dectection
2025-07-30 07:53:41 -06:00
Martin Köhler f721480b2e Merge branch 'Reference-LAPACK:master' into cblas-xerbla-fix 2025-07-30 10:57:06 +02:00
Martin Köhler 426641c372 Fix wrong calls do dchk6 and schk6 and string length in xerbla 2025-07-30 10:40:41 +02:00
langou 881bf80d44 Merge pull request #1149 from grisuthedragon/fix-lapack-version-output-in-tests
Fix format string in LAPACK tests to match two-digit minor versions
2025-07-29 08:30:58 -06:00
Martin Köhler e3951fbc25 fix linkage of cblas_xerbla 2025-07-29 15:47:57 +02:00
Martin Köhler fa6a30b24e Fix format string in LAPACK tests to match two-digit minor versions 2025-07-29 10:34:29 +02:00
Martin Köhler 7f5bcbbd07 Merge branch 'Reference-LAPACK:master' into implement-axpby 2025-07-29 10:06:34 +02:00
langou 9af1f59df5 Merge pull request #1148 from ndingle-arm/cmake-parallel-patch
Capture module file dependencies in CMake
2025-07-23 10:07:57 -06:00
Nick Dingle 146da1d409 Capture module file dependencies in CMake
The modulefile la_xisnan.F90 depends on the modulefile
la_constants.f90 but this dependency is not expressed in the CMake
rules. In some parallel builds we have observed failures where
compilation of objects that depend on la_constants.mod starts before
compilation of la_constants.f90 has finished.

This patch modifies CMakeLists.txt to ensure that la_constants.mod is
built before any other object or modulefile that depends on it.
2025-07-23 11:05:22 +01:00
YI Zeping 5bde1cd38e fix xGESVDQ's jobu and jobv support in lapacke 2025-07-14 15:42:09 +08:00
Martin Köhler 6fa7bf69d1 Fix suggestions by angsch 2025-07-10 12:19:00 +02:00
Martin Köhler e6eeebd789 Merge branch 'Reference-LAPACK:master' into implement-axpby 2025-07-10 11:25:58 +02:00
langou 98f34fd3c9 Merge pull request #1145 from martin-frbg/issue1144
Have LAPACKE_STRSEN/DTRSEN allocate IWORK to at least one element in all job types
2025-07-09 20:01:20 -06:00
Martin Kroeker 2d56b7e6a2 Allocate IWORK to hold at least the one element for workspace queries 2025-07-09 23:26:12 +02:00
Martin Kroeker ecbbecd48a Allocate IWORK to hold at least the one element for workspace queries 2025-07-09 23:23:56 +02:00
Maarten Baert fd9092e9b7 Remove redundant/harmful ABS in SLASD7 2025-06-28 13:12:25 +02:00
Maarten Baert c4ca73c6f2 Fix documentation error in SLAED2, DLAED2, SLAED8 and DLAED8 2025-06-28 13:08:20 +02:00
Maarten Baert 7c8604c550 Fix documentation error and ordering bug in SLASD2 and DLASD2 2025-06-28 12:45:35 +02:00
Maarten Baert fd0ebf6cd4 Fix documentation error and ordering bug in SLASD7 2025-06-28 12:26:54 +02:00
Maarten Baert 319d40ec15 Change new label number in DLASD7 to keep the order consistent 2025-06-28 12:26:09 +02:00
langou efbd2fdf44 Merge pull request #1142 from Reference-LAPACK/revert-1129-issue1128
Revert "Avoid memory corruption with non-finite inputs in ?GEEV"
2025-06-26 09:24:50 -06:00
Martin Kroeker caf674f0d2 Revert "Avoid memory corruption with non-finite inputs in ?GEEV" 2025-06-26 16:41:21 +02:00
Maarten Baert d1f15f53c4 Fix documentation error and ordering bug in DLASD7 2025-06-25 14:39:37 +02:00
langou 49ff1770ef Merge pull request #1139 from angsch/issue-1132
Adjust line reflow in LA_GEAM for ILP64 build
2025-06-24 12:33:01 -06:00
Angelika Schwarz ea67169477 Adjust line reflow in LA_GEAM for ILP64 build 2025-06-24 19:25:39 +02:00
Martin Köhler 0ab775d65b Merge branch 'master' into implement-axpby 2025-06-17 09:11:54 +02:00
langou 52a9434793 Merge pull request #1116 from weslleyspereira/try-new-icamax
Adds new icamax with exception handling
2025-06-16 07:11:37 -06:00
Julien Langou 0918f47cbd follow @angsch idea - add a check for NaN in input matrix A in geev
see issue #1128
2025-06-15 12:15:39 -06:00
Julien Langou 25802f27dd minor: upper case, indentation 2025-06-15 12:05:27 -06:00
langou 14df73a8c6 Merge pull request #1135 from langou/try___fix_cunmlq_zunmlq_in_LAPACKE 2025-06-13 20:29:33 -06:00
langou 18587a4169 Merge pull request #1124 from grisuthedragon/fix-const-cblas
Fix const qualifier warnings in CBLAS
2025-06-13 17:51:02 -06:00
langou fd138de5e5 Merge pull request #1129 from martin-frbg/issue1128
Avoid memory corruption with non-finite inputs in ?GEEV
2025-06-13 17:48:29 -06:00
Julien Langou 709a34bb95 Fix #1134 - Bug in Reference LAPACKE’s cunmlq and zunmlq for row-major layout and side right
Bug reported by @neil-lindquist. Thanks Neil!

On line 93 of both lapacke_cunmlq_work.c and lapacke_zunmlq_work.c, m is passed
to LAPACKE_zge_trans as the 2nd dimension. However, the 2nd dimension should be
r to handle side right correctly. All the other versions of {or,un}m{qr,lq} seem
to be correct.

Also line 52 of lapacke_cunmlq.c and lapacke_zunmlq.c have the same issue: m is
used for the column dimension instead of r. (Those files also do not currently
compute r). The real valued cases have the correct behavior.
2025-06-13 17:40:01 -06:00
langou 8b24458ab6 Merge pull request #1133 from langou/fix_1127__missing_external_declartion_in_larf1f_and_larf1l
Fix #1127 - Add some EXTERNAL declaration in xLARF1L and xLARF1F
2025-06-13 17:08:27 -06:00
Julien Langou aed00bf394 Fix #1127 - Add some EXTERNAL declaration in xLARF1L and xLARF1F
Thanks @syx828
2025-06-13 16:15:35 -06:00
langou 8282ae9688 Merge pull request #1130 from angsch/rm-version
Remove hardcoded "version 3.X"
2025-06-13 14:54:49 -06:00
langou 4758c863f5 Merge pull request #1131 from angsch/czgeqp3rk
Fix bypassing corner cases due to uninitialized variable in [c,z]geqp3rk
2025-06-09 19:17:45 -06:00
Angelika Schwarz b5b4661ba8 Fix bypassing corner cases due to uninitialized variable in [c,z]geqp3rk 2025-06-10 01:41:48 +02:00
Angelika Schwarz 1a92dcac7c Remove hardcoded "version 3.X" 2025-06-03 12:28:23 +02:00
langou 2475f7b391 Merge pull request #1126 from ajz34/fix-gesdd-ldvt_1
Fix too strict leading dimension check on LAPACKE_?gesdd_work
2025-05-31 08:32:29 -06:00
Martin Kroeker d72484317a Avoid memory corruption if INFO<0 2025-05-17 15:00:44 +02:00
Martin Kroeker 76ce5053f4 Avoid memory corruption if INFO<0 2025-05-17 14:59:29 +02:00
Martin Kroeker 4ac1c6922e Update dgeev.f 2025-05-17 14:58:27 +02:00
Martin Kroeker 8f2d86aff6 Fix potential memory corruption if INFO<0 2025-05-17 14:52:15 +02:00
ajz34 88f65d66b5 fix ldvt check in ?gesdd 2025-05-12 19:42:53 +08:00
langou b054023bcd Merge pull request #1094 from wdconinc/gelqs-geqrs-work-lwork
?ge(lq|qr)s.f: WORK( LWORK ) -> WORK( * )
2025-05-09 07:49:46 -06:00
Martin Köhler c1c39a8a14 Fixed cast-qual and other warnings in LAPACKE 2025-04-24 10:40:18 +02:00
Martin Köhler 3e9035955f Add typecasts to outputs 2025-04-23 23:38:11 +02:00
Martin Köhler a077ce6f53 Fix warnings in CBLAS testing and examples 2025-04-23 23:27:09 +02:00
Martin Köhler fc067149ee Fix const qualifier for double complex routines 2025-04-23 23:12:05 +02:00
Martin Köhler dbc45f746f Fix const qualifier for float complex routines 2025-04-23 22:40:59 +02:00
Martin Köhler 506f2b3541 Merge branch 'Reference-LAPACK:master' into implement-axpby 2025-04-23 21:31:09 +02:00
langou 72df25ba80 Merge pull request #1117 from weslleyspereira/fix-docs-rotm 2025-04-16 09:36:10 -06:00
langou 3610ceb837 Merge pull request #1119 from dklyuchinskiy/lapack-fix-geev-err-test
fix missed error message in test for eigenvalue driver routines ed
2025-04-07 09:59:21 -06:00
Dmitry Klyuchinsky ea84abe35f fix missed error message in test for eigenvalue driver routines *ed 2025-04-07 11:40:21 +07:00
Weslley da Silva Pereira d70c8c040d Improvements following @angsch's review 2025-03-31 13:32:24 -06:00
Weslley da Silva Pereira e338bb87e1 Change my affiliation in icamax and izamax 2025-03-28 09:24:58 -06:00
Weslley da Silva Pereira e3a48809c8 use /= instead of isnan 2025-03-28 08:23:58 -06:00
Weslley da Silva Pereira 50dc1bf238 Adds new izamax with exception handling 2025-03-27 16:12:17 -06:00
Weslley da Silva Pereira 3c32809d15 Adds disclaimer about non listed values in ROTM 2025-03-27 15:59:40 -06:00
Weslley da Silva Pereira 97bc2e3134 Adds new icamax with exception handling 2025-03-27 15:42:03 -06:00
langou ca82e5ea5c Merge pull request #1111 from zaikunzhang/patch-1
Update README.md
2025-03-07 08:04:20 -07:00
Zaikun ZHANG 39523862cd Update README.md
Fix a typo in README.
2025-03-07 19:02:29 +08:00
langou 6b1827041f Merge pull request #1107 from grisuthedragon/improve-gemmtr-tests
Fix the testsuite of xGEMMTR
2025-02-06 19:00:27 -07:00
Martin Köhler 4c637b8329 Fix the test of xGEMMTR
- make the SRNAME in XERBLA more robust against strings passed from C (e.g. OpenBLAS)
- adjust the maximum length of a function name from 6 to 7 characters
- add a missing parameter in the error output for z/cgemmtr.
2025-02-06 15:20:50 +01:00
langou a00531096f Merge pull request #1101 from julielangou/master
Update Source code to fix issue with links in Doxygen
2025-01-20 23:57:11 -07:00
Julie 59f136760f Update Source code to fix issue with links in Doxygen
Removed \htmlonly and \endhtmlonly (causing links to not work)
Increase DOT_GRAPH_MAX_NODES   to 200
2025-01-20 17:34:06 -08:00
langou 447fd4e784 Merge pull request #1099 from martin-frbg/reflow_lines
Fix line reflow in some of the DEPRECATED sources
2025-01-20 01:02:07 -07:00
Martin Kroeker 3c209c6bdf Fix line reflow on addition of _64 symbol suffix 2025-01-19 22:59:21 +01:00
Martin Kroeker bc0c38f247 Fix line reflow on addition of _64 symbol suffix 2025-01-19 22:58:19 +01:00
Martin Kroeker 304fa305e8 Fix line reflow on addition of _64 symbol suffixes 2025-01-19 22:55:52 +01:00
GYT 5f79137150 simplify nan propagation quirks in the purpose section 2025-01-19 15:57:34 +01:00
GYT 7ad40db8ba add NaN propagation and array initialization notes to gemm docs 2025-01-19 12:31:27 +01:00
langou ba83427c03 Merge pull request #1096 from mgates3/docs
updates for doxygen 1.12
2025-01-13 22:43:57 -07:00
Mark Gates 31cd658cbd updates for doxygen 1.12 2025-01-13 15:10:51 -05:00
langou 0799b59571 Merge pull request #1093 from wdconinc/patch-1
dlahrd.f: consistent line reflow for DTRMV calls
2025-01-13 01:27:33 -07:00
langou cf2c4402e9 Merge pull request #1095 from julielangou/master
Updating LAPACK version to 3.12.1
2025-01-13 01:08:10 -07:00
Julie 3e242fc8d5 Updating LAPACK version to 3.12.1 2025-01-12 14:42:24 -08:00
Wouter Deconinck f5103fc3b4 ?ge(lq|qr)s.f: WORK( LWORK ) -> WORK( * ) 2025-01-10 14:32:30 -06:00
Wouter Deconinck 3aa877584b dlahrd.f: consistent line reflow for DTRMV calls 2025-01-10 13:05:28 -06:00
langou 6ec7f2bc4e Merge pull request #1080 from jprhyne/master
Adding a recursive xLARFT
2024-12-03 04:39:11 -07:00
langou 7b4c3a3e10 Merge pull request #1079 from hjjvandam/fix/line_lengths
Fix line lengths for the extended API
2024-12-03 04:38:58 -07:00
langou 1b0c6a7a05 Merge pull request #1081 from jprhyne/gemmtrDoc
Fixing misspelling of 'triangular' in {s,d,c,z}gemmtr.f
2024-12-02 00:12:06 -07:00
langou e7d27c7a6c Merge pull request #1082 from jprhyne/gitignoreModFile
updating gitignore to ignore the mod files when we compile
2024-12-02 00:04:41 -07:00
Johnathan Rhyne 487c60ac55 updating gitignore to ignore the mod files when we compile 2024-12-02 00:04:06 -05:00
Johnathan Rhyne 29dbac94c3 Fixing misspelling of 'triangular' in {s,d,c,z}gemmtr.f 2024-12-01 23:50:10 -05:00
Johnathan Rhyne e9b05ef6e9 Updated variants information as well as fixed trailing line in zlarft 2024-11-30 11:19:15 -05:00
Johnathan Rhyne db48820da7 lowered line length to hopefully fix build failures in the CI 2024-11-30 11:05:04 -05:00
Johnathan Rhyne d4741c8a57 removed all extranous changes 2024-11-30 08:52:03 -05:00
Johnathan Rhyne 273ab49035 removed extranous changes (hopefully x2) 2024-11-30 08:51:18 -05:00
Johnathan Rhyne 354a16f22f Removed mod files and extranous file changes (hopefully) 2024-11-30 08:49:18 -05:00
Hubertus van Dam a6c1dd6ce8 Adding missing entries 2024-11-28 19:39:21 +01:00
Hubertus van Dam 0e4c25b00e Adding extra space for extended API 2024-11-28 15:28:34 +01:00
Hubertus van Dam 37e4061ec4 Add extra space for extended API 2024-11-28 12:41:58 +01:00
Hubertus van Dam 76361efae0 Add extra space for extended API 2024-11-28 12:38:40 +01:00
Hubertus van Dam 97e39473f3 Add extra space for extended API 2024-11-28 12:36:07 +01:00
Hubertus van Dam 494425c908 Add extra space for extended API 2024-11-28 12:29:49 +01:00
Hubertus van Dam 97c7845511 And once more. 2024-11-28 12:23:28 +01:00
Hubertus van Dam 47f3d2ae07 Add extra space for extended API 2024-11-28 12:21:28 +01:00
Hubertus van Dam 3f9b12c4ca The extended API needs extra space for _64
For the extended API subroutine names are extended with _64 (e.g.
CGEGS becomes CGEGS_64). Extra space is needed so that the extension
does not violate Fortran line length conventions.
2024-11-28 12:10:45 +01:00
Johnathan Rhyne dadd80e753 Merge branch 'master' of github.com:jprhyne/lapack 2024-11-22 16:08:42 -07:00
Johnathan Rhyne 2534b59e31 updating documentation to be more descriptive 2024-11-22 16:08:21 -07:00
Johnathan Rhyne 60c66af71b Merge pull request #2 from jprhyne/larft
Merge branch 'Reference-LAPACK:master' into larft
2024-11-22 22:55:35 +00:00
Johnathan Rhyne 3065ee8667 Merge branch 'Reference-LAPACK:master' into larft 2024-11-22 22:54:58 +00:00
Johnathan Rhyne 828db43a7c Merge branch 'Reference-LAPACK:master' into master 2024-11-15 17:25:35 -07:00
langou 9128e2051a Merge pull request #1071 from angsch/scorecard
[Github workflow] Bump scorecard version
2024-11-07 10:32:58 -07:00
Angelika Schwarz 747d971136 [Github workflow] Bump scorecard version 2024-11-06 21:33:00 +01:00
Johnathan Rhyne 46e8388218 Merge branch 'Reference-LAPACK:master' into master 2024-11-03 19:28:18 -07:00
langou 1573c82754 Merge pull request #1069 from angsch/use-gemmtr
Use GEMMTR for SY/HE linear updates
2024-10-26 12:39:30 -07:00
Angelika Schwarz 09cb849a23 Use GEMMTR for SY/HE linear updates 2024-10-25 13:25:02 +02:00
Johnathan Rhyne 1ba075ccd8 updating parameter definition in the single complex version 2024-10-16 11:40:20 -06:00
Johnathan Rhyne b966220510 Merge pull request #1 from jprhyne/larft
Larft
2024-10-16 11:16:44 -06:00
Johnathan Rhyne 298804e738 Merge branch 'Reference-LAPACK:master' into larft 2024-10-16 11:13:40 -06:00
Johnathan Rhyne 13aab4adf0 Merge branch 'Reference-LAPACK:master' into master 2024-10-16 11:09:43 -06:00
Johnathan Rhyne 54956283e2 CAN MERGE: Implemented my version of xlarft with comments added, and moved the previous version into VARIANTS 2024-10-16 11:08:37 -06:00
Johnathan Rhyne 212270836b DO NOT MERGE: demonstrating changes work 2024-10-14 11:16:34 -06:00
Johnathan Rhyne 4490848058 Merge branch 'master' of github.com:jprhyne/lapack 2024-10-14 08:08:59 -06:00
Johnathan Rhyne d1f787c82b Merge branch 'master' of github.com:jprhyne/lapack 2024-10-14 08:08:01 -06:00
Martin Köhler 1221bb2595 Merge branch 'Reference-LAPACK:master' into implement-axpby 2024-09-23 11:55:31 +02:00
Angelika Schwarz 18d002a32a Converge >= and > usage in docs and implementation of GESVJ 2024-09-17 19:24:25 +02:00
Martin Köhler f21a6aefd2 Fix error if alpha=0 2024-08-28 22:46:32 +02:00
Martin Köhler 4b9693f8f1 Add CBLAS for AXPBY 2024-08-26 16:27:18 +02:00
Martin Köhler c571921241 Update CBLAS headers 2024-08-26 16:27:18 +02:00
Martin Köhler ad70e7218f Tests for C/S/D/ZAXBPY 2024-08-26 16:27:18 +02:00
Martin Köhler 6cdf7bc3a4 Implement AXBPY 2024-08-26 16:27:18 +02:00
Hao Xu 8785529fae Fix d/sSTEBZ 2024-07-19 15:24:42 -04:00
frjohnst 6a53243490 xGEQP3 changes July 2024 2024-07-12 12:07:04 -04:00
Johnathan Rhyne 7fdd3469c7 Merge branch 'master' of github.com:jprhyne/lapack 2024-06-12 08:02:45 -04:00
Johnathan Rhyne 8a338cf2ba a 2024-05-29 17:28:45 -04:00
Christoph Conrads 3005571c18 xBBCSD: fix uninitialized read
fixes #943
2023-12-29 15:52:57 +01:00
Weslley S Pereira c8199998a6 In CMake, install BLAS::BLAS and LAPACK::LAPACK 2023-05-25 09:39:49 -06:00
Mark Gates 116393587c fix workspace size in tgsen 2022-12-01 23:28:04 -07:00
3848 changed files with 57577 additions and 20291 deletions
+10 -4
View File
@@ -15,22 +15,28 @@ environment:
global: global:
CONDA_INSTALL_LOCN: C:\\Miniconda37-x64 CONDA_INSTALL_LOCN: C:\\Miniconda37-x64
CTEST_OUTPUT_ON_FAILURE: 1 CTEST_OUTPUT_ON_FAILURE: 1
matrix:
- BUILD_DEFAULT_API: "ON"
BUILD_INDEX64_EXT_API: "OFF"
- BUILD_DEFAULT_API: "OFF"
BUILD_INDEX64_EXT_API: "ON"
install: install:
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat - call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
# - conda config --set auto_update_conda false # - conda config --set auto_update_conda false
- conda install -c conda-forge --yes --quiet flang=11.0.1 jom - conda install -c conda-forge --yes --quiet flang flang-rt_win-64 cmake ninja
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
- set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%" - set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%"
- set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%" - set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%"
before_build: before_build:
- ps: if (-Not (Test-Path .\build)) { mkdir build } - ps: if (-Not (Test-Path .\build)) { mkdir build }
- cd build - cd build
- cmake -G "NMake Makefiles JOM" -DCMAKE_Fortran_COMPILER=flang -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON .. - cmake -G "Ninja" -DCMAKE_Fortran_COMPILER=flang -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCBLAS=ON -DLAPACKE=ON -DLAPACKE_WITH_TMG=ON -DBUILD_DEFAULT_API=%BUILD_DEFAULT_API% -DBUILD_INDEX64_EXT_API=%BUILD_INDEX64_EXT_API% ..
# - cmake -G "NMake Makefiles JOM" -DCMAKE_Fortran_COMPILER=flang -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON ..
build_script: build_script:
- cmake --build . - cmake --build .
test_script: test_script:
- ctest -j2 - ctest -j2 --output-on-failure
+65
View File
@@ -0,0 +1,65 @@
using BinaryBuilder, Pkg
haskey(ENV, "BLAS_LAPACK_RELEASE") || error("The environment variable BLAS_LAPACK_RELEASE is not defined.")
haskey(ENV, "BLAS_LAPACK_COMMIT") || error("The environment variable BLAS_LAPACK_COMMIT is not defined.")
haskey(ENV, "BLAS_LAPACK_URL") || error("The environment variable BLAS_LAPACK_URL is not defined.")
name = "blas_lapack"
version = VersionNumber(ENV["BLAS_LAPACK_RELEASE"])
# Collection of sources required to complete build
sources = [
GitSource(ENV["BLAS_LAPACK_URL"], ENV["BLAS_LAPACK_COMMIT"])
]
# Bash recipe for building across all platforms
script = raw"""
cd ${WORKSPACE}/srcdir/lapack
# FortranCInterface_VERIFY fails on macOS, but it's not actually needed for the current build
sed -i 's/FortranCInterface_VERIFY/# FortranCInterface_VERIFY/g' ./CBLAS/CMakeLists.txt
sed -i 's/FortranCInterface_VERIFY/# FortranCInterface_VERIFY/g' ./LAPACKE/include/CMakeLists.txt
mkdir build && cd build
cmake .. \
-DCBLAS=ON \
-DLAPACKE=ON \
-DCMAKE_INSTALL_PREFIX="$prefix" \
-DCMAKE_FIND_ROOT_PATH="$prefix" \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_INDEX64_EXT_API=OFF \
-DTEST_FORTRAN_COMPILER=OFF \
-DLAPACKE_WITH_TMG=OFF
make -j${nproc}
make install
install_license $WORKSPACE/srcdir/lapack/LICENSE
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = expand_gfortran_versions(platforms)
# The products that we will ensure are always built
products = [
FileProduct("lib/libblas.a", :libblas_a),
FileProduct("lib/libcblas.a", :libcblas_a),
FileProduct("lib/liblapack.a", :liblapack_a),
FileProduct("lib/liblapacke.a", :liblapacke_a),
# LibraryProduct("libblas", :libblas),
# LibraryProduct("libcblas", :libcblas),
# LibraryProduct("liblapack", :liblapack),
# LibraryProduct("liblapacke", :liblapacke),
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
+90
View File
@@ -0,0 +1,90 @@
# Version
haskey(ENV, "BLAS_LAPACK_RELEASE") || error("The environment variable BLAS_LAPACK_RELEASE is not defined.")
version = VersionNumber(ENV["BLAS_LAPACK_RELEASE"])
version2 = ENV["BLAS_LAPACK_RELEASE"]
package = "blas_lapack"
platforms = [
("aarch64-apple-darwin-libgfortran5" , "lib", "dylib"),
# ("aarch64-linux-gnu-libgfortran3" , "lib", "so" ),
# ("aarch64-linux-gnu-libgfortran4" , "lib", "so" ),
("aarch64-linux-gnu-libgfortran5" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran3" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran4" , "lib", "so" ),
# ("aarch64-linux-musl-libgfortran5" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran3" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran4" , "lib", "so" ),
# ("powerpc64le-linux-gnu-libgfortran5" , "lib", "so" ),
# ("x86_64-apple-darwin-libgfortran3" , "lib", "dylib"),
# ("x86_64-apple-darwin-libgfortran4" , "lib", "dylib"),
("x86_64-apple-darwin-libgfortran5" , "lib", "dylib"),
# ("x86_64-linux-gnu-libgfortran3" , "lib", "so" ),
# ("x86_64-linux-gnu-libgfortran4" , "lib", "so" ),
("x86_64-linux-gnu-libgfortran5" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran3" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran4" , "lib", "so" ),
# ("x86_64-linux-musl-libgfortran5" , "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran3", "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran4", "lib", "so" ),
# ("x86_64-unknown-freebsd-libgfortran5", "lib", "so" ),
# ("x86_64-w64-mingw32-libgfortran3" , "bin", "dll" ),
# ("x86_64-w64-mingw32-libgfortran4" , "bin", "dll" ),
("x86_64-w64-mingw32-libgfortran5" , "bin", "dll" ),
]
for (platform, libdir, ext) in platforms
tarball_name = "$package.v$version.$platform.tar.gz"
if isfile("products/$(tarball_name)")
# Unzip the tarball generated by BinaryBuilder.jl
isdir("products/$platform") && rm("products/$platform", recursive=true)
mkdir("products/$platform")
run(`tar -xzf products/$(tarball_name) -C products/$platform`)
if isfile("products/$platform/deps.tar.gz")
# Unzip the tarball of the dependencies
run(`tar -xzf products/$platform/deps.tar.gz -C products/$platform`)
# Copy the license of each dependency
for folder in readdir("products/$platform/deps/licenses")
cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder")
end
rm("products/$platform/deps/licenses", recursive=true)
# Copy the shared library of each dependency
for file in readdir("products/$platform/deps")
cp("products/$platform/deps/$file", "products/$platform/$libdir/$file")
end
# Remove the folder used to unzip the tarball of the dependencies
rm("products/$platform/deps", recursive=true)
rm("products/$platform/deps.tar.gz", recursive=true)
end
# Create the archives *_binaries
isfile("$(package)_binaries.$version2.$platform.tar.gz") && rm("$(package)_binaries.$version2.$platform.tar.gz")
isfile("$(package)_binaries.$version2.$platform.zip") && rm("$(package)_binaries.$version2.$platform.zip")
cd("products/$platform")
# Create a folder with the version number of the package
mkdir("$(package)_binaries.$version2")
for folder in ("include", "share", "lib")
cp(folder, "$(package)_binaries.$version2/$folder")
end
cd("$(package)_binaries.$version2")
if ext == "dll"
run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip include share lib`)
else
run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz include share lib`)
end
cd("../../..")
# Remove the folder used to unzip the tarball generated by BinaryBuilder.jl
rm("products/$platform", recursive=true)
else
@warn("The tarball for the platform $platform was not generated!")
end
end
+197 -24
View File
@@ -7,6 +7,7 @@ on:
- try-github-actions-for-windows - try-github-actions-for-windows
paths: paths:
- .github/workflows/cmake.yml - .github/workflows/cmake.yml
- lapack_testing.py
- '**CMakeLists.txt' - '**CMakeLists.txt'
- 'BLAS/**' - 'BLAS/**'
- 'CBLAS/**' - 'CBLAS/**'
@@ -21,6 +22,7 @@ on:
pull_request: pull_request:
paths: paths:
- .github/workflows/cmake.yml - .github/workflows/cmake.yml
- lapack_testing.py
- '**CMakeLists.txt' - '**CMakeLists.txt'
- 'BLAS/**' - 'BLAS/**'
- 'CBLAS/**' - 'CBLAS/**'
@@ -48,7 +50,7 @@ jobs:
test-install-release: test-install-release:
# Use GNU compilers # Use GNU compilers
# The CMake configure and build commands are platform agnostic and should work equally # 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 # well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage. # cross-platform coverage.
@@ -62,19 +64,16 @@ jobs:
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ] os: [ macos-latest, ubuntu-latest, ubuntu-24.04-arm, windows-latest ]
fflags: [ 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",
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ] "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
steps: steps:
- name: Checkout LAPACK - name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
- name: Use GCC-14 on MacOS - name: Use GCC-14 on MacOS
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
run: > run: >
@@ -90,7 +89,8 @@ jobs:
-D CMAKE_EXE_LINKER_FLAGS="-Wl,--stack=2097152" -D CMAKE_EXE_LINKER_FLAGS="-Wl,--stack=2097152"
- name: Configure CMake - 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. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using
# a single-configuration generator such as make or Ninja.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: > run: >
cmake -B build -G Ninja cmake -B build -G Ninja
@@ -103,9 +103,9 @@ jobs:
-D BUILD_SHARED_LIBS:BOOL=ON -D BUILD_SHARED_LIBS:BOOL=ON
- name: Build - name: Build
# Execute tests defined by the CMake configuration. # Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cmake --build build --config ${{env.BUILD_TYPE}} run: cmake --build build
- name: Test with OpenMP - name: Test with OpenMP
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
@@ -117,16 +117,53 @@ jobs:
if: ${{ !contains( matrix.fflags, 'openmp' ) && (matrix.os != 'windows-latest') }} if: ${{ !contains( matrix.fflags, 'openmp' ) && (matrix.os != 'windows-latest') }}
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 100 run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 100
- name: Upload test results
id: upload-test-results
# Uploaded even when the tests failed; that is when the results
# are needed most. The test summary below links to the artifact.
if: ${{ !cancelled() && matrix.os != 'windows-latest' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-${{ matrix.os }}-${{ contains( matrix.fflags, 'openmp' ) && 'openmp' || 'no-openmp' }}
path: |
build/TESTING/testing_results.txt
build/lapack_testing_junit.xml
if-no-files-found: warn
retention-days: 14
- name: Write test summary
if: ${{ !cancelled() && matrix.os != 'windows-latest' }}
env:
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
run: |
cd build 2>/dev/null || exit 0
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
if [ -f summary.md ]; then
cat summary.md >> "$GITHUB_STEP_SUMMARY"
if [ -n "$ARTIFACT_URL" ]; then
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
fi
fi
- name: Install - name: Install
# Since we use a single configuration generator, Ninja, there is no need to provide
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
run: cmake --build build --target install -j2 run: cmake --build build --target install -j2
coverage: test-extended-api-only:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
BUILD_TYPE: Coverage BUILD_TYPE: Release
FFLAGS: "-fopenmp" FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all"
steps:
strategy:
fail-fast: true
matrix:
shared_libs: [ OFF, ON ]
steps:
- name: Checkout LAPACK - name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
@@ -134,7 +171,73 @@ jobs:
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3 uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
- name: Configure CMake - 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. run: >
cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D BUILD_SHARED_LIBS:BOOL=${{matrix.shared_libs}}
-D BUILD_DEFAULT_API:BOOL=OFF
-D BUILD_INDEX64_EXT_API:BOOL=ON
-D BUILD_TESTING:BOOL=ON
-D CBLAS:BOOL=ON
-D LAPACKE:BOOL=ON
-D LAPACKE_WITH_TMG:BOOL=ON
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 100
- name: Upload test results
id: upload-test-results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-extended-api-shared-${{ matrix.shared_libs }}
path: |
build/TESTING/testing_results.txt
build/lapack_testing_junit.xml
if-no-files-found: warn
retention-days: 14
- name: Write test summary
if: ${{ !cancelled() }}
env:
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
run: |
cd build 2>/dev/null || exit 0
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
if [ -f summary.md ]; then
cat summary.md >> "$GITHUB_STEP_SUMMARY"
if [ -n "$ARTIFACT_URL" ]; then
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
fi
fi
coverage:
runs-on: ubuntu-latest
env:
BUILD_TYPE: Coverage
FFLAGS: "-fopenmp"
steps:
- name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# Codecov cannot determine which commit a report belongs to from a
# depth-1 clone of a pull request merge commit.
fetch-depth: 2
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
- 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 or Ninja.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: > run: >
cmake -B build -G Ninja cmake -B build -G Ninja
@@ -147,17 +250,75 @@ jobs:
-D BUILD_SHARED_LIBS:BOOL=ON -D BUILD_SHARED_LIBS:BOOL=ON
- name: Install - name: Install
# Since we use a single configuration generator, Ninja, there is no need to provide
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
run: cmake --build build --target install -j2 run: cmake --build build --target install -j2
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 1800
- name: Coverage - name: Coverage
# Since we use a single configuration generator, Ninja, there is no need to provide
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
if: ${{ !cancelled() }}
run: cmake --build build --target coverage
- name: Summarize coverage
# The coverage target discards gcov's output, so an entirely empty report
# is indistinguishable from a good one unless we look at the numbers.
# Print them, and fail if nothing was measured at all.
if: ${{ !cancelled() }}
run: | run: |
echo "Coverage" gcda=$(find build -name '*.gcda' | wc -l)
cmake --build build --target coverage reports=$(find build -name '*.gcov' | wc -l)
bash <(curl -s https://codecov.io/bash) -X gcov echo "counter files (.gcda): ${gcda}"
echo "gcov reports (.gcov): ${reports}"
if [ "${gcda}" -eq 0 ] || [ "${reports}" -eq 0 ]; then
echo "::error::No coverage data was recorded; the report would be empty."
exit 1
fi
# In a gcov report an executed line is prefixed with its execution
# count and an unexecuted one with '#####' or '====='; everything else
# ('-') is not executable.
set -- $(find build -name '*.gcov' -exec cat {} + | awk '
/^ *[0-9]+[*]?:/ { hit++; next }
/^ *(#####|=====):/ { miss++ }
END { printf "%d %d\n", hit + 0, hit + miss + 0 }')
hit=$1
total=$2
if [ "${hit}" -eq 0 ]; then
echo "::error::Coverage report is empty: not a single line was executed."
exit 1
fi
percent=$(awk -v h="${hit}" -v t="${total}" 'BEGIN { printf "%.2f", 100 * h / t }')
echo "lines executed: ${hit} of ${total} (${percent}%)"
printf '## Coverage\n\n%s%% of lines executed (%s of %s) across %s files.\n' \
"${percent}" "${hit}" "${total}" "${reports}" >> "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
# The .gcov files already exist, so there is no need for the uploader
# to run gcov a second time itself.
plugins: noop
verbose: true
# Pull requests from forks have no access to repository secrets, so
# they can only upload if the Codecov organization permits tokenless
# uploads. Do not turn that into a CI failure for the contributor.
fail_ci_if_error: ${{ secrets.CODECOV_TOKEN != '' }}
test-install-cblas-lapacke-without-fortran-compiler: test-install-cblas-lapacke-without-fortran-compiler:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
BUILD_TYPE: Release
steps: steps:
- name: Checkout LAPACK - name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
@@ -171,9 +332,12 @@ jobs:
sudo apt purge gfortran sudo apt purge gfortran
- name: Configure CMake - 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 or Ninja.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: > run: >
cmake -B build -G Ninja cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=Release -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=ON -D CBLAS:BOOL=ON
-D LAPACKE:BOOL=ON -D LAPACKE:BOOL=ON
@@ -184,10 +348,14 @@ jobs:
-D BUILD_SHARED_LIBS:BOOL=ON -D BUILD_SHARED_LIBS:BOOL=ON
- name: Install - name: Install
# Since we use a single configuration generator, Ninja, there is no need to provide
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
run: cmake --build build --target install -j2 run: cmake --build build --target install -j2
memory-check: memory-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
BUILD_TYPE: Debug BUILD_TYPE: Debug
@@ -198,13 +366,16 @@ jobs:
- name: Install ninja-build tool - name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3 uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
- name: Install APT packages - name: Install APT packages
run: | run: |
sudo apt update sudo apt update
sudo apt install -y cmake valgrind gfortran sudo apt install -y cmake valgrind gfortran
- name: Configure CMake - 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 or Ninja.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: > run: >
cmake -B build -G Ninja cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
@@ -216,12 +387,14 @@ jobs:
-D LAPACK_TESTING_USE_PYTHON:BOOL=OFF -D LAPACK_TESTING_USE_PYTHON:BOOL=OFF
- name: Build - name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}} # Since we use a single configuration generator, Ninja, there is no need to provide
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
run: cmake --build build
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: | run: |
ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 -T memcheck > memcheck.out ctest -C ${{env.BUILD_TYPE}} --output-on-failure --schedule-random -j2 -T memcheck > memcheck.out
cat memcheck.out cat memcheck.out
if tail -n 1 memcheck.out | grep -q "Memory checking results:"; then if tail -n 1 memcheck.out | grep -q "Memory checking results:"; then
exit 0 exit 0
+239
View File
@@ -0,0 +1,239 @@
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v2023.11.15
jobs:
build-linux-x64:
name: blas / lapack -- Linux (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-linux-gnu-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-linux-gnu-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
build-linux-aarch64:
name: blas / lapack -- Linux (aarch64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- aarch64-linux-gnu-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl aarch64-linux-gnu-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
build-windows-x64:
name: blas / lapack -- Windows (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-w64-mingw32-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-w64-mingw32-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
build-mac-x64:
name: blas / lapack -- macOS (x86_64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- x86_64-apple-darwin-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl x86_64-apple-darwin-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
build-mac-aarch64:
name: blas / lapack -- macOS (aarch64) -- Release ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.7"
arch: x64
- name: Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, BLAS_LAPACK_RELEASE, BLAS_LAPACK_COMMIT
shell: bash
run: |
echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
echo "BLAS_LAPACK_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
echo "BLAS_LAPACK_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Cross-compilation of blas / lapack -- aarch64-apple-darwin-libgfortran5
run: |
julia --color=no -e 'using Pkg; Pkg.add("BinaryBuilder")'
julia --color=no .github/julia/build_tarballs.jl aarch64-apple-darwin-libgfortran5 --verbose
- name: Archive artifact
run: julia --color=no .github/julia/generate_binaries.jl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
release:
name: Create Release and Upload Binaries
needs: [build-windows-x64, build-linux-x64, build-linux-aarch64, build-mac-x64, build-mac-aarch64]
runs-on: ubuntu-latest
steps:
- name: Checkout lapack
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .
- name: Create GitHub Release
run: |
gh release create ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
--notes "" \
--verify-tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.linux.x86_64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux (aarch64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.linux.aarch64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Mac (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.mac.x86_64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Mac (aarch64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz/blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz#blas_lapack.${{ github.ref_name }}.mac.aarch64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows (x86_64) artifact
run: |
gh release upload ${{ github.ref_name }} \
blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip/blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip#blas_lapack.${{ github.ref_name }}.windows.x86_64.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+4 -4
View File
@@ -32,12 +32,12 @@ jobs:
steps: steps:
- name: "Checkout code" - name: "Checkout code"
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag=v4.2.0
with: with:
persist-credentials: false persist-credentials: false
- name: "Run analysis" - name: "Run analysis"
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0 uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
@@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f9a7c6738f28efb36e31d49c53a201a9c5d6a476 # v2.14.2 uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with: with:
sarif_file: results.sarif sarif_file: results.sarif
+9
View File
@@ -1,5 +1,9 @@
# ignore objects and archives, anywhere in the tree. # ignore objects and archives, anywhere in the tree.
*.[oa] *.[oa]
*.so
*.dll
*.dylib
*.pdb
# test in INSTALL # test in INSTALL
INSTALL/test* INSTALL/test*
@@ -23,6 +27,7 @@ CBLAS/examples/cblas_ex1
CBLAS/examples/cblas_ex2 CBLAS/examples/cblas_ex2
# LAPACK testing # LAPACK testing
/lapack_testing_junit.xml
TESTING/LIN/xlintst* TESTING/LIN/xlintst*
TESTING/EIG/xeigtst* TESTING/EIG/xeigtst*
TESTING/EIG/xdmd* TESTING/EIG/xdmd*
@@ -43,3 +48,7 @@ build*
DOCS/man DOCS/man
DOCS/explore-html DOCS/explore-html
output_err output_err
# Mod files from compilation in SRC
SRC/la_constants.mod
SRC/la_xisnan.mod
+65 -67
View File
@@ -29,31 +29,33 @@
# Level 1 BLAS # Level 1 BLAS
#--------------------------------------------------------- #---------------------------------------------------------
set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f90 set(LAPACK_INSTALL_EXPORT_NAME ${BLASLIB}-targets)
srot.f srotg.f90 sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
set(CBLAS1 scabs1.f scasum.f scnrm2.f90 icamax.f caxpy.f ccopy.f set(SBLAS1
cdotc.f cdotu.f csscal.f crotg.f90 cscal.f cswap.f csrot.f) isamax.f sasum.f saxpy.f saxpby.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.f90 set(CBLAS1
drot.f drotg.f90 dscal.f dsdot.f dswap.f drotmg.f drotm.f) scabs1.f scasum.f scnrm2.f90 icamax.f90 caxpy.f caxpby.f ccopy.f cdotc.f
cdotu.f csscal.f crotg.f90 cscal.f cswap.f csrot.f)
set(DBLAS1
idamax.f dasum.f daxpy.f daxpby.f dcopy.f ddot.f dnrm2.f90 drot.f drotg.f90
dscal.f dsdot.f dswap.f drotmg.f drotm.f)
set(DB1AUX sscal.f isamax.f) set(DB1AUX sscal.f isamax.f)
set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f90 izamax.f zaxpy.f zcopy.f set(ZBLAS1
zdotc.f zdotu.f zdscal.f zrotg.f90 zscal.f zswap.f zdrot.f) dcabs1.f dzasum.f dznrm2.f90 izamax.f90 zaxpy.f zaxpby.f zcopy.f zdotc.f
zdotu.f zdscal.f zrotg.f90 zscal.f zswap.f zdrot.f)
set(CB1AUX set(CB1AUX
isamax.f idamax.f isamax.f idamax.f sasum.f saxpy.f scopy.f sdot.f sgemm.f sgemv.f snrm2.f90
sasum.f saxpy.f scopy.f sdot.f sgemm.f sgemv.f snrm2.f90 srot.f sscal.f srot.f sscal.f sswap.f)
sswap.f)
set(ZB1AUX set(ZB1AUX
icamax.f idamax.f icamax.f90 idamax.f cgemm.f cherk.f cscal.f ctrsm.f dasum.f daxpy.f dcopy.f
cgemm.f cherk.f cscal.f ctrsm.f ddot.f dgemm.f dgemv.f dnrm2.f90 drot.f dscal.f dswap.f scabs1.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 # Auxiliary routines needed by both the Level 2 and Level 3 BLAS
@@ -63,34 +65,40 @@ set(ALLBLAS lsame.f xerbla.f xerbla_array.f)
#--------------------------------------------------------- #---------------------------------------------------------
# Level 2 BLAS # Level 2 BLAS
#--------------------------------------------------------- #---------------------------------------------------------
set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f set(SBLAS2
strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f strmv.f stbmv.f stpmv.f strsv.f
sger.f ssyr.f sspr.f ssyr2.f sspr2.f) stbsv.f stpsv.f sger.f ssyr.f sspr.f ssyr2.f sspr2.f sskewsymv.f sskewsyr2.f)
set(CBLAS2 cgemv.f cgbmv.f chemv.f chbmv.f chpmv.f set(CBLAS2
ctrmv.f ctbmv.f ctpmv.f ctrsv.f ctbsv.f ctpsv.f cgemv.f cgbmv.f chemv.f chbmv.f chpmv.f ctrmv.f ctbmv.f ctpmv.f ctrsv.f
cgerc.f cgeru.f cher.f chpr.f cher2.f chpr2.f) ctbsv.f ctpsv.f cgerc.f cgeru.f cher.f chpr.f cher2.f chpr2.f)
set(DBLAS2 dgemv.f dgbmv.f dsymv.f dsbmv.f dspmv.f set(DBLAS2
dtrmv.f dtbmv.f dtpmv.f dtrsv.f dtbsv.f dtpsv.f dgemv.f dgbmv.f dsymv.f dsbmv.f dspmv.f dtrmv.f dtbmv.f dtpmv.f dtrsv.f
dger.f dsyr.f dspr.f dsyr2.f dspr2.f) dtbsv.f dtpsv.f dger.f dsyr.f dspr.f dsyr2.f dspr2.f dskewsymv.f dskewsyr2.f)
set(ZBLAS2 zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f set(ZBLAS2
ztrmv.f ztbmv.f ztpmv.f ztrsv.f ztbsv.f ztpsv.f zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f ztrmv.f ztbmv.f ztpmv.f ztrsv.f
zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f) ztbsv.f ztpsv.f zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f)
#--------------------------------------------------------- #---------------------------------------------------------
# Level 3 BLAS # Level 3 BLAS
#--------------------------------------------------------- #---------------------------------------------------------
set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f sgemmtr.f) set(SBLAS3
sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f sgemmtr.f sskewsymm.f
sskewsyr2k.f)
set(CBLAS3 cgemm.f csymm.f csyrk.f csyr2k.f ctrmm.f ctrsm.f set(CBLAS3
chemm.f cherk.f cher2k.f cgemmtr.f) cgemm.f csymm.f csyrk.f csyr2k.f ctrmm.f ctrsm.f chemm.f cherk.f cher2k.f
cgemmtr.f)
set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f dgemmtr.f) set(DBLAS3
dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f dgemmtr.f dskewsymm.f
dskewsyr2k.f)
set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f set(ZBLAS3
zhemm.f zherk.f zher2k.f zgemmtr.f) zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f zhemm.f zherk.f zher2k.f
zgemmtr.f)
set(SOURCES) set(SOURCES)
@@ -109,53 +117,43 @@ if(BUILD_COMPLEX16)
endif() endif()
list(REMOVE_DUPLICATES SOURCES) list(REMOVE_DUPLICATES SOURCES)
add_library(${BLASLIB}_obj OBJECT ${SOURCES}) if(BUILD_DEFAULT_API)
set_target_properties(${BLASLIB}_obj PROPERTIES POSITION_INDEPENDENT_CODE ON) add_library(${BLASLIB}_obj OBJECT ${SOURCES})
endif()
if(BUILD_INDEX64_EXT_API) if(BUILD_INDEX64_EXT_API)
set(SOURCES_64_F) include(ExtendedAPIHelpers)
# Copy files so we can set source property specific to /${BLASLIB}_64_obj target generate_64bit_suffixed_sources(${BLASLIB} SOURCES SOURCES_64)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLASLIB}_64_obj)
file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${BLASLIB}_64_obj) add_library(${BLASLIB}_64_obj OBJECT ${SOURCES_64})
file(GLOB SOURCES_64_F ${CMAKE_CURRENT_BINARY_DIR}/${BLASLIB}_64_obj/*.f*)
add_library(${BLASLIB}_64_obj OBJECT ${SOURCES_64_F})
target_compile_options(${BLASLIB}_64_obj PRIVATE ${FOPT_ILP64}) target_compile_options(${BLASLIB}_64_obj PRIVATE ${FOPT_ILP64})
set_target_properties(${BLASLIB}_64_obj PROPERTIES POSITION_INDEPENDENT_CODE ON)
#Add _64 suffix to all Fortran functions via macros
foreach(F IN LISTS SOURCES_64_F)
if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
set_source_files_properties(${F} PROPERTIES COMPILE_FLAGS "-fpp")
else()
set_source_files_properties(${F} PROPERTIES COMPILE_FLAGS "-cpp")
endif()
file(STRINGS ${F} ${F}.lst)
list(FILTER ${F}.lst INCLUDE REGEX "subroutine|SUBROUTINE|external|EXTERNAL|function|FUNCTION")
list(FILTER ${F}.lst EXCLUDE REGEX "^!.*")
list(FILTER ${F}.lst EXCLUDE REGEX "^[*].*")
list(FILTER ${F}.lst EXCLUDE REGEX "end|END")
foreach(FUNC IN LISTS ${F}.lst)
string(REGEX REPLACE "^[a-zA-Z0-9_ *]*(subroutine|SUBROUTINE|external|EXTERNAL|function|FUNCTION)[ ]*[*]?" "" FUNC ${FUNC})
string(REGEX REPLACE "[(][a-zA-Z0-9_, )]*$" "" FUNC ${FUNC})
string(STRIP ${FUNC} FUNC)
list(APPEND COPT_64_F "${FUNC}=${FUNC}_64")
endforeach()
list(REMOVE_DUPLICATES COPT_64_F)
set_source_files_properties(${F} PROPERTIES COMPILE_DEFINITIONS "${COPT_64_F}")
endforeach()
endif() endif()
add_library(${BLASLIB} add_library(${BLASLIB}
$<TARGET_OBJECTS:${BLASLIB}_obj> $<$<BOOL:${BUILD_DEFAULT_API}>: $<TARGET_OBJECTS:${BLASLIB}_obj>>
$<$<BOOL:${BUILD_INDEX64_EXT_API}>: $<TARGET_OBJECTS:${BLASLIB}_64_obj>>) $<$<BOOL:${BUILD_INDEX64_EXT_API}>: $<TARGET_OBJECTS:${BLASLIB}_64_obj>>)
# For flang, use C linker instead of Fortran linker to avoid macOS-specific flags
# that CMake adds (tested CMake 4.2).
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
set_target_properties (${BLASLIB} PROPERTIES LINKER_LANGUAGE C)
endif()
set_target_properties( set_target_properties(
${BLASLIB} PROPERTIES ${BLASLIB} PROPERTIES
VERSION ${LAPACK_VERSION} VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION} SOVERSION ${LAPACK_MAJOR_VERSION}
POSITION_INDEPENDENT_CODE ON
) )
lapack_install_library(${BLASLIB}) lapack_install_library(${BLASLIB})
add_library(BLAS::BLAS ALIAS ${BLASLIB})
install(EXPORT ${BLASLIB}-targets
FILE ${BLASLIB}-targets.cmake
NAMESPACE BLAS::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION}
COMPONENT Development
)
if( TEST_FORTRAN_COMPILER ) if( TEST_FORTRAN_COMPILER )
add_dependencies( ${BLASLIB} run_test_zcomplexabs run_test_zcomplexdiv run_test_zcomplexmult run_test_zminMax ) add_dependencies( ${BLASLIB} run_test_zcomplexabs run_test_zcomplexdiv run_test_zcomplexmult run_test_zminMax )
endif() endif()
+12 -8
View File
@@ -69,19 +69,19 @@ all: $(BLASLIB)
# Comment out the next 6 definitions if you already have # Comment out the next 6 definitions if you already have
# the Level 1 BLAS. # the Level 1 BLAS.
#--------------------------------------------------------- #---------------------------------------------------------
SBLAS1 = isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o \ SBLAS1 = isamax.o sasum.o saxpy.o saxpby.o scopy.o sdot.o snrm2.o \
srot.o srotg.o sscal.o sswap.o sdsdot.o srotmg.o srotm.o srot.o srotg.o sscal.o sswap.o sdsdot.o srotmg.o srotm.o
$(SBLAS1): $(FRC) $(SBLAS1): $(FRC)
CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o ccopy.o \ CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o caxpby.o ccopy.o \
cdotc.o cdotu.o csscal.o crotg.o cscal.o cswap.o csrot.o cdotc.o cdotu.o csscal.o crotg.o cscal.o cswap.o csrot.o
$(CBLAS1): $(FRC) $(CBLAS1): $(FRC)
DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \ DBLAS1 = idamax.o dasum.o daxpy.o daxpby.o dcopy.o ddot.o dnrm2.o \
drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o
$(DBLAS1): $(FRC) $(DBLAS1): $(FRC)
ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zcopy.o \ ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zaxpby.o zcopy.o \
zdotc.o zdotu.o zdscal.o zrotg.o zscal.o zswap.o zdrot.o zdotc.o zdotu.o zdscal.o zrotg.o zscal.o zswap.o zdrot.o
$(ZBLAS1): $(FRC) $(ZBLAS1): $(FRC)
@@ -105,7 +105,8 @@ $(ALLBLAS): $(FRC)
#--------------------------------------------------------- #---------------------------------------------------------
SBLAS2 = sgemv.o sgbmv.o ssymv.o ssbmv.o sspmv.o \ SBLAS2 = sgemv.o sgbmv.o ssymv.o ssbmv.o sspmv.o \
strmv.o stbmv.o stpmv.o strsv.o stbsv.o stpsv.o \ strmv.o stbmv.o stpmv.o strsv.o stbsv.o stpsv.o \
sger.o ssyr.o sspr.o ssyr2.o sspr2.o sger.o ssyr.o sspr.o ssyr2.o sspr2.o \
sskewsymv.o sskewsyr2.o
$(SBLAS2): $(FRC) $(SBLAS2): $(FRC)
CBLAS2 = cgemv.o cgbmv.o chemv.o chbmv.o chpmv.o \ CBLAS2 = cgemv.o cgbmv.o chemv.o chbmv.o chpmv.o \
@@ -115,7 +116,8 @@ $(CBLAS2): $(FRC)
DBLAS2 = dgemv.o dgbmv.o dsymv.o dsbmv.o dspmv.o \ DBLAS2 = dgemv.o dgbmv.o dsymv.o dsbmv.o dspmv.o \
dtrmv.o dtbmv.o dtpmv.o dtrsv.o dtbsv.o dtpsv.o \ dtrmv.o dtbmv.o dtpmv.o dtrsv.o dtbsv.o dtpsv.o \
dger.o dsyr.o dspr.o dsyr2.o dspr2.o dger.o dsyr.o dspr.o dsyr2.o dspr2.o \
dskewsymv.o dskewsyr2.o
$(DBLAS2): $(FRC) $(DBLAS2): $(FRC)
ZBLAS2 = zgemv.o zgbmv.o zhemv.o zhbmv.o zhpmv.o \ ZBLAS2 = zgemv.o zgbmv.o zhemv.o zhbmv.o zhpmv.o \
@@ -127,14 +129,16 @@ $(ZBLAS2): $(FRC)
# Comment out the next 4 definitions if you already have # Comment out the next 4 definitions if you already have
# the Level 3 BLAS. # the Level 3 BLAS.
#--------------------------------------------------------- #---------------------------------------------------------
SBLAS3 = sgemm.o ssymm.o ssyrk.o ssyr2k.o strmm.o strsm.o sgemmtr.o SBLAS3 = sgemm.o ssymm.o ssyrk.o ssyr2k.o strmm.o strsm.o sgemmtr.o \
sskewsymm.o sskewsyr2k.o
$(SBLAS3): $(FRC) $(SBLAS3): $(FRC)
CBLAS3 = cgemm.o csymm.o csyrk.o csyr2k.o ctrmm.o ctrsm.o \ CBLAS3 = cgemm.o csymm.o csyrk.o csyr2k.o ctrmm.o ctrsm.o \
chemm.o cherk.o cher2k.o cgemmtr.o chemm.o cherk.o cher2k.o cgemmtr.o
$(CBLAS3): $(FRC) $(CBLAS3): $(FRC)
DBLAS3 = dgemm.o dsymm.o dsyrk.o dsyr2k.o dtrmm.o dtrsm.o dgemmtr.o DBLAS3 = dgemm.o dsymm.o dsyrk.o dsyr2k.o dtrmm.o dtrsm.o dgemmtr.o \
dskewsymm.o dskewsyr2k.o
$(DBLAS3): $(FRC) $(DBLAS3): $(FRC)
ZBLAS3 = zgemm.o zsymm.o zsyrk.o zsyr2k.o ztrmm.o ztrsm.o \ ZBLAS3 = zgemm.o zsymm.o zsyrk.o zsyr2k.o ztrmm.o ztrsm.o \
+144
View File
@@ -0,0 +1,144 @@
*> \brief \b CAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE CAXPBY(N,CA,CX,INCX,CB,CY,INCY)
*
* .. Scalar Arguments ..
* COMPLEX CA,CB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* COMPLEX CX(*),CY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> CAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] CA
*> \verbatim
*> CA is COMPLEX
*> On entry, CA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] CX
*> \verbatim
*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of CX
*> \endverbatim
*>
*> \param[in] CB
*> \verbatim
*> CB is COMPLEX
*> On entry, CB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] CY
*> \verbatim
*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of CY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE CAXPBY(N,CA,CX,INCX,CB,CY,INCY)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
COMPLEX CA, CB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
COMPLEX CX(*),CY(*)
* ..
* .. External Subroutines ..
EXTERNAL CSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY
* ..
IF (N.LE.0) RETURN
IF (CA .EQ. (0.0,0.0) .AND. CB.NE.(0.0,0.0)) THEN
CALL CSCAL(N,CB, CY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
CY(I) = CB*CY(I) + CA*CX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
CY(IY) = CB*CY(IY) + CA*CX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
*
RETURN
*
* End of CAXBPY
*
END
+8 -4
View File
@@ -85,6 +85,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY) SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -102,13 +103,16 @@
* *
* .. Local Scalars .. * .. Local Scalars ..
INTEGER I,IX,IY INTEGER I,IX,IY
COMPLEX CDUM
* .. * ..
* .. External Functions .. * .. Statement Functions ..
REAL SCABS1 REAL CABS1
EXTERNAL SCABS1 * ..
* .. Statement Function definitions ..
CABS1(CDUM) = ABS(REAL(CDUM)) + ABS(AIMAG(CDUM))
* .. * ..
IF (N.LE.0) RETURN IF (N.LE.0) RETURN
IF (SCABS1(CA).EQ.0.0E+0) RETURN IF (CABS1(CA).EQ.0.0E+0) RETURN
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
* *
* code for both increments equal to 1 * code for both increments equal to 1
+1
View File
@@ -78,6 +78,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CCOPY(N,CX,INCX,CY,INCY) SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -80,6 +80,7 @@
*> *>
* ===================================================================== * =====================================================================
COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY) COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -80,6 +80,7 @@
*> *>
* ===================================================================== * =====================================================================
COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY) COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -187,6 +187,7 @@
* ===================================================================== * =====================================================================
SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX, SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,
+ BETA,Y,INCY) + BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+29 -7
View File
@@ -35,6 +35,16 @@
*> *>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A ) *> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. *> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*>
*> Note: if alpha and/or beta is zero, some parts of the matrix-matrix
*> operations are not performed. This results in the following NaN/Inf
*> propagation quirks:
*>
*> 1. If alpha is zero, NaNs or Infs in A or B do not affect the result.
*> 2. If both alpha and beta are zero, then a zero matrix is returned in C,
*> irrespective of any NaNs or Infs in A, B or C.
*> 3. If only beta is zero, alpha*op( A )*op( B ) is returned, irrespective
*> of any NaNs or Infs in C.
*> \endverbatim *> \endverbatim
* *
* Arguments: * Arguments:
@@ -92,7 +102,9 @@
*> \param[in] ALPHA *> \param[in] ALPHA
*> \verbatim *> \verbatim
*> ALPHA is COMPLEX *> ALPHA is COMPLEX
*> On entry, ALPHA specifies the scalar alpha. *> On entry, ALPHA specifies the scalar alpha. If ALPHA is zero the
*> values in A and B do not affect the result. This also means that
*> NaN/Inf propagation from A and B is inhibited if ALPHA is zero.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] A *> \param[in] A
@@ -102,7 +114,10 @@
*> Before entry with TRANSA = 'N' or 'n', the leading m by k *> Before entry with TRANSA = 'N' or 'n', the leading m by k
*> part of the array A must contain the matrix A, otherwise *> part of the array A must contain the matrix A, otherwise
*> the leading k by m part of the array A must contain the *> the leading k by m part of the array A must contain the
*> matrix A. *> matrix A, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in A affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of A need not be initialized by the caller.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] LDA *> \param[in] LDA
@@ -121,7 +136,10 @@
*> Before entry with TRANSB = 'N' or 'n', the leading k by n *> Before entry with TRANSB = 'N' or 'n', the leading k by n
*> part of the array B must contain the matrix B, otherwise *> part of the array B must contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the *> the leading n by k part of the array B must contain the
*> matrix B. *> matrix B, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in B affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of B need not be initialized by the caller.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] LDB *> \param[in] LDB
@@ -136,16 +154,19 @@
*> \param[in] BETA *> \param[in] BETA
*> \verbatim *> \verbatim
*> BETA is COMPLEX *> BETA is COMPLEX
*> On entry, BETA specifies the scalar beta. When BETA is *> On entry, BETA specifies the scalar beta. If BETA is zero the
*> supplied as zero then C need not be set on input. *> values in C do not affect the result. This also means that
*> NaN/Inf propagation from C is inhibited if BETA is zero.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in,out] C *> \param[in,out] C
*> \verbatim *> \verbatim
*> C is COMPLEX array, dimension ( LDC, N ) *> C is COMPLEX array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must *> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which *> contain the matrix C, except if beta is zero.
*> case C need not be set on entry. *> If beta is zero, none of the values in C affect the result, even
*> if they are NaN/Inf. This also implies that if beta is zero,
*> the matrix elements of C need not be initialized by the caller.
*> On exit, the array C is overwritten by the m by n matrix *> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ). *> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim *> \endverbatim
@@ -185,6 +206,7 @@
* ===================================================================== * =====================================================================
SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB, SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
+ BETA,C,LDC) + BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -3
View File
@@ -50,9 +50,9 @@
*> On entry, UPLO specifies whether the lower or the upper *> On entry, UPLO specifies whether the lower or the upper
*> triangular part of C is access and updated. *> triangular part of C is access and updated.
*> *>
*> UPLO = 'L' or 'l', the lower tringular part of C is used. *> UPLO = 'L' or 'l', the lower triangular part of C is used.
*> *>
*> UPLO = 'U' or 'u', the upper tringular part of C is used. *> UPLO = 'U' or 'u', the upper triangular part of C is used.
*> \endverbatim *> \endverbatim
* *
*> \param[in] TRANSA *> \param[in] TRANSA
@@ -154,7 +154,7 @@
*> Before entry, the leading n by n part of the array C must *> Before entry, the leading n by n part of the array C must
*> contain the matrix C, except when beta is zero, in which *> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry. *> case C need not be set on entry.
*> On exit, the upper or lower trinangular part of the matrix *> On exit, the upper or lower triangular part of the matrix
*> C is overwritten by the n by n matrix *> C is overwritten by the n by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ). *> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim *> \endverbatim
+1
View File
@@ -157,6 +157,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA) SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA) SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -184,6 +184,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -188,6 +188,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -151,6 +151,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -132,6 +132,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA) SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -147,6 +147,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA) SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -194,6 +194,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -170,6 +170,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC) SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -146,6 +146,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY) SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP) SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -142,6 +142,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP) SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -86,6 +86,7 @@
! !
! ===================================================================== ! =====================================================================
subroutine CROTG( a, b, c, s ) subroutine CROTG( a, b, c, s )
implicit none
integer, parameter :: wp = kind(1.e0) integer, parameter :: wp = kind(1.e0)
! !
! -- Reference BLAS level1 routine -- ! -- Reference BLAS level1 routine --
+1
View File
@@ -75,6 +75,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSCAL(N,CA,CX,INCX) SUBROUTINE CSCAL(N,CA,CX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -95,6 +95,7 @@
* *
* ===================================================================== * =====================================================================
SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S ) SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -75,6 +75,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSSCAL(N,SA,CX,INCX) SUBROUTINE CSSCAL(N,SA,CX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -78,6 +78,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSWAP(N,CX,INCX,CY,INCY) SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -185,6 +185,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -164,6 +164,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC) SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+29 -40
View File
@@ -183,6 +183,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX) SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -197,10 +198,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -271,28 +268,24 @@
KPLUS1 = K + 1 KPLUS1 = K + 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) L = KPLUS1 - J
L = KPLUS1 - J DO 10 I = MAX(1,J-K),J - 1
DO 10 I = MAX(1,J-K),J - 1 X(I) = X(I) + TEMP*A(L+I,J)
X(I) = X(I) + TEMP*A(L+I,J) 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*A(KPLUS1,J)
IF (NOUNIT) X(J) = X(J)*A(KPLUS1,J)
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX L = KPLUS1 - J
L = KPLUS1 - J DO 30 I = MAX(1,J-K),J - 1
DO 30 I = MAX(1,J-K),J - 1 X(IX) = X(IX) + TEMP*A(L+I,J)
X(IX) = X(IX) + TEMP*A(L+I,J) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(KPLUS1,J)
IF (NOUNIT) X(JX) = X(JX)*A(KPLUS1,J)
END IF
JX = JX + INCX JX = JX + INCX
IF (J.GT.K) KX = KX + INCX IF (J.GT.K) KX = KX + INCX
40 CONTINUE 40 CONTINUE
@@ -300,29 +293,25 @@
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) L = 1 - J
L = 1 - J DO 50 I = MIN(N,J+K),J + 1,-1
DO 50 I = MIN(N,J+K),J + 1,-1 X(I) = X(I) + TEMP*A(L+I,J)
X(I) = X(I) + TEMP*A(L+I,J) 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*A(1,J)
IF (NOUNIT) X(J) = X(J)*A(1,J)
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX L = 1 - J
L = 1 - J DO 70 I = MIN(N,J+K),J + 1,-1
DO 70 I = MIN(N,J+K),J + 1,-1 X(IX) = X(IX) + TEMP*A(L+I,J)
X(IX) = X(IX) + TEMP*A(L+I,J) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(1,J)
IF (NOUNIT) X(JX) = X(JX)*A(1,J)
END IF
JX = JX - INCX JX = JX - INCX
IF ((N-J).GE.K) KX = KX - INCX IF ((N-J).GE.K) KX = KX - INCX
80 CONTINUE 80 CONTINUE
+29 -40
View File
@@ -186,6 +186,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX) SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -200,10 +201,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -274,59 +271,51 @@
KPLUS1 = K + 1 KPLUS1 = K + 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN L = KPLUS1 - J
L = KPLUS1 - J IF (NOUNIT) X(J) = X(J)/A(KPLUS1,J)
IF (NOUNIT) X(J) = X(J)/A(KPLUS1,J) TEMP = X(J)
TEMP = X(J) DO 10 I = J - 1,MAX(1,J-K),-1
DO 10 I = J - 1,MAX(1,J-K),-1 X(I) = X(I) - TEMP*A(L+I,J)
X(I) = X(I) - TEMP*A(L+I,J) 10 CONTINUE
10 CONTINUE
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
KX = KX - INCX KX = KX - INCX
IF (X(JX).NE.ZERO) THEN IX = KX
IX = KX L = KPLUS1 - J
L = KPLUS1 - J IF (NOUNIT) X(JX) = X(JX)/A(KPLUS1,J)
IF (NOUNIT) X(JX) = X(JX)/A(KPLUS1,J) TEMP = X(JX)
TEMP = X(JX) DO 30 I = J - 1,MAX(1,J-K),-1
DO 30 I = J - 1,MAX(1,J-K),-1 X(IX) = X(IX) - TEMP*A(L+I,J)
X(IX) = X(IX) - TEMP*A(L+I,J) IX = IX - INCX
IX = IX - INCX 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN L = 1 - J
L = 1 - J IF (NOUNIT) X(J) = X(J)/A(1,J)
IF (NOUNIT) X(J) = X(J)/A(1,J) TEMP = X(J)
TEMP = X(J) DO 50 I = J + 1,MIN(N,J+K)
DO 50 I = J + 1,MIN(N,J+K) X(I) = X(I) - TEMP*A(L+I,J)
X(I) = X(I) - TEMP*A(L+I,J) 50 CONTINUE
50 CONTINUE
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
KX = KX + INCX KX = KX + INCX
IF (X(JX).NE.ZERO) THEN IX = KX
IX = KX L = 1 - J
L = 1 - J IF (NOUNIT) X(JX) = X(JX)/A(1,J)
IF (NOUNIT) X(JX) = X(JX)/A(1,J) TEMP = X(JX)
TEMP = X(JX) DO 70 I = J + 1,MIN(N,J+K)
DO 70 I = J + 1,MIN(N,J+K) X(IX) = X(IX) - TEMP*A(L+I,J)
X(IX) = X(IX) - TEMP*A(L+I,J) IX = IX + INCX
IX = IX + INCX 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+29 -40
View File
@@ -139,6 +139,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX) SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -153,10 +154,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -223,29 +220,25 @@
KK = 1 KK = 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) K = KK
K = KK DO 10 I = 1,J - 1
DO 10 I = 1,J - 1 X(I) = X(I) + TEMP*AP(K)
X(I) = X(I) + TEMP*AP(K) K = K + 1
K = K + 1 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*AP(KK+J-1)
IF (NOUNIT) X(J) = X(J)*AP(KK+J-1)
END IF
KK = KK + J KK = KK + J
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 30 K = KK,KK + J - 2
DO 30 K = KK,KK + J - 2 X(IX) = X(IX) + TEMP*AP(K)
X(IX) = X(IX) + TEMP*AP(K) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*AP(KK+J-1)
IF (NOUNIT) X(JX) = X(JX)*AP(KK+J-1)
END IF
JX = JX + INCX JX = JX + INCX
KK = KK + J KK = KK + J
40 CONTINUE 40 CONTINUE
@@ -254,30 +247,26 @@
KK = (N* (N+1))/2 KK = (N* (N+1))/2
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) K = KK
K = KK DO 50 I = N,J + 1,-1
DO 50 I = N,J + 1,-1 X(I) = X(I) + TEMP*AP(K)
X(I) = X(I) + TEMP*AP(K) K = K - 1
K = K - 1 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*AP(KK-N+J)
IF (NOUNIT) X(J) = X(J)*AP(KK-N+J)
END IF
KK = KK - (N-J+1) KK = KK - (N-J+1)
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 70 K = KK,KK - (N- (J+1)),-1
DO 70 K = KK,KK - (N- (J+1)),-1 X(IX) = X(IX) + TEMP*AP(K)
X(IX) = X(IX) + TEMP*AP(K) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*AP(KK-N+J)
IF (NOUNIT) X(JX) = X(JX)*AP(KK-N+J)
END IF
JX = JX - INCX JX = JX - INCX
KK = KK - (N-J+1) KK = KK - (N-J+1)
80 CONTINUE 80 CONTINUE
+29 -40
View File
@@ -141,6 +141,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX) SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -155,10 +156,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -225,29 +222,25 @@
KK = (N* (N+1))/2 KK = (N* (N+1))/2
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/AP(KK)
IF (NOUNIT) X(J) = X(J)/AP(KK) TEMP = X(J)
TEMP = X(J) K = KK - 1
K = KK - 1 DO 10 I = J - 1,1,-1
DO 10 I = J - 1,1,-1 X(I) = X(I) - TEMP*AP(K)
X(I) = X(I) - TEMP*AP(K) K = K - 1
K = K - 1 10 CONTINUE
10 CONTINUE
END IF
KK = KK - J KK = KK - J
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX + (N-1)*INCX JX = KX + (N-1)*INCX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/AP(KK)
IF (NOUNIT) X(JX) = X(JX)/AP(KK) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 30 K = KK - 1,KK - J + 1,-1
DO 30 K = KK - 1,KK - J + 1,-1 IX = IX - INCX
IX = IX - INCX X(IX) = X(IX) - TEMP*AP(K)
X(IX) = X(IX) - TEMP*AP(K) 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
KK = KK - J KK = KK - J
40 CONTINUE 40 CONTINUE
@@ -256,29 +249,25 @@
KK = 1 KK = 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/AP(KK)
IF (NOUNIT) X(J) = X(J)/AP(KK) TEMP = X(J)
TEMP = X(J) K = KK + 1
K = KK + 1 DO 50 I = J + 1,N
DO 50 I = J + 1,N X(I) = X(I) - TEMP*AP(K)
X(I) = X(I) - TEMP*AP(K) K = K + 1
K = K + 1 50 CONTINUE
50 CONTINUE
END IF
KK = KK + (N-J+1) KK = KK + (N-J+1)
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/AP(KK)
IF (NOUNIT) X(JX) = X(JX)/AP(KK) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 70 K = KK + 1,KK + N - J
DO 70 K = KK + 1,KK + N - J IX = IX + INCX
IX = IX + INCX X(IX) = X(IX) - TEMP*AP(K)
X(IX) = X(IX) - TEMP*AP(K) 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
KK = KK + (N-J+1) KK = KK + (N-J+1)
80 CONTINUE 80 CONTINUE
+35 -46
View File
@@ -174,6 +174,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB) SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -275,27 +276,23 @@
IF (UPPER) THEN IF (UPPER) THEN
DO 50 J = 1,N DO 50 J = 1,N
DO 40 K = 1,M DO 40 K = 1,M
IF (B(K,J).NE.ZERO) THEN TEMP = ALPHA*B(K,J)
TEMP = ALPHA*B(K,J) DO 30 I = 1,K - 1
DO 30 I = 1,K - 1 B(I,J) = B(I,J) + TEMP*A(I,K)
B(I,J) = B(I,J) + TEMP*A(I,K) 30 CONTINUE
30 CONTINUE IF (NOUNIT) TEMP = TEMP*A(K,K)
IF (NOUNIT) TEMP = TEMP*A(K,K) B(K,J) = TEMP
B(K,J) = TEMP
END IF
40 CONTINUE 40 CONTINUE
50 CONTINUE 50 CONTINUE
ELSE ELSE
DO 80 J = 1,N DO 80 J = 1,N
DO 70 K = M,1,-1 DO 70 K = M,1,-1
IF (B(K,J).NE.ZERO) THEN TEMP = ALPHA*B(K,J)
TEMP = ALPHA*B(K,J) B(K,J) = TEMP
B(K,J) = TEMP IF (NOUNIT) B(K,J) = B(K,J)*A(K,K)
IF (NOUNIT) B(K,J) = B(K,J)*A(K,K) DO 60 I = K + 1,M
DO 60 I = K + 1,M B(I,J) = B(I,J) + TEMP*A(I,K)
B(I,J) = B(I,J) + TEMP*A(I,K) 60 CONTINUE
60 CONTINUE
END IF
70 CONTINUE 70 CONTINUE
80 CONTINUE 80 CONTINUE
END IF END IF
@@ -354,12 +351,10 @@
B(I,J) = TEMP*B(I,J) B(I,J) = TEMP*B(I,J)
170 CONTINUE 170 CONTINUE
DO 190 K = 1,J - 1 DO 190 K = 1,J - 1
IF (A(K,J).NE.ZERO) THEN TEMP = ALPHA*A(K,J)
TEMP = ALPHA*A(K,J) DO 180 I = 1,M
DO 180 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 180 CONTINUE
180 CONTINUE
END IF
190 CONTINUE 190 CONTINUE
200 CONTINUE 200 CONTINUE
ELSE ELSE
@@ -370,12 +365,10 @@
B(I,J) = TEMP*B(I,J) B(I,J) = TEMP*B(I,J)
210 CONTINUE 210 CONTINUE
DO 230 K = J + 1,N DO 230 K = J + 1,N
IF (A(K,J).NE.ZERO) THEN TEMP = ALPHA*A(K,J)
TEMP = ALPHA*A(K,J) DO 220 I = 1,M
DO 220 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 220 CONTINUE
220 CONTINUE
END IF
230 CONTINUE 230 CONTINUE
240 CONTINUE 240 CONTINUE
END IF END IF
@@ -386,16 +379,14 @@
IF (UPPER) THEN IF (UPPER) THEN
DO 280 K = 1,N DO 280 K = 1,N
DO 260 J = 1,K - 1 DO 260 J = 1,K - 1
IF (A(J,K).NE.ZERO) THEN IF (NOCONJ) THEN
IF (NOCONJ) THEN TEMP = ALPHA*A(J,K)
TEMP = ALPHA*A(J,K) ELSE
ELSE TEMP = ALPHA*CONJG(A(J,K))
TEMP = ALPHA*CONJG(A(J,K))
END IF
DO 250 I = 1,M
B(I,J) = B(I,J) + TEMP*B(I,K)
250 CONTINUE
END IF END IF
DO 250 I = 1,M
B(I,J) = B(I,J) + TEMP*B(I,K)
250 CONTINUE
260 CONTINUE 260 CONTINUE
TEMP = ALPHA TEMP = ALPHA
IF (NOUNIT) THEN IF (NOUNIT) THEN
@@ -414,16 +405,14 @@
ELSE ELSE
DO 320 K = N,1,-1 DO 320 K = N,1,-1
DO 300 J = K + 1,N DO 300 J = K + 1,N
IF (A(J,K).NE.ZERO) THEN IF (NOCONJ) THEN
IF (NOCONJ) THEN TEMP = ALPHA*A(J,K)
TEMP = ALPHA*A(J,K) ELSE
ELSE TEMP = ALPHA*CONJG(A(J,K))
TEMP = ALPHA*CONJG(A(J,K))
END IF
DO 290 I = 1,M
B(I,J) = B(I,J) + TEMP*B(I,K)
290 CONTINUE
END IF END IF
DO 290 I = 1,M
B(I,J) = B(I,J) + TEMP*B(I,K)
290 CONTINUE
300 CONTINUE 300 CONTINUE
TEMP = ALPHA TEMP = ALPHA
IF (NOUNIT) THEN IF (NOUNIT) THEN
+25 -36
View File
@@ -144,6 +144,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX) SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -158,10 +159,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -229,53 +226,45 @@
IF (LSAME(UPLO,'U')) THEN IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) DO 10 I = 1,J - 1
DO 10 I = 1,J - 1 X(I) = X(I) + TEMP*A(I,J)
X(I) = X(I) + TEMP*A(I,J) 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*A(J,J)
IF (NOUNIT) X(J) = X(J)*A(J,J)
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 30 I = 1,J - 1
DO 30 I = 1,J - 1 X(IX) = X(IX) + TEMP*A(I,J)
X(IX) = X(IX) + TEMP*A(I,J) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(J,J)
IF (NOUNIT) X(JX) = X(JX)*A(J,J)
END IF
JX = JX + INCX JX = JX + INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) DO 50 I = N,J + 1,-1
DO 50 I = N,J + 1,-1 X(I) = X(I) + TEMP*A(I,J)
X(I) = X(I) + TEMP*A(I,J) 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*A(J,J)
IF (NOUNIT) X(J) = X(J)*A(J,J)
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 70 I = N,J + 1,-1
DO 70 I = N,J + 1,-1 X(IX) = X(IX) + TEMP*A(I,J)
X(IX) = X(IX) + TEMP*A(I,J) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(J,J)
IF (NOUNIT) X(JX) = X(JX)*A(J,J)
END IF
JX = JX - INCX JX = JX - INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+65 -90
View File
@@ -177,6 +177,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB) SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -209,8 +210,6 @@
LOGICAL LSIDE,NOCONJ,NOUNIT,UPPER LOGICAL LSIDE,NOCONJ,NOUNIT,UPPER
* .. * ..
* .. Parameters .. * .. Parameters ..
COMPLEX ONE
PARAMETER (ONE= (1.0E+0,0.0E+0))
COMPLEX ZERO COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0)) PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
@@ -277,34 +276,26 @@
* *
IF (UPPER) THEN IF (UPPER) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 30 I = 1,M
DO 30 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 30 CONTINUE
30 CONTINUE DO 50 K = M,1,-1
END IF IF (NOUNIT) B(K,J) = B(K,J)/A(K,K)
DO 50 K = M,1,-1 DO 40 I = 1,K - 1
IF (B(K,J).NE.ZERO) THEN B(I,J) = B(I,J) - B(K,J)*A(I,K)
IF (NOUNIT) B(K,J) = B(K,J)/A(K,K) 40 CONTINUE
DO 40 I = 1,K - 1
B(I,J) = B(I,J) - B(K,J)*A(I,K)
40 CONTINUE
END IF
50 CONTINUE 50 CONTINUE
60 CONTINUE 60 CONTINUE
ELSE ELSE
DO 100 J = 1,N DO 100 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 70 I = 1,M
DO 70 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 70 CONTINUE
70 CONTINUE DO 90 K = 1,M
END IF IF (NOUNIT) B(K,J) = B(K,J)/A(K,K)
DO 90 K = 1,M DO 80 I = K + 1,M
IF (B(K,J).NE.ZERO) THEN B(I,J) = B(I,J) - B(K,J)*A(I,K)
IF (NOUNIT) B(K,J) = B(K,J)/A(K,K) 80 CONTINUE
DO 80 I = K + 1,M
B(I,J) = B(I,J) - B(K,J)*A(I,K)
80 CONTINUE
END IF
90 CONTINUE 90 CONTINUE
100 CONTINUE 100 CONTINUE
END IF END IF
@@ -358,43 +349,33 @@
* *
IF (UPPER) THEN IF (UPPER) THEN
DO 230 J = 1,N DO 230 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 190 I = 1,M
DO 190 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 190 CONTINUE
190 CONTINUE
END IF
DO 210 K = 1,J - 1 DO 210 K = 1,J - 1
IF (A(K,J).NE.ZERO) THEN DO 200 I = 1,M
DO 200 I = 1,M B(I,J) = B(I,J) - A(K,J)*B(I,K)
B(I,J) = B(I,J) - A(K,J)*B(I,K) 200 CONTINUE
200 CONTINUE
END IF
210 CONTINUE 210 CONTINUE
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(J,J)
DO 220 I = 1,M DO 220 I = 1,M
B(I,J) = TEMP*B(I,J) B(I,J) = B(I,J)/A(J,J)
220 CONTINUE 220 CONTINUE
END IF END IF
230 CONTINUE 230 CONTINUE
ELSE ELSE
DO 280 J = N,1,-1 DO 280 J = N,1,-1
IF (ALPHA.NE.ONE) THEN DO 240 I = 1,M
DO 240 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 240 CONTINUE
240 CONTINUE
END IF
DO 260 K = J + 1,N DO 260 K = J + 1,N
IF (A(K,J).NE.ZERO) THEN DO 250 I = 1,M
DO 250 I = 1,M B(I,J) = B(I,J) - A(K,J)*B(I,K)
B(I,J) = B(I,J) - A(K,J)*B(I,K) 250 CONTINUE
250 CONTINUE
END IF
260 CONTINUE 260 CONTINUE
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(J,J)
DO 270 I = 1,M DO 270 I = 1,M
B(I,J) = TEMP*B(I,J) B(I,J) = B(I,J)/A(J,J)
270 CONTINUE 270 CONTINUE
END IF END IF
280 CONTINUE 280 CONTINUE
@@ -408,61 +389,55 @@
DO 330 K = N,1,-1 DO 330 K = N,1,-1
IF (NOUNIT) THEN IF (NOUNIT) THEN
IF (NOCONJ) THEN IF (NOCONJ) THEN
TEMP = ONE/A(K,K) DO 290 I = 1,M
B(I,K) = B(I,K)/A(K,K)
290 CONTINUE
ELSE ELSE
TEMP = ONE/CONJG(A(K,K)) DO 390 I = 1,M
B(I,K) = B(I,K)/CONJG(A(K,K))
390 CONTINUE
END IF END IF
DO 290 I = 1,M
B(I,K) = TEMP*B(I,K)
290 CONTINUE
END IF END IF
DO 310 J = 1,K - 1 DO 310 J = 1,K - 1
IF (A(J,K).NE.ZERO) THEN IF (NOCONJ) THEN
IF (NOCONJ) THEN TEMP = A(J,K)
TEMP = A(J,K) ELSE
ELSE TEMP = CONJG(A(J,K))
TEMP = CONJG(A(J,K))
END IF
DO 300 I = 1,M
B(I,J) = B(I,J) - TEMP*B(I,K)
300 CONTINUE
END IF END IF
DO 300 I = 1,M
B(I,J) = B(I,J) - TEMP*B(I,K)
300 CONTINUE
310 CONTINUE 310 CONTINUE
IF (ALPHA.NE.ONE) THEN DO 320 I = 1,M
DO 320 I = 1,M B(I,K) = ALPHA*B(I,K)
B(I,K) = ALPHA*B(I,K) 320 CONTINUE
320 CONTINUE
END IF
330 CONTINUE 330 CONTINUE
ELSE ELSE
DO 380 K = 1,N DO 380 K = 1,N
IF (NOUNIT) THEN IF (NOUNIT) THEN
IF (NOCONJ) THEN IF (NOCONJ) THEN
TEMP = ONE/A(K,K) DO 340 I = 1,M
B(I,K) = B(I,K)/A(K,K)
340 CONTINUE
ELSE ELSE
TEMP = ONE/CONJG(A(K,K)) DO 400 I = 1,M
B(I,K) = B(I,K)/CONJG(A(K,K))
400 CONTINUE
END IF END IF
DO 340 I = 1,M
B(I,K) = TEMP*B(I,K)
340 CONTINUE
END IF END IF
DO 360 J = K + 1,N DO 360 J = K + 1,N
IF (A(J,K).NE.ZERO) THEN IF (NOCONJ) THEN
IF (NOCONJ) THEN TEMP = A(J,K)
TEMP = A(J,K) ELSE
ELSE TEMP = CONJG(A(J,K))
TEMP = CONJG(A(J,K))
END IF
DO 350 I = 1,M
B(I,J) = B(I,J) - TEMP*B(I,K)
350 CONTINUE
END IF END IF
DO 350 I = 1,M
B(I,J) = B(I,J) - TEMP*B(I,K)
350 CONTINUE
360 CONTINUE 360 CONTINUE
IF (ALPHA.NE.ONE) THEN DO 370 I = 1,M
DO 370 I = 1,M B(I,K) = ALPHA*B(I,K)
B(I,K) = ALPHA*B(I,K) 370 CONTINUE
370 CONTINUE
END IF
380 CONTINUE 380 CONTINUE
END IF END IF
END IF END IF
+25 -36
View File
@@ -146,6 +146,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX) SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -160,10 +161,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
COMPLEX ZERO
PARAMETER (ZERO= (0.0E+0,0.0E+0))
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
COMPLEX TEMP COMPLEX TEMP
@@ -231,52 +228,44 @@
IF (LSAME(UPLO,'U')) THEN IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/A(J,J)
IF (NOUNIT) X(J) = X(J)/A(J,J) TEMP = X(J)
TEMP = X(J) DO 10 I = J - 1,1,-1
DO 10 I = J - 1,1,-1 X(I) = X(I) - TEMP*A(I,J)
X(I) = X(I) - TEMP*A(I,J) 10 CONTINUE
10 CONTINUE
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX + (N-1)*INCX JX = KX + (N-1)*INCX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/A(J,J)
IF (NOUNIT) X(JX) = X(JX)/A(J,J) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 30 I = J - 1,1,-1
DO 30 I = J - 1,1,-1 IX = IX - INCX
IX = IX - INCX X(IX) = X(IX) - TEMP*A(I,J)
X(IX) = X(IX) - TEMP*A(I,J) 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/A(J,J)
IF (NOUNIT) X(J) = X(J)/A(J,J) TEMP = X(J)
TEMP = X(J) DO 50 I = J + 1,N
DO 50 I = J + 1,N X(I) = X(I) - TEMP*A(I,J)
X(I) = X(I) - TEMP*A(I,J) 50 CONTINUE
50 CONTINUE
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/A(J,J)
IF (NOUNIT) X(JX) = X(JX)/A(J,J) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 70 I = J + 1,N
DO 70 I = J + 1,N IX = IX + INCX
IX = IX + INCX X(IX) = X(IX) - TEMP*A(I,J)
X(IX) = X(IX) - TEMP*A(I,J) 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+1
View File
@@ -68,6 +68,7 @@
*> *>
* ===================================================================== * =====================================================================
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX) DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+149
View File
@@ -0,0 +1,149 @@
*> \brief \b DAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DAXPBY(N,DA,DX,INCX,DB,DY,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION DA,DB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* DOUBLE PRECISION DX(*),DY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] DA
*> \verbatim
*> DA is DOUBLE PRECISION
*> On entry, DA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] DX
*> \verbatim
*> DX 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
*>
*> \param[in] DB
*> \verbatim
*> DB is DOUBLE PRECISION
*> On entry, DB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] DY
*> \verbatim
*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of DY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE DAXPBY(N,DA,DX,INCX,DB,DY,INCY)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION DA,DB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
DOUBLE PRECISION DX(*),DY(*)
* ..
* .. External Subroutines
EXTERNAL DSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
* Scale if DA.EQ.0
IF (DA.EQ.0.0D0 .AND. DB.NE.0.0D0) THEN
CALL DSCAL(N, DB, DY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
*
*
DO I = 1,N
DY(I) = DB*DY(I) + DA*DX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
DY(IY) = DB*DY(IY) + DA*DX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
*
* End of DAXPBY
*
END
+1
View File
@@ -86,6 +86,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY) SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -44,6 +44,7 @@
* *
* ===================================================================== * =====================================================================
DOUBLE PRECISION FUNCTION DCABS1(Z) DOUBLE PRECISION FUNCTION DCABS1(Z)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY) SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*> *>
* ===================================================================== * =====================================================================
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY) DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -185,6 +185,7 @@
* ===================================================================== * =====================================================================
SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX, SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,
+ BETA,Y,INCY) + BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+35 -7
View File
@@ -35,6 +35,16 @@
*> *>
*> alpha and beta are scalars, and A, B and C are matrices, with op( A ) *> alpha and beta are scalars, and A, B and C are matrices, with op( A )
*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. *> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
*>
*> Note: if alpha and/or beta is zero, some parts of the matrix-matrix
*> operations are not performed. This results in the following NaN/Inf
*> propagation quirks:
*>
*> 1. If alpha is zero, NaNs or Infs in A or B do not affect the result.
*> 2. If both alpha and beta are zero, then a zero matrix is returned in C,
*> irrespective of any NaNs or Infs in A, B or C.
*> 3. If only beta is zero, alpha*op( A )*op( B ) is returned, irrespective
*> of any NaNs or Infs in C.
*> \endverbatim *> \endverbatim
* *
* Arguments: * Arguments:
@@ -51,6 +61,9 @@
*> TRANSA = 'T' or 't', op( A ) = A**T. *> TRANSA = 'T' or 't', op( A ) = A**T.
*> *>
*> TRANSA = 'C' or 'c', op( A ) = A**T. *> TRANSA = 'C' or 'c', op( A ) = A**T.
*>
*> Note: TRANSA = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] TRANSB *> \param[in] TRANSB
@@ -64,6 +77,9 @@
*> TRANSB = 'T' or 't', op( B ) = B**T. *> TRANSB = 'T' or 't', op( B ) = B**T.
*> *>
*> TRANSB = 'C' or 'c', op( B ) = B**T. *> TRANSB = 'C' or 'c', op( B ) = B**T.
*>
*> Note: TRANSB = 'C' is supported for the sake of API consistency
*> between all ?GEMM variants.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] M *> \param[in] M
@@ -92,7 +108,9 @@
*> \param[in] ALPHA *> \param[in] ALPHA
*> \verbatim *> \verbatim
*> ALPHA is DOUBLE PRECISION. *> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha. *> On entry, ALPHA specifies the scalar alpha. If ALPHA is zero the
*> values in A and B do not affect the result. This also means that
*> NaN/Inf propagation from A and B is inhibited if ALPHA is zero.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] A *> \param[in] A
@@ -102,7 +120,10 @@
*> Before entry with TRANSA = 'N' or 'n', the leading m by k *> Before entry with TRANSA = 'N' or 'n', the leading m by k
*> part of the array A must contain the matrix A, otherwise *> part of the array A must contain the matrix A, otherwise
*> the leading k by m part of the array A must contain the *> the leading k by m part of the array A must contain the
*> matrix A. *> matrix A, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in A affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of A need not be initialized by the caller.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] LDA *> \param[in] LDA
@@ -121,7 +142,10 @@
*> Before entry with TRANSB = 'N' or 'n', the leading k by n *> Before entry with TRANSB = 'N' or 'n', the leading k by n
*> part of the array B must contain the matrix B, otherwise *> part of the array B must contain the matrix B, otherwise
*> the leading n by k part of the array B must contain the *> the leading n by k part of the array B must contain the
*> matrix B. *> matrix B, except if ALPHA is zero.
*> If ALPHA is zero, none of the values in B affect the result, even
*> if they are NaN/Inf. This also implies that if ALPHA is zero,
*> the matrix elements of B need not be initialized by the caller.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in] LDB *> \param[in] LDB
@@ -136,16 +160,19 @@
*> \param[in] BETA *> \param[in] BETA
*> \verbatim *> \verbatim
*> BETA is DOUBLE PRECISION. *> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is *> On entry, BETA specifies the scalar beta. If BETA is zero the
*> supplied as zero then C need not be set on input. *> values in C do not affect the result. This also means that
*> NaN/Inf propagation from C is inhibited if BETA is zero.
*> \endverbatim *> \endverbatim
*> *>
*> \param[in,out] C *> \param[in,out] C
*> \verbatim *> \verbatim
*> C is DOUBLE PRECISION array, dimension ( LDC, N ) *> C is DOUBLE PRECISION array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must *> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which *> contain the matrix C, except if beta is zero.
*> case C need not be set on entry. *> If beta is zero, none of the values in C affect the result, even
*> if they are NaN/Inf. This also implies that if beta is zero,
*> the matrix elements of C need not be initialized by the caller.
*> On exit, the array C is overwritten by the m by n matrix *> On exit, the array C is overwritten by the m by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ). *> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim *> \endverbatim
@@ -185,6 +212,7 @@
* ===================================================================== * =====================================================================
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB, SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,
+ BETA,C,LDC) + BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+4 -4
View File
@@ -50,9 +50,9 @@
*> On entry, UPLO specifies whether the lower or the upper *> On entry, UPLO specifies whether the lower or the upper
*> triangular part of C is access and updated. *> triangular part of C is access and updated.
*> *>
*> UPLO = 'L' or 'l', the lower tringular part of C is used. *> UPLO = 'L' or 'l', the lower triangular part of C is used.
*> *>
*> UPLO = 'U' or 'u', the upper tringular part of C is used. *> UPLO = 'U' or 'u', the upper triangular part of C is used.
*> \endverbatim *> \endverbatim
* *
*> \param[in] TRANSA *> \param[in] TRANSA
@@ -154,7 +154,7 @@
*> Before entry, the leading n by n part of the array C must *> Before entry, the leading n by n part of the array C must
*> contain the matrix C, except when beta is zero, in which *> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry. *> case C need not be set on entry.
*> On exit, the upper or lower trinangular part of the matrix *> On exit, the upper or lower triangular part of the matrix
*> C is overwritten by the n by n matrix *> C is overwritten by the n by n matrix
*> ( alpha*op( A )*op( B ) + beta*C ). *> ( alpha*op( A )*op( B ) + beta*C ).
*> \endverbatim *> \endverbatim
@@ -426,6 +426,6 @@
* *
RETURN RETURN
* *
* End of SGEMM * End of DGEMMTR
* *
END END
+1
View File
@@ -155,6 +155,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -127,6 +127,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA) SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -85,11 +85,12 @@
!> \endverbatim !> \endverbatim
!> !>
! ===================================================================== ! =====================================================================
function DNRM2( n, x, incx ) function DNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.d0) integer, parameter :: wp = kind(1.d0)
real(wp) :: DNRM2 real(wp) :: DNRM2
! !
! -- Reference BLAS level1 routine (version 3.9.1) -- ! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, -- ! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- ! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021 ! March 2021
+1
View File
@@ -89,6 +89,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S) SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -89,6 +89,7 @@
! !
! ===================================================================== ! =====================================================================
subroutine DROTG( a, b, c, s ) subroutine DROTG( a, b, c, s )
implicit none
integer, parameter :: wp = kind(1.d0) integer, parameter :: wp = kind(1.d0)
! !
! -- Reference BLAS level1 routine -- ! -- Reference BLAS level1 routine --
+5
View File
@@ -38,6 +38,10 @@
*> H=( ) ( ) ( ) ( ) *> H=( ) ( ) ( ) ( )
*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). *> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
*> SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM. *> SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
*>
*> IF DFLAG IS NOT ONE OF THE LISTED ABOVE, THE BEHAVIOR IS UNDEFINED.
*> NANS IN DFLAG MAY NOT PROPAGATE TO THE OUTPUT.
*>
*> \endverbatim *> \endverbatim
* *
* Arguments: * Arguments:
@@ -93,6 +97,7 @@
* *
* ===================================================================== * =====================================================================
SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM) SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+10 -5
View File
@@ -24,14 +24,18 @@
*> \verbatim *> \verbatim
*> *>
*> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS *> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
*> THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*> DY2)**T. *> THE SECOND COMPONENT OF THE 2-VECTOR
*> WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS.. *> (DSQRT(DD1)*DX1,DSQRT(DD2)*DY2)**T
*> WITH DPARAM(1)=DFLAG.
*> *>
*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0 *> H HAS ONE OF THE FOLLOWING FORMS:
*>
*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
*> *>
*> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0) *> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
*> H=( ) ( ) ( ) ( ) *> H=( ) ( ) ( ) ( )
*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). *> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
*>
*> LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22 *> LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
*> RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE *> RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
*> VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.) *> VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
@@ -87,6 +91,7 @@
* *
* ===================================================================== * =====================================================================
SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM) SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -195,7 +200,7 @@
DH11 = ONE DH11 = ONE
DH22 = ONE DH22 = ONE
DFLAG = -ONE DFLAG = -ONE
ELSE ELSE IF (DFLAG.EQ.ONE) THEN
DH21 = -ONE DH21 = -ONE
DH12 = ONE DH12 = ONE
DFLAG = -ONE DFLAG = -ONE
@@ -220,7 +225,7 @@
DH11 = ONE DH11 = ONE
DH22 = ONE DH22 = ONE
DFLAG = -ONE DFLAG = -ONE
ELSE ELSE IF (DFLAG.EQ.ONE) THEN
DH21 = -ONE DH21 = -ONE
DH12 = ONE DH12 = ONE
DFLAG = -ONE DFLAG = -ONE
+1
View File
@@ -181,6 +181,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -76,6 +76,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSCAL(N,DA,DX,INCX) SUBROUTINE DSCAL(N,DA,DX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -116,6 +116,7 @@
*> *>
* ===================================================================== * =====================================================================
DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY) DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+365
View File
@@ -0,0 +1,365 @@
*> \brief \b DSKEWSYMM
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSKEWSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER LDA,LDB,LDC,M,N
* CHARACTER SIDE,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSKEWSYMM performs one of the matrix-matrix operations
*>
*> C := alpha*A*B + beta*C,
*>
*> or
*>
*> C := alpha*B*A + beta*C,
*>
*> where alpha and beta are scalars, A is a skew-symmetric matrix and B and
*> C are m by n matrices.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] SIDE
*> \verbatim
*> SIDE is CHARACTER*1
*> On entry, SIDE specifies whether the skew-symmetric matrix A
*> appears on the left or right in the operation as follows:
*>
*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
*>
*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the skew-symmetric matrix A is to be
*> referenced as follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of the
*> skew-symmetric matrix is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of the
*> skew-symmetric matrix is to be referenced.
*> \endverbatim
*>
*> \param[in] M
*> \verbatim
*> M is INTEGER
*> On entry, M specifies the number of rows of the matrix C.
*> M must be at least zero.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the number of columns of the matrix C.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
*> m when SIDE = 'L' or 'l' and is n otherwise.
*> Before entry with SIDE = 'L' or 'l', the m by m part of
*> the array A must contain the skew-symmetric matrix, such that
*> when UPLO = 'U' or 'u', the strictly m by m upper triangular
*> part of the array A must contain the upper triangular part
*> of the skew-symmetric matrix and the leading lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the strictly m by m lower triangular part of the array A
*> must contain the lower triangular part of the skew-symmetric
*> matrix and the leading upper triangular part of A is not
*> referenced.
*> Before entry with SIDE = 'R' or 'r', the n by n part of
*> the array A must contain the skew-symmetric matrix, such that
*> when UPLO = 'U' or 'u', the strictly n by n upper triangular
*> part of the array A must contain the upper triangular part
*> of the skew-symmetric matrix and the leading lower triangular
*> part of A is not referenced, and when UPLO = 'L' or 'l',
*> the strictly n by n lower triangular part of the array A
*> must contain the lower triangular part of the skew-symmetric
*> matrix and the leading upper triangular part of A is not
*> referenced.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When SIDE = 'L' or 'l' then
*> LDA must be at least max( 1, m ), otherwise LDA must be at
*> least max( 1, n ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is DOUBLE PRECISION array, dimension ( LDB, N )
*> Before entry, the leading m by n part of the array B must
*> contain the matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. LDB must be at least
*> max( 1, m ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then C need not be set on input.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION array, dimension ( LDC, N )
*> Before entry, the leading m by n part of the array C must
*> contain the matrix C, except when beta is zero, in which
*> case C need not be set on entry.
*> On exit, the array C is overwritten by the m by n updated
*> matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, m ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup skewhemm
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*> Derived from subroutine dsymm.
*>
*> -- Written on 6-Jul-2025.
*> Shuo Zheng, China.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSKEWSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,
+ LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER LDA,LDB,LDC,M,N
CHARACTER SIDE,UPLO
* ..
* .. Array Arguments ..
DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
* .. Local Scalars ..
DOUBLE PRECISION TEMP1,TEMP2
INTEGER I,INFO,J,K,NROWA
LOGICAL UPPER
* ..
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
* ..
*
* Set NROWA as the number of rows of A.
*
IF (LSAME(SIDE,'L')) THEN
NROWA = M
ELSE
NROWA = N
END IF
UPPER = LSAME(UPLO,'U')
*
* Test the input parameters.
*
INFO = 0
IF ((.NOT.LSAME(SIDE,'L')) .AND.
+ (.NOT.LSAME(SIDE,'R'))) THEN
INFO = 1
ELSE IF ((.NOT.UPPER) .AND.
+ (.NOT.LSAME(UPLO,'L'))) THEN
INFO = 2
ELSE IF (M.LT.0) THEN
INFO = 3
ELSE IF (N.LT.0) THEN
INFO = 4
ELSE IF (LDA.LT.MAX(1,NROWA)) THEN
INFO = 7
ELSE IF (LDB.LT.MAX(1,M)) THEN
INFO = 9
ELSE IF (LDC.LT.MAX(1,M)) THEN
INFO = 12
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('DSKEWSYMM ',INFO)
RETURN
END IF
*
* Quick return if possible.
*
IF ((M.EQ.0) .OR. (N.EQ.0) .OR.
+ ((ALPHA.EQ.ZERO).AND. (BETA.EQ.ONE))) RETURN
*
* And when alpha.eq.zero.
*
IF (ALPHA.EQ.ZERO) THEN
IF (BETA.EQ.ZERO) THEN
DO 20 J = 1,N
DO 10 I = 1,M
C(I,J) = ZERO
10 CONTINUE
20 CONTINUE
ELSE
DO 40 J = 1,N
DO 30 I = 1,M
C(I,J) = BETA*C(I,J)
30 CONTINUE
40 CONTINUE
END IF
RETURN
END IF
*
* Start the operations.
*
IF (LSAME(SIDE,'L')) THEN
*
* Form C := alpha*A*B + beta*C.
*
IF (UPPER) THEN
DO 70 J = 1,N
DO 60 I = 1,M
TEMP1 = ALPHA*B(I,J)
TEMP2 = ZERO
DO 50 K = 1,I - 1
C(K,J) = C(K,J) + TEMP1*A(K,I)
TEMP2 = TEMP2 - B(K,J)*A(K,I)
50 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(I,J) = ALPHA*TEMP2
ELSE
C(I,J) = BETA*C(I,J) +
+ ALPHA*TEMP2
END IF
60 CONTINUE
70 CONTINUE
ELSE
DO 100 J = 1,N
DO 90 I = M,1,-1
TEMP1 = ALPHA*B(I,J)
TEMP2 = ZERO
DO 80 K = I + 1,M
C(K,J) = C(K,J) + TEMP1*A(K,I)
TEMP2 = TEMP2 - B(K,J)*A(K,I)
80 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(I,J) = ALPHA*TEMP2
ELSE
C(I,J) = BETA*C(I,J) +
+ ALPHA*TEMP2
END IF
90 CONTINUE
100 CONTINUE
END IF
ELSE
*
* Form C := alpha*B*A + beta*C.
*
DO 170 J = 1,N
IF (BETA.EQ.ZERO) THEN
DO 110 I = 1,M
C(I,J) = ZERO
110 CONTINUE
ELSE
DO 120 I = 1,M
C(I,J) = BETA*C(I,J)
120 CONTINUE
END IF
DO 140 K = 1,J - 1
IF (UPPER) THEN
TEMP1 = ALPHA*A(K,J)
ELSE
TEMP1 = -ALPHA*A(J,K)
END IF
DO 130 I = 1,M
C(I,J) = C(I,J) + TEMP1*B(I,K)
130 CONTINUE
140 CONTINUE
DO 160 K = J + 1,N
IF (UPPER) THEN
TEMP1 = -ALPHA*A(J,K)
ELSE
TEMP1 = ALPHA*A(K,J)
END IF
DO 150 I = 1,M
C(I,J) = C(I,J) + TEMP1*B(I,K)
150 CONTINUE
160 CONTINUE
170 CONTINUE
END IF
*
RETURN
*
* End of DSKEWSYMM
*
END
+327
View File
@@ -0,0 +1,327 @@
*> \brief \b DSKEWSYMV
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSKEWSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSKEWSYMV performs the matrix-vector operation
*>
*> y := alpha*A*x + beta*y,
*>
*> where alpha and beta are scalars, x and y are n element vectors and
*> A is an n by n skew-symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array, dimension ( LDA, N )
*> Before entry with UPLO = 'U' or 'u', the strictly n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the skew-symmetric matrix and the leading
*> lower triangular part of A is not referenced.
*> Before entry with UPLO = 'L' or 'l', the strictly n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the skew-symmetric matrix and the leading
*> upper triangular part of A is not referenced.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array, dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta. When BETA is
*> supplied as zero then Y need not be set on input.
*> \endverbatim
*>
*> \param[in,out] Y
*> \verbatim
*> Y is DOUBLE PRECISION array, dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y. On exit, Y is overwritten by the updated
*> vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup skewhemv
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> The vector and matrix arguments are not referenced when N = 0, or M = 0
*> Derived from subroutine dsymv.
*>
*> -- Written on 6-Jul-2025.
*> Shuo Zheng, China.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSKEWSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER INCX,INCY,LDA,N
CHARACTER UPLO
* ..
* .. Array Arguments ..
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
* ..
* .. Local Scalars ..
DOUBLE PRECISION TEMP1,TEMP2
INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
*
* Test the input parameters.
*
INFO = 0
IF (.NOT.LSAME(UPLO,'U') .AND. .NOT.LSAME(UPLO,'L')) THEN
INFO = 1
ELSE IF (N.LT.0) THEN
INFO = 2
ELSE IF (LDA.LT.MAX(1,N)) THEN
INFO = 5
ELSE IF (INCX.EQ.0) THEN
INFO = 7
ELSE IF (INCY.EQ.0) THEN
INFO = 10
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('DSKEWSYMV ',INFO)
RETURN
END IF
*
* Quick return if possible.
*
IF ((N.EQ.0) .OR. ((ALPHA.EQ.ZERO).AND. (BETA.EQ.ONE))) RETURN
*
* Set up the start points in X and Y.
*
IF (INCX.GT.0) THEN
KX = 1
ELSE
KX = 1 - (N-1)*INCX
END IF
IF (INCY.GT.0) THEN
KY = 1
ELSE
KY = 1 - (N-1)*INCY
END IF
*
* Start the operations. In this version the elements of A are
* accessed sequentially with one pass through the triangular part
* of A.
*
* First form y := beta*y.
*
IF (BETA.NE.ONE) THEN
IF (INCY.EQ.1) THEN
IF (BETA.EQ.ZERO) THEN
DO 10 I = 1,N
Y(I) = ZERO
10 CONTINUE
ELSE
DO 20 I = 1,N
Y(I) = BETA*Y(I)
20 CONTINUE
END IF
ELSE
IY = KY
IF (BETA.EQ.ZERO) THEN
DO 30 I = 1,N
Y(IY) = ZERO
IY = IY + INCY
30 CONTINUE
ELSE
DO 40 I = 1,N
Y(IY) = BETA*Y(IY)
IY = IY + INCY
40 CONTINUE
END IF
END IF
END IF
IF (ALPHA.EQ.ZERO) RETURN
IF (LSAME(UPLO,'U')) THEN
*
* Form y when A is stored in upper triangle.
*
IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
DO 60 J = 1,N
TEMP1 = ALPHA*X(J)
TEMP2 = ZERO
DO 50 I = 1,J - 1
Y(I) = Y(I) + TEMP1*A(I,J)
TEMP2 = TEMP2 - A(I,J)*X(I)
50 CONTINUE
Y(J) = Y(J) + ALPHA*TEMP2
60 CONTINUE
ELSE
JX = KX
JY = KY
DO 80 J = 1,N
TEMP1 = ALPHA*X(JX)
TEMP2 = ZERO
IX = KX
IY = KY
DO 70 I = 1,J - 1
Y(IY) = Y(IY) + TEMP1*A(I,J)
TEMP2 = TEMP2 - A(I,J)*X(IX)
IX = IX + INCX
IY = IY + INCY
70 CONTINUE
Y(JY) = Y(JY) + ALPHA*TEMP2
JX = JX + INCX
JY = JY + INCY
80 CONTINUE
END IF
ELSE
*
* Form y when A is stored in lower triangle.
*
IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
DO 100 J = 1,N
TEMP1 = ALPHA*X(J)
TEMP2 = ZERO
DO 90 I = J + 1,N
Y(I) = Y(I) + TEMP1*A(I,J)
TEMP2 = TEMP2 - A(I,J)*X(I)
90 CONTINUE
Y(J) = Y(J) + ALPHA*TEMP2
100 CONTINUE
ELSE
JX = KX
JY = KY
DO 120 J = 1,N
TEMP1 = ALPHA*X(JX)
TEMP2 = ZERO
IX = JX
IY = JY
DO 110 I = J + 1,N
IX = IX + INCX
IY = IY + INCY
Y(IY) = Y(IY) + TEMP1*A(I,J)
TEMP2 = TEMP2 - A(I,J)*X(IX)
110 CONTINUE
Y(JY) = Y(JY) + ALPHA*TEMP2
JX = JX + INCX
JY = JY + INCY
120 CONTINUE
END IF
END IF
*
RETURN
*
* End of DSKEWSYMV
*
END
+294
View File
@@ -0,0 +1,294 @@
*> \brief \b DSKEWSYR2
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSKEWSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA
* INTEGER INCX,INCY,LDA,N
* CHARACTER UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSKEWSYR2 performs the skew-symmetric rank 2 operation
*>
*> A := -alpha*x*y**T + alpha*y*x**T + A,
*>
*> where alpha is a scalar, x and y are n element vectors and A is an n
*> by n skew-symmetric matrix.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array A is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of A
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of A
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix A.
*> N must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] X
*> \verbatim
*> X is DOUBLE PRECISION array, dimension at least
*> ( 1 + ( n - 1 )*abs( INCX ) ).
*> Before entry, the incremented array X must contain the n
*> element vector x.
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> On entry, INCX specifies the increment for the elements of
*> X. INCX must not be zero.
*> \endverbatim
*>
*> \param[in] Y
*> \verbatim
*> Y is DOUBLE PRECISION array, dimension at least
*> ( 1 + ( n - 1 )*abs( INCY ) ).
*> Before entry, the incremented array Y must contain the n
*> element vector y.
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> On entry, INCY specifies the increment for the elements of
*> Y. INCY must not be zero.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is DOUBLE PRECISION array, dimension ( LDA, N )
*> Before entry with UPLO = 'U' or 'u', the strictly n by n
*> upper triangular part of the array A must contain the upper
*> triangular part of the skew-symmetric matrix and the leading
*> lower triangular part of A is not referenced. On exit, the
*> upper triangular part of the array A is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the strictly n by n
*> lower triangular part of the array A must contain the lower
*> triangular part of the skew-symmetric matrix and the leading
*> upper triangular part of A is not referenced. On exit, the
*> lower triangular part of the array A is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. LDA must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup skewher2
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 2 Blas routine.
*> Derived from subroutine dsyr2.
*>
*> -- Written on 6-Jul-2025.
*> Shuo Zheng, China.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSKEWSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA
INTEGER INCX,INCY,LDA,N
CHARACTER UPLO
* ..
* .. Array Arguments ..
DOUBLE PRECISION A(LDA,*),X(*),Y(*)
* ..
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* ..
* .. Local Scalars ..
DOUBLE PRECISION TEMP1,TEMP2
INTEGER I,INFO,IX,IY,J,JX,JY,KX,KY
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
*
* Test the input parameters.
*
INFO = 0
IF (.NOT.LSAME(UPLO,'U') .AND. .NOT.LSAME(UPLO,'L')) THEN
INFO = 1
ELSE IF (N.LT.0) THEN
INFO = 2
ELSE IF (INCX.EQ.0) THEN
INFO = 5
ELSE IF (INCY.EQ.0) THEN
INFO = 7
ELSE IF (LDA.LT.MAX(1,N)) THEN
INFO = 9
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('DSKEWSYR2 ',INFO)
RETURN
END IF
*
* Quick return if possible.
*
IF ((N.EQ.0) .OR. (ALPHA.EQ.ZERO)) RETURN
*
* Set up the start points in X and Y if the increments are not both
* unity.
*
IF ((INCX.NE.1) .OR. (INCY.NE.1)) THEN
IF (INCX.GT.0) THEN
KX = 1
ELSE
KX = 1 - (N-1)*INCX
END IF
IF (INCY.GT.0) THEN
KY = 1
ELSE
KY = 1 - (N-1)*INCY
END IF
JX = KX
JY = KY
END IF
*
* Start the operations. In this version the elements of A are
* accessed sequentially with one pass through the triangular part
* of A.
*
IF (LSAME(UPLO,'U')) THEN
*
* Form A when A is stored in the upper triangle.
*
IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
DO 20 J = 1,N
IF ((X(J).NE.ZERO) .OR. (Y(J).NE.ZERO)) THEN
TEMP1 = ALPHA*Y(J)
TEMP2 = ALPHA*X(J)
DO 10 I = 1,J-1
A(I,J) = A(I,J) - X(I)*TEMP1 + Y(I)*TEMP2
10 CONTINUE
END IF
20 CONTINUE
ELSE
DO 40 J = 1,N
IF ((X(JX).NE.ZERO) .OR. (Y(JY).NE.ZERO)) THEN
TEMP1 = ALPHA*Y(JY)
TEMP2 = ALPHA*X(JX)
IX = KX
IY = KY
DO 30 I = 1,J-1
A(I,J) = A(I,J) - X(IX)*TEMP1 + Y(IY)*TEMP2
IX = IX + INCX
IY = IY + INCY
30 CONTINUE
END IF
JX = JX + INCX
JY = JY + INCY
40 CONTINUE
END IF
ELSE
*
* Form A when A is stored in the lower triangle.
*
IF ((INCX.EQ.1) .AND. (INCY.EQ.1)) THEN
DO 60 J = 1,N
IF ((X(J).NE.ZERO) .OR. (Y(J).NE.ZERO)) THEN
TEMP1 = ALPHA*Y(J)
TEMP2 = ALPHA*X(J)
DO 50 I = J+1,N
A(I,J) = A(I,J) - X(I)*TEMP1 + Y(I)*TEMP2
50 CONTINUE
END IF
60 CONTINUE
ELSE
DO 80 J = 1,N
IF ((X(JX).NE.ZERO) .OR. (Y(JY).NE.ZERO)) THEN
TEMP1 = ALPHA*Y(JY)
TEMP2 = ALPHA*X(JX)
IX = JX + INCX
IY = JY + INCY
DO 70 I = J+1,N
A(I,J) = A(I,J) - X(IX)*TEMP1 + Y(IY)*TEMP2
IX = IX + INCX
IY = IY + INCY
70 CONTINUE
END IF
JX = JX + INCX
JY = JY + INCY
80 CONTINUE
END IF
END IF
*
RETURN
*
* End of DSKEWSYR2
*
END
+395
View File
@@ -0,0 +1,395 @@
*> \brief \b DSKEWSYR2K
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE DSKEWSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
* .. Scalar Arguments ..
* DOUBLE PRECISION ALPHA,BETA
* INTEGER K,LDA,LDB,LDC,N
* CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> DSKEWSYR2K performs one of the skew-symmetric rank 2k operations
*>
*> C := -alpha*A*B**T + alpha*B*A**T + beta*C,
*>
*> or
*>
*> C := -alpha*A**T*B + alpha*B**T*A + beta*C,
*>
*> where alpha and beta are scalars, C is an n by n skew-symmetric matrix
*> and A and B are n by k matrices in the first case and k by n
*> matrices in the second case.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> On entry, UPLO specifies whether the upper or lower
*> triangular part of the array C is to be referenced as
*> follows:
*>
*> UPLO = 'U' or 'u' Only the upper triangular part of C
*> is to be referenced.
*>
*> UPLO = 'L' or 'l' Only the lower triangular part of C
*> is to be referenced.
*> \endverbatim
*>
*> \param[in] TRANS
*> \verbatim
*> TRANS is CHARACTER*1
*> On entry, TRANS specifies the operation to be performed as
*> follows:
*>
*> TRANS = 'N' or 'n' C := -alpha*A*B**T + alpha*B*A**T +
*> beta*C.
*>
*> TRANS = 'T' or 't' C := -alpha*A**T*B + alpha*B**T*A +
*> beta*C.
*>
*> TRANS = 'C' or 'c' C := -alpha*A**T*B + alpha*B**T*A +
*> beta*C.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> On entry, N specifies the order of the matrix C. N must be
*> at least zero.
*> \endverbatim
*>
*> \param[in] K
*> \verbatim
*> K is INTEGER
*> On entry with TRANS = 'N' or 'n', K specifies the number
*> of columns of the matrices A and B, and on entry with
*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
*> of rows of the matrices A and B. K must be at least zero.
*> \endverbatim
*>
*> \param[in] ALPHA
*> \verbatim
*> ALPHA is DOUBLE PRECISION.
*> On entry, ALPHA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] A
*> \verbatim
*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array A must contain the matrix A, otherwise
*> the leading k by n part of the array A must contain the
*> matrix A.
*> \endverbatim
*>
*> \param[in] LDA
*> \verbatim
*> LDA is INTEGER
*> On entry, LDA specifies the first dimension of A as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDA must be at least max( 1, n ), otherwise LDA must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] B
*> \verbatim
*> B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is
*> k when TRANS = 'N' or 'n', and is n otherwise.
*> Before entry with TRANS = 'N' or 'n', the leading n by k
*> part of the array B must contain the matrix B, otherwise
*> the leading k by n part of the array B must contain the
*> matrix B.
*> \endverbatim
*>
*> \param[in] LDB
*> \verbatim
*> LDB is INTEGER
*> On entry, LDB specifies the first dimension of B as declared
*> in the calling (sub) program. When TRANS = 'N' or 'n'
*> then LDB must be at least max( 1, n ), otherwise LDB must
*> be at least max( 1, k ).
*> \endverbatim
*>
*> \param[in] BETA
*> \verbatim
*> BETA is DOUBLE PRECISION.
*> On entry, BETA specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] C
*> \verbatim
*> C is DOUBLE PRECISION array, dimension ( LDC, N )
*> Before entry with UPLO = 'U' or 'u', the strictly n by n
*> upper triangular part of the array C must contain the upper
*> triangular part of the skew-symmetric matrix and the leading
*> lower triangular part of C is not referenced. On exit, the
*> upper triangular part of the array C is overwritten by the
*> upper triangular part of the updated matrix.
*> Before entry with UPLO = 'L' or 'l', the strictly n by n
*> lower triangular part of the array C must contain the lower
*> triangular part of the skew-symmetric matrix and the leading
*> upper triangular part of C is not referenced. On exit, the
*> lower triangular part of the array C is overwritten by the
*> lower triangular part of the updated matrix.
*> \endverbatim
*>
*> \param[in] LDC
*> \verbatim
*> LDC is INTEGER
*> On entry, LDC specifies the first dimension of C as declared
*> in the calling (sub) program. LDC must be at least
*> max( 1, n ).
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup skewher2k
*
*> \par Further Details:
* =====================
*>
*> \verbatim
*>
*> Level 3 Blas routine.
*> Derived from subroutine dsyr2k.
*>
*> -- Written on 6-Jul-2025.
*> Shuo Zheng, China.
*> \endverbatim
*>
* =====================================================================
SUBROUTINE DSKEWSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,
+ LDB,BETA,C,LDC)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
DOUBLE PRECISION ALPHA,BETA
INTEGER K,LDA,LDB,LDC,N
CHARACTER TRANS,UPLO
* ..
* .. Array Arguments ..
DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
* ..
*
* =====================================================================
*
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
* .. Local Scalars ..
DOUBLE PRECISION TEMP1,TEMP2
INTEGER I,INFO,J,L,NROWA
LOGICAL UPPER
* ..
* .. Parameters ..
DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
* ..
*
* Test the input parameters.
*
IF (LSAME(TRANS,'N')) THEN
NROWA = N
ELSE
NROWA = K
END IF
UPPER = LSAME(UPLO,'U')
*
INFO = 0
IF ((.NOT.UPPER) .AND. (.NOT.LSAME(UPLO,'L'))) THEN
INFO = 1
ELSE IF ((.NOT.LSAME(TRANS,'N')) .AND.
+ (.NOT.LSAME(TRANS,'T')) .AND.
+ (.NOT.LSAME(TRANS,'C'))) THEN
INFO = 2
ELSE IF (N.LT.0) THEN
INFO = 3
ELSE IF (K.LT.0) THEN
INFO = 4
ELSE IF (LDA.LT.MAX(1,NROWA)) THEN
INFO = 7
ELSE IF (LDB.LT.MAX(1,NROWA)) THEN
INFO = 9
ELSE IF (LDC.LT.MAX(1,N)) THEN
INFO = 12
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('DSKEWSYR2K',INFO)
RETURN
END IF
*
* Quick return if possible.
*
IF ((N.EQ.0) .OR. (((ALPHA.EQ.ZERO).OR.
+ (K.EQ.0)).AND. (BETA.EQ.ONE))) RETURN
*
* And when alpha.eq.zero.
*
IF (ALPHA.EQ.ZERO) THEN
IF (UPPER) THEN
IF (BETA.EQ.ZERO) THEN
DO 20 J = 1,N
DO 10 I = 1,J-1
C(I,J) = ZERO
10 CONTINUE
20 CONTINUE
ELSE
DO 40 J = 1,N
DO 30 I = 1,J-1
C(I,J) = BETA*C(I,J)
30 CONTINUE
40 CONTINUE
END IF
ELSE
IF (BETA.EQ.ZERO) THEN
DO 60 J = 1,N
DO 50 I = J+1,N
C(I,J) = ZERO
50 CONTINUE
60 CONTINUE
ELSE
DO 80 J = 1,N
DO 70 I = J+1,N
C(I,J) = BETA*C(I,J)
70 CONTINUE
80 CONTINUE
END IF
END IF
RETURN
END IF
*
* Start the operations.
*
IF (LSAME(TRANS,'N')) THEN
*
* Form C := alpha*A*B**T + alpha*B*A**T + C.
*
IF (UPPER) THEN
DO 130 J = 1,N
IF (BETA.EQ.ZERO) THEN
DO 90 I = 1,J-1
C(I,J) = ZERO
90 CONTINUE
ELSE IF (BETA.NE.ONE) THEN
DO 100 I = 1,J-1
C(I,J) = BETA*C(I,J)
100 CONTINUE
END IF
DO 120 L = 1,K
IF ((A(J,L).NE.ZERO) .OR. (B(J,L).NE.ZERO)) THEN
TEMP1 = ALPHA*B(J,L)
TEMP2 = ALPHA*A(J,L)
DO 110 I = 1,J-1
C(I,J) = C(I,J) - A(I,L)*TEMP1 +
+ B(I,L)*TEMP2
110 CONTINUE
END IF
120 CONTINUE
130 CONTINUE
ELSE
DO 180 J = 1,N
IF (BETA.EQ.ZERO) THEN
DO 140 I = J+1,N
C(I,J) = ZERO
140 CONTINUE
ELSE IF (BETA.NE.ONE) THEN
DO 150 I = J+1,N
C(I,J) = BETA*C(I,J)
150 CONTINUE
END IF
DO 170 L = 1,K
IF ((A(J,L).NE.ZERO) .OR. (B(J,L).NE.ZERO)) THEN
TEMP1 = ALPHA*B(J,L)
TEMP2 = ALPHA*A(J,L)
DO 160 I = J+1,N
C(I,J) = C(I,J) - A(I,L)*TEMP1 +
+ B(I,L)*TEMP2
160 CONTINUE
END IF
170 CONTINUE
180 CONTINUE
END IF
ELSE
*
* Form C := alpha*A**T*B + alpha*B**T*A + C.
*
IF (UPPER) THEN
DO 210 J = 1,N
DO 200 I = 1,J-1
TEMP1 = ZERO
TEMP2 = ZERO
DO 190 L = 1,K
TEMP1 = TEMP1 + A(L,I)*B(L,J)
TEMP2 = TEMP2 + B(L,I)*A(L,J)
190 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(I,J) = -ALPHA*TEMP1 + ALPHA*TEMP2
ELSE
C(I,J) = BETA*C(I,J) - ALPHA*TEMP1 +
+ ALPHA*TEMP2
END IF
200 CONTINUE
210 CONTINUE
ELSE
DO 240 J = 1,N
DO 230 I = J+1,N
TEMP1 = ZERO
TEMP2 = ZERO
DO 220 L = 1,K
TEMP1 = TEMP1 + A(L,I)*B(L,J)
TEMP2 = TEMP2 + B(L,I)*A(L,J)
220 CONTINUE
IF (BETA.EQ.ZERO) THEN
C(I,J) = -ALPHA*TEMP1 + ALPHA*TEMP2
ELSE
C(I,J) = BETA*C(I,J) - ALPHA*TEMP1 +
+ ALPHA*TEMP2
END IF
230 CONTINUE
240 CONTINUE
END IF
END IF
*
RETURN
*
* End of DSKEWSYR2K
*
END
+1
View File
@@ -144,6 +144,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY) SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -124,6 +124,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP) SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -139,6 +139,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP) SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -79,6 +79,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSWAP(N,DX,INCX,DY,INCY) SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -186,6 +186,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -149,6 +149,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -129,6 +129,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA) SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -144,6 +144,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA) SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -189,6 +189,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -166,6 +166,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC) SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+29 -40
View File
@@ -183,6 +183,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX) SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -197,10 +198,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -270,28 +267,24 @@
KPLUS1 = K + 1 KPLUS1 = K + 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) L = KPLUS1 - J
L = KPLUS1 - J DO 10 I = MAX(1,J-K),J - 1
DO 10 I = MAX(1,J-K),J - 1 X(I) = X(I) + TEMP*A(L+I,J)
X(I) = X(I) + TEMP*A(L+I,J) 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*A(KPLUS1,J)
IF (NOUNIT) X(J) = X(J)*A(KPLUS1,J)
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX L = KPLUS1 - J
L = KPLUS1 - J DO 30 I = MAX(1,J-K),J - 1
DO 30 I = MAX(1,J-K),J - 1 X(IX) = X(IX) + TEMP*A(L+I,J)
X(IX) = X(IX) + TEMP*A(L+I,J) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(KPLUS1,J)
IF (NOUNIT) X(JX) = X(JX)*A(KPLUS1,J)
END IF
JX = JX + INCX JX = JX + INCX
IF (J.GT.K) KX = KX + INCX IF (J.GT.K) KX = KX + INCX
40 CONTINUE 40 CONTINUE
@@ -299,29 +292,25 @@
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) L = 1 - J
L = 1 - J DO 50 I = MIN(N,J+K),J + 1,-1
DO 50 I = MIN(N,J+K),J + 1,-1 X(I) = X(I) + TEMP*A(L+I,J)
X(I) = X(I) + TEMP*A(L+I,J) 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*A(1,J)
IF (NOUNIT) X(J) = X(J)*A(1,J)
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX L = 1 - J
L = 1 - J DO 70 I = MIN(N,J+K),J + 1,-1
DO 70 I = MIN(N,J+K),J + 1,-1 X(IX) = X(IX) + TEMP*A(L+I,J)
X(IX) = X(IX) + TEMP*A(L+I,J) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(1,J)
IF (NOUNIT) X(JX) = X(JX)*A(1,J)
END IF
JX = JX - INCX JX = JX - INCX
IF ((N-J).GE.K) KX = KX - INCX IF ((N-J).GE.K) KX = KX - INCX
80 CONTINUE 80 CONTINUE
+29 -40
View File
@@ -186,6 +186,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX) SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -200,10 +201,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -273,59 +270,51 @@
KPLUS1 = K + 1 KPLUS1 = K + 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN L = KPLUS1 - J
L = KPLUS1 - J IF (NOUNIT) X(J) = X(J)/A(KPLUS1,J)
IF (NOUNIT) X(J) = X(J)/A(KPLUS1,J) TEMP = X(J)
TEMP = X(J) DO 10 I = J - 1,MAX(1,J-K),-1
DO 10 I = J - 1,MAX(1,J-K),-1 X(I) = X(I) - TEMP*A(L+I,J)
X(I) = X(I) - TEMP*A(L+I,J) 10 CONTINUE
10 CONTINUE
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
KX = KX - INCX KX = KX - INCX
IF (X(JX).NE.ZERO) THEN IX = KX
IX = KX L = KPLUS1 - J
L = KPLUS1 - J IF (NOUNIT) X(JX) = X(JX)/A(KPLUS1,J)
IF (NOUNIT) X(JX) = X(JX)/A(KPLUS1,J) TEMP = X(JX)
TEMP = X(JX) DO 30 I = J - 1,MAX(1,J-K),-1
DO 30 I = J - 1,MAX(1,J-K),-1 X(IX) = X(IX) - TEMP*A(L+I,J)
X(IX) = X(IX) - TEMP*A(L+I,J) IX = IX - INCX
IX = IX - INCX 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN L = 1 - J
L = 1 - J IF (NOUNIT) X(J) = X(J)/A(1,J)
IF (NOUNIT) X(J) = X(J)/A(1,J) TEMP = X(J)
TEMP = X(J) DO 50 I = J + 1,MIN(N,J+K)
DO 50 I = J + 1,MIN(N,J+K) X(I) = X(I) - TEMP*A(L+I,J)
X(I) = X(I) - TEMP*A(L+I,J) 50 CONTINUE
50 CONTINUE
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
KX = KX + INCX KX = KX + INCX
IF (X(JX).NE.ZERO) THEN IX = KX
IX = KX L = 1 - J
L = 1 - J IF (NOUNIT) X(JX) = X(JX)/A(1,J)
IF (NOUNIT) X(JX) = X(JX)/A(1,J) TEMP = X(JX)
TEMP = X(JX) DO 70 I = J + 1,MIN(N,J+K)
DO 70 I = J + 1,MIN(N,J+K) X(IX) = X(IX) - TEMP*A(L+I,J)
X(IX) = X(IX) - TEMP*A(L+I,J) IX = IX + INCX
IX = IX + INCX 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+29 -40
View File
@@ -139,6 +139,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX) SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -153,10 +154,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -219,29 +216,25 @@
KK = 1 KK = 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) K = KK
K = KK DO 10 I = 1,J - 1
DO 10 I = 1,J - 1 X(I) = X(I) + TEMP*AP(K)
X(I) = X(I) + TEMP*AP(K) K = K + 1
K = K + 1 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*AP(KK+J-1)
IF (NOUNIT) X(J) = X(J)*AP(KK+J-1)
END IF
KK = KK + J KK = KK + J
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 30 K = KK,KK + J - 2
DO 30 K = KK,KK + J - 2 X(IX) = X(IX) + TEMP*AP(K)
X(IX) = X(IX) + TEMP*AP(K) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*AP(KK+J-1)
IF (NOUNIT) X(JX) = X(JX)*AP(KK+J-1)
END IF
JX = JX + INCX JX = JX + INCX
KK = KK + J KK = KK + J
40 CONTINUE 40 CONTINUE
@@ -250,30 +243,26 @@
KK = (N* (N+1))/2 KK = (N* (N+1))/2
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) K = KK
K = KK DO 50 I = N,J + 1,-1
DO 50 I = N,J + 1,-1 X(I) = X(I) + TEMP*AP(K)
X(I) = X(I) + TEMP*AP(K) K = K - 1
K = K - 1 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*AP(KK-N+J)
IF (NOUNIT) X(J) = X(J)*AP(KK-N+J)
END IF
KK = KK - (N-J+1) KK = KK - (N-J+1)
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 70 K = KK,KK - (N- (J+1)),-1
DO 70 K = KK,KK - (N- (J+1)),-1 X(IX) = X(IX) + TEMP*AP(K)
X(IX) = X(IX) + TEMP*AP(K) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*AP(KK-N+J)
IF (NOUNIT) X(JX) = X(JX)*AP(KK-N+J)
END IF
JX = JX - INCX JX = JX - INCX
KK = KK - (N-J+1) KK = KK - (N-J+1)
80 CONTINUE 80 CONTINUE
+29 -40
View File
@@ -141,6 +141,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX) SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -155,10 +156,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -221,29 +218,25 @@
KK = (N* (N+1))/2 KK = (N* (N+1))/2
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/AP(KK)
IF (NOUNIT) X(J) = X(J)/AP(KK) TEMP = X(J)
TEMP = X(J) K = KK - 1
K = KK - 1 DO 10 I = J - 1,1,-1
DO 10 I = J - 1,1,-1 X(I) = X(I) - TEMP*AP(K)
X(I) = X(I) - TEMP*AP(K) K = K - 1
K = K - 1 10 CONTINUE
10 CONTINUE
END IF
KK = KK - J KK = KK - J
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX + (N-1)*INCX JX = KX + (N-1)*INCX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/AP(KK)
IF (NOUNIT) X(JX) = X(JX)/AP(KK) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 30 K = KK - 1,KK - J + 1,-1
DO 30 K = KK - 1,KK - J + 1,-1 IX = IX - INCX
IX = IX - INCX X(IX) = X(IX) - TEMP*AP(K)
X(IX) = X(IX) - TEMP*AP(K) 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
KK = KK - J KK = KK - J
40 CONTINUE 40 CONTINUE
@@ -252,29 +245,25 @@
KK = 1 KK = 1
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/AP(KK)
IF (NOUNIT) X(J) = X(J)/AP(KK) TEMP = X(J)
TEMP = X(J) K = KK + 1
K = KK + 1 DO 50 I = J + 1,N
DO 50 I = J + 1,N X(I) = X(I) - TEMP*AP(K)
X(I) = X(I) - TEMP*AP(K) K = K + 1
K = K + 1 50 CONTINUE
50 CONTINUE
END IF
KK = KK + (N-J+1) KK = KK + (N-J+1)
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/AP(KK)
IF (NOUNIT) X(JX) = X(JX)/AP(KK) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 70 K = KK + 1,KK + N - J
DO 70 K = KK + 1,KK + N - J IX = IX + INCX
IX = IX + INCX X(IX) = X(IX) - TEMP*AP(K)
X(IX) = X(IX) - TEMP*AP(K) 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
KK = KK + (N-J+1) KK = KK + (N-J+1)
80 CONTINUE 80 CONTINUE
+29 -40
View File
@@ -174,6 +174,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB) SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -272,27 +273,23 @@
IF (UPPER) THEN IF (UPPER) THEN
DO 50 J = 1,N DO 50 J = 1,N
DO 40 K = 1,M DO 40 K = 1,M
IF (B(K,J).NE.ZERO) THEN TEMP = ALPHA*B(K,J)
TEMP = ALPHA*B(K,J) DO 30 I = 1,K - 1
DO 30 I = 1,K - 1 B(I,J) = B(I,J) + TEMP*A(I,K)
B(I,J) = B(I,J) + TEMP*A(I,K) 30 CONTINUE
30 CONTINUE IF (NOUNIT) TEMP = TEMP*A(K,K)
IF (NOUNIT) TEMP = TEMP*A(K,K) B(K,J) = TEMP
B(K,J) = TEMP
END IF
40 CONTINUE 40 CONTINUE
50 CONTINUE 50 CONTINUE
ELSE ELSE
DO 80 J = 1,N DO 80 J = 1,N
DO 70 K = M,1,-1 DO 70 K = M,1,-1
IF (B(K,J).NE.ZERO) THEN TEMP = ALPHA*B(K,J)
TEMP = ALPHA*B(K,J) B(K,J) = TEMP
B(K,J) = TEMP IF (NOUNIT) B(K,J) = B(K,J)*A(K,K)
IF (NOUNIT) B(K,J) = B(K,J)*A(K,K) DO 60 I = K + 1,M
DO 60 I = K + 1,M B(I,J) = B(I,J) + TEMP*A(I,K)
B(I,J) = B(I,J) + TEMP*A(I,K) 60 CONTINUE
60 CONTINUE
END IF
70 CONTINUE 70 CONTINUE
80 CONTINUE 80 CONTINUE
END IF END IF
@@ -337,12 +334,10 @@
B(I,J) = TEMP*B(I,J) B(I,J) = TEMP*B(I,J)
150 CONTINUE 150 CONTINUE
DO 170 K = 1,J - 1 DO 170 K = 1,J - 1
IF (A(K,J).NE.ZERO) THEN TEMP = ALPHA*A(K,J)
TEMP = ALPHA*A(K,J) DO 160 I = 1,M
DO 160 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 160 CONTINUE
160 CONTINUE
END IF
170 CONTINUE 170 CONTINUE
180 CONTINUE 180 CONTINUE
ELSE ELSE
@@ -353,12 +348,10 @@
B(I,J) = TEMP*B(I,J) B(I,J) = TEMP*B(I,J)
190 CONTINUE 190 CONTINUE
DO 210 K = J + 1,N DO 210 K = J + 1,N
IF (A(K,J).NE.ZERO) THEN TEMP = ALPHA*A(K,J)
TEMP = ALPHA*A(K,J) DO 200 I = 1,M
DO 200 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 200 CONTINUE
200 CONTINUE
END IF
210 CONTINUE 210 CONTINUE
220 CONTINUE 220 CONTINUE
END IF END IF
@@ -369,12 +362,10 @@
IF (UPPER) THEN IF (UPPER) THEN
DO 260 K = 1,N DO 260 K = 1,N
DO 240 J = 1,K - 1 DO 240 J = 1,K - 1
IF (A(J,K).NE.ZERO) THEN TEMP = ALPHA*A(J,K)
TEMP = ALPHA*A(J,K) DO 230 I = 1,M
DO 230 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 230 CONTINUE
230 CONTINUE
END IF
240 CONTINUE 240 CONTINUE
TEMP = ALPHA TEMP = ALPHA
IF (NOUNIT) TEMP = TEMP*A(K,K) IF (NOUNIT) TEMP = TEMP*A(K,K)
@@ -387,12 +378,10 @@
ELSE ELSE
DO 300 K = N,1,-1 DO 300 K = N,1,-1
DO 280 J = K + 1,N DO 280 J = K + 1,N
IF (A(J,K).NE.ZERO) THEN TEMP = ALPHA*A(J,K)
TEMP = ALPHA*A(J,K) DO 270 I = 1,M
DO 270 I = 1,M B(I,J) = B(I,J) + TEMP*B(I,K)
B(I,J) = B(I,J) + TEMP*B(I,K) 270 CONTINUE
270 CONTINUE
END IF
280 CONTINUE 280 CONTINUE
TEMP = ALPHA TEMP = ALPHA
IF (NOUNIT) TEMP = TEMP*A(K,K) IF (NOUNIT) TEMP = TEMP*A(K,K)
+25 -36
View File
@@ -144,6 +144,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX) SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -158,10 +159,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -228,53 +225,45 @@
IF (LSAME(UPLO,'U')) THEN IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = 1,N DO 20 J = 1,N
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) DO 10 I = 1,J - 1
DO 10 I = 1,J - 1 X(I) = X(I) + TEMP*A(I,J)
X(I) = X(I) + TEMP*A(I,J) 10 CONTINUE
10 CONTINUE IF (NOUNIT) X(J) = X(J)*A(J,J)
IF (NOUNIT) X(J) = X(J)*A(J,J)
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 40 J = 1,N DO 40 J = 1,N
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 30 I = 1,J - 1
DO 30 I = 1,J - 1 X(IX) = X(IX) + TEMP*A(I,J)
X(IX) = X(IX) + TEMP*A(I,J) IX = IX + INCX
IX = IX + INCX 30 CONTINUE
30 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(J,J)
IF (NOUNIT) X(JX) = X(JX)*A(J,J)
END IF
JX = JX + INCX JX = JX + INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = N,1,-1 DO 60 J = N,1,-1
IF (X(J).NE.ZERO) THEN TEMP = X(J)
TEMP = X(J) DO 50 I = N,J + 1,-1
DO 50 I = N,J + 1,-1 X(I) = X(I) + TEMP*A(I,J)
X(I) = X(I) + TEMP*A(I,J) 50 CONTINUE
50 CONTINUE IF (NOUNIT) X(J) = X(J)*A(J,J)
IF (NOUNIT) X(J) = X(J)*A(J,J)
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
KX = KX + (N-1)*INCX KX = KX + (N-1)*INCX
JX = KX JX = KX
DO 80 J = N,1,-1 DO 80 J = N,1,-1
IF (X(JX).NE.ZERO) THEN TEMP = X(JX)
TEMP = X(JX) IX = KX
IX = KX DO 70 I = N,J + 1,-1
DO 70 I = N,J + 1,-1 X(IX) = X(IX) + TEMP*A(I,J)
X(IX) = X(IX) + TEMP*A(I,J) IX = IX - INCX
IX = IX - INCX 70 CONTINUE
70 CONTINUE IF (NOUNIT) X(JX) = X(JX)*A(J,J)
IF (NOUNIT) X(JX) = X(JX)*A(J,J)
END IF
JX = JX - INCX JX = JX - INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+47 -76
View File
@@ -178,6 +178,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB) SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
IMPLICIT NONE
* *
* -- Reference BLAS level3 routine -- * -- Reference BLAS level3 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -210,8 +211,8 @@
LOGICAL LSIDE,NOUNIT,UPPER LOGICAL LSIDE,NOUNIT,UPPER
* .. * ..
* .. Parameters .. * .. Parameters ..
DOUBLE PRECISION ONE,ZERO DOUBLE PRECISION ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0) PARAMETER (ZERO=0.0D+0)
* .. * ..
* *
* Test the input parameters. * Test the input parameters.
@@ -275,34 +276,26 @@
* *
IF (UPPER) THEN IF (UPPER) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 30 I = 1,M
DO 30 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 30 CONTINUE
30 CONTINUE DO 50 K = M,1,-1
END IF IF (NOUNIT) B(K,J) = B(K,J)/A(K,K)
DO 50 K = M,1,-1 DO 40 I = 1,K - 1
IF (B(K,J).NE.ZERO) THEN B(I,J) = B(I,J) - B(K,J)*A(I,K)
IF (NOUNIT) B(K,J) = B(K,J)/A(K,K) 40 CONTINUE
DO 40 I = 1,K - 1
B(I,J) = B(I,J) - B(K,J)*A(I,K)
40 CONTINUE
END IF
50 CONTINUE 50 CONTINUE
60 CONTINUE 60 CONTINUE
ELSE ELSE
DO 100 J = 1,N DO 100 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 70 I = 1,M
DO 70 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 70 CONTINUE
70 CONTINUE DO 90 K = 1,M
END IF IF (NOUNIT) B(K,J) = B(K,J)/A(K,K)
DO 90 K = 1,M DO 80 I = K + 1,M
IF (B(K,J).NE.ZERO) THEN B(I,J) = B(I,J) - B(K,J)*A(I,K)
IF (NOUNIT) B(K,J) = B(K,J)/A(K,K) 80 CONTINUE
DO 80 I = K + 1,M
B(I,J) = B(I,J) - B(K,J)*A(I,K)
80 CONTINUE
END IF
90 CONTINUE 90 CONTINUE
100 CONTINUE 100 CONTINUE
END IF END IF
@@ -341,43 +334,33 @@
* *
IF (UPPER) THEN IF (UPPER) THEN
DO 210 J = 1,N DO 210 J = 1,N
IF (ALPHA.NE.ONE) THEN DO 170 I = 1,M
DO 170 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 170 CONTINUE
170 CONTINUE
END IF
DO 190 K = 1,J - 1 DO 190 K = 1,J - 1
IF (A(K,J).NE.ZERO) THEN DO 180 I = 1,M
DO 180 I = 1,M B(I,J) = B(I,J) - A(K,J)*B(I,K)
B(I,J) = B(I,J) - A(K,J)*B(I,K) 180 CONTINUE
180 CONTINUE
END IF
190 CONTINUE 190 CONTINUE
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(J,J)
DO 200 I = 1,M DO 200 I = 1,M
B(I,J) = TEMP*B(I,J) B(I,J) = B(I,J)/A(J,J)
200 CONTINUE 200 CONTINUE
END IF END IF
210 CONTINUE 210 CONTINUE
ELSE ELSE
DO 260 J = N,1,-1 DO 260 J = N,1,-1
IF (ALPHA.NE.ONE) THEN DO 220 I = 1,M
DO 220 I = 1,M B(I,J) = ALPHA*B(I,J)
B(I,J) = ALPHA*B(I,J) 220 CONTINUE
220 CONTINUE
END IF
DO 240 K = J + 1,N DO 240 K = J + 1,N
IF (A(K,J).NE.ZERO) THEN DO 230 I = 1,M
DO 230 I = 1,M B(I,J) = B(I,J) - A(K,J)*B(I,K)
B(I,J) = B(I,J) - A(K,J)*B(I,K) 230 CONTINUE
230 CONTINUE
END IF
240 CONTINUE 240 CONTINUE
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(J,J)
DO 250 I = 1,M DO 250 I = 1,M
B(I,J) = TEMP*B(I,J) B(I,J) = B(I,J)/A(J,J)
250 CONTINUE 250 CONTINUE
END IF END IF
260 CONTINUE 260 CONTINUE
@@ -389,46 +372,34 @@
IF (UPPER) THEN IF (UPPER) THEN
DO 310 K = N,1,-1 DO 310 K = N,1,-1
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(K,K)
DO 270 I = 1,M DO 270 I = 1,M
B(I,K) = TEMP*B(I,K) B(I,K) = B(I,K)/A(K,K)
270 CONTINUE 270 CONTINUE
END IF END IF
DO 290 J = 1,K - 1 DO 290 J = 1,K - 1
IF (A(J,K).NE.ZERO) THEN DO 280 I = 1,M
TEMP = A(J,K) B(I,J) = B(I,J) - A(J,K)*B(I,K)
DO 280 I = 1,M 280 CONTINUE
B(I,J) = B(I,J) - TEMP*B(I,K)
280 CONTINUE
END IF
290 CONTINUE 290 CONTINUE
IF (ALPHA.NE.ONE) THEN DO 300 I = 1,M
DO 300 I = 1,M B(I,K) = ALPHA*B(I,K)
B(I,K) = ALPHA*B(I,K) 300 CONTINUE
300 CONTINUE
END IF
310 CONTINUE 310 CONTINUE
ELSE ELSE
DO 360 K = 1,N DO 360 K = 1,N
IF (NOUNIT) THEN IF (NOUNIT) THEN
TEMP = ONE/A(K,K)
DO 320 I = 1,M DO 320 I = 1,M
B(I,K) = TEMP*B(I,K) B(I,K) = B(I,K)/A(K,K)
320 CONTINUE 320 CONTINUE
END IF END IF
DO 340 J = K + 1,N DO 340 J = K + 1,N
IF (A(J,K).NE.ZERO) THEN DO 330 I = 1,M
TEMP = A(J,K) B(I,J) = B(I,J) - A(J,K)*B(I,K)
DO 330 I = 1,M 330 CONTINUE
B(I,J) = B(I,J) - TEMP*B(I,K)
330 CONTINUE
END IF
340 CONTINUE 340 CONTINUE
IF (ALPHA.NE.ONE) THEN DO 350 I = 1,M
DO 350 I = 1,M B(I,K) = ALPHA*B(I,K)
B(I,K) = ALPHA*B(I,K) 350 CONTINUE
350 CONTINUE
END IF
360 CONTINUE 360 CONTINUE
END IF END IF
END IF END IF
+25 -36
View File
@@ -140,6 +140,7 @@
* *
* ===================================================================== * =====================================================================
SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX) SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level2 routine -- * -- Reference BLAS level2 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
@@ -154,10 +155,6 @@
* .. * ..
* *
* ===================================================================== * =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ZERO
PARAMETER (ZERO=0.0D+0)
* .. * ..
* .. Local Scalars .. * .. Local Scalars ..
DOUBLE PRECISION TEMP DOUBLE PRECISION TEMP
@@ -224,52 +221,44 @@
IF (LSAME(UPLO,'U')) THEN IF (LSAME(UPLO,'U')) THEN
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 20 J = N,1,-1 DO 20 J = N,1,-1
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/A(J,J)
IF (NOUNIT) X(J) = X(J)/A(J,J) TEMP = X(J)
TEMP = X(J) DO 10 I = J - 1,1,-1
DO 10 I = J - 1,1,-1 X(I) = X(I) - TEMP*A(I,J)
X(I) = X(I) - TEMP*A(I,J) 10 CONTINUE
10 CONTINUE
END IF
20 CONTINUE 20 CONTINUE
ELSE ELSE
JX = KX + (N-1)*INCX JX = KX + (N-1)*INCX
DO 40 J = N,1,-1 DO 40 J = N,1,-1
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/A(J,J)
IF (NOUNIT) X(JX) = X(JX)/A(J,J) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 30 I = J - 1,1,-1
DO 30 I = J - 1,1,-1 IX = IX - INCX
IX = IX - INCX X(IX) = X(IX) - TEMP*A(I,J)
X(IX) = X(IX) - TEMP*A(I,J) 30 CONTINUE
30 CONTINUE
END IF
JX = JX - INCX JX = JX - INCX
40 CONTINUE 40 CONTINUE
END IF END IF
ELSE ELSE
IF (INCX.EQ.1) THEN IF (INCX.EQ.1) THEN
DO 60 J = 1,N DO 60 J = 1,N
IF (X(J).NE.ZERO) THEN IF (NOUNIT) X(J) = X(J)/A(J,J)
IF (NOUNIT) X(J) = X(J)/A(J,J) TEMP = X(J)
TEMP = X(J) DO 50 I = J + 1,N
DO 50 I = J + 1,N X(I) = X(I) - TEMP*A(I,J)
X(I) = X(I) - TEMP*A(I,J) 50 CONTINUE
50 CONTINUE
END IF
60 CONTINUE 60 CONTINUE
ELSE ELSE
JX = KX JX = KX
DO 80 J = 1,N DO 80 J = 1,N
IF (X(JX).NE.ZERO) THEN IF (NOUNIT) X(JX) = X(JX)/A(J,J)
IF (NOUNIT) X(JX) = X(JX)/A(J,J) TEMP = X(JX)
TEMP = X(JX) IX = JX
IX = JX DO 70 I = J + 1,N
DO 70 I = J + 1,N IX = IX + INCX
IX = IX + INCX X(IX) = X(IX) - TEMP*A(I,J)
X(IX) = X(IX) - TEMP*A(I,J) 70 CONTINUE
70 CONTINUE
END IF
JX = JX + INCX JX = JX + INCX
80 CONTINUE 80 CONTINUE
END IF END IF
+1
View File
@@ -69,6 +69,7 @@
*> *>
* ===================================================================== * =====================================================================
DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX) DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+3 -2
View File
@@ -86,11 +86,12 @@
!> \endverbatim !> \endverbatim
!> !>
! ===================================================================== ! =====================================================================
function DZNRM2( n, x, incx ) function DZNRM2( n, x, incx )
implicit none
integer, parameter :: wp = kind(1.d0) integer, parameter :: wp = kind(1.d0)
real(wp) :: DZNRM2 real(wp) :: DZNRM2
! !
! -- Reference BLAS level1 routine (version 3.9.1) -- ! -- Reference BLAS level1 routine --
! -- Reference BLAS is a software package provided by Univ. of Tennessee, -- ! -- Reference BLAS is a software package provided by Univ. of Tennessee, --
! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- ! -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
! March 2021 ! March 2021
+193
View File
@@ -0,0 +1,193 @@
!> \brief \b ICAMAX
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! INTEGER FUNCTION ICAMAX(N,X,INCX)
!
! .. Scalar Arguments ..
! INTEGER INCX,N
! ..
! .. Array Arguments ..
! COMPLEX X(*)
! ..
!
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> \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 ( 1 + ( N - 1 )*abs( INCX ) )
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER
!> storage spacing between elements of X
!> \endverbatim
!
! Authors:
! ========
!
!> James Demmel, University of California Berkeley, USA
!> Weslley Pereira, National Renewable Energy Laboratory, USA
!
!> \ingroup iamax
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> James Demmel et al. Proposed Consistent Exception Handling for the BLAS and
!> LAPACK, 2022 (https://arxiv.org/abs/2207.09281).
!>
!> \endverbatim
!>
! =====================================================================
integer function icamax(n, x, incx)
implicit none
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 :: hugeval = huge(0.0_wp)
!
! .. Scalar Arguments ..
integer :: n, incx
!
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, j, ix, jx
real(wp) :: val, smax
logical :: scaledsmax
! ..
! .. Intrinsic Functions ..
intrinsic :: abs, aimag, huge, real
!
! Quick return if possible
!
icamax = 0
if (n < 1 .or. incx < 1) return
!
icamax = 1
if (n == 1) return
!
icamax = 0
scaledsmax = .false.
smax = -1
!
! scaledsmax = .true. indicates that x(icamax) is finite but
! abs(real(x(icamax))) + abs(aimag(x(icamax))) overflows
!
if (incx == 1) then
! code for increment equal to 1
do i = 1, n
if (x(i) /= x(i)) then
! return when first NaN found
icamax = i
return
elseif (abs(real(x(i))) > hugeval .or. abs(aimag(x(i))) > hugeval) then
! keep looking for first NaN
do j = i+1, n
if (x(j) /= x(j)) then
! return when first NaN found
icamax = j
return
endif
enddo
! record location of first Inf
icamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(i))) + abs(aimag(x(i))) = Inf yet
val = abs(real(x(i))) + abs(aimag(x(i)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(i))) + 0.25*abs(aimag(x(i)))
icamax = i
elseif (val > smax) then ! everything finite so far
smax = val
icamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(i))) + 0.25*abs(aimag(x(i)))
if (val > smax) then
smax = val
icamax = i
endif
endif
endif
end do
else
! code for increment not equal to 1
ix = 1
do i = 1, n
if (x(ix) /= x(ix)) then
! return when first NaN found
icamax = i
return
elseif (abs(real(x(ix))) > hugeval .or. abs(aimag(x(ix))) > hugeval) then
! keep looking for first NaN
jx = ix + incx
do j = i+1, n
if (x(jx) /= x(jx)) then
! return when first NaN found
icamax = j
return
endif
jx = jx + incx
enddo
! record location of first Inf
icamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(ix))) + abs(aimag(x(ix))) = Inf yet
val = abs(real(x(ix))) + abs(aimag(x(ix)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(ix))) + 0.25*abs(aimag(x(ix)))
icamax = i
elseif (val > smax) then ! everything finite so far
smax = val
icamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(ix))) + 0.25*abs(aimag(x(ix)))
if (val > smax) then
smax = val
icamax = i
endif
endif
endif
ix = ix + incx
end do
endif
end
+1
View File
@@ -68,6 +68,7 @@
*> *>
* ===================================================================== * =====================================================================
INTEGER FUNCTION IDAMAX(N,DX,INCX) INTEGER FUNCTION IDAMAX(N,DX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -68,6 +68,7 @@
*> *>
* ===================================================================== * =====================================================================
INTEGER FUNCTION ISAMAX(N,SX,INCX) INTEGER FUNCTION ISAMAX(N,SX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+193
View File
@@ -0,0 +1,193 @@
!> \brief \b IZAMAX
!
! =========== DOCUMENTATION ===========
!
! Online html documentation available at
! http://www.netlib.org/lapack/explore-html/
!
! Definition:
! ===========
!
! INTEGER FUNCTION IZAMAX(N,X,INCX)
!
! .. Scalar Arguments ..
! INTEGER INCX,N
! ..
! .. Array Arguments ..
! DOUBLE COMPLEX X(*)
! ..
!
!
!> \par Purpose:
! =============
!>
!> \verbatim
!>
!> IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
!> \endverbatim
!
! Arguments:
! ==========
!
!> \param[in] N
!> \verbatim
!> N is INTEGER
!> number of elements in input vector(s)
!> \endverbatim
!>
!> \param[in] X
!> \verbatim
!> X is DOUBLE COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!> \endverbatim
!>
!> \param[in] INCX
!> \verbatim
!> INCX is INTEGER
!> storage spacing between elements of X
!> \endverbatim
!
! Authors:
! ========
!
!> James Demmel, University of California Berkeley, USA
!> Weslley Pereira, National Renewable Energy Laboratory, USA
!
!> \ingroup iamax
!
!> \par Further Details:
! =====================
!>
!> \verbatim
!>
!> James Demmel et al. Proposed Consistent Exception Handling for the BLAS and
!> LAPACK, 2022 (https://arxiv.org/abs/2207.09281).
!>
!> \endverbatim
!>
! =====================================================================
integer function izamax(n, x, incx)
implicit none
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 :: hugeval = huge(0.0_wp)
!
! .. Scalar Arguments ..
integer :: n, incx
!
! .. Array Arguments ..
complex(wp) :: x(*)
! ..
! .. Local Scalars ..
integer :: i, j, ix, jx
real(wp) :: val, smax
logical :: scaledsmax
! ..
! .. Intrinsic Functions ..
intrinsic :: abs, dimag, huge, real
!
! Quick return if possible
!
izamax = 0
if (n < 1 .or. incx < 1) return
!
izamax = 1
if (n == 1) return
!
izamax = 0
scaledsmax = .false.
smax = -1
!
! scaledsmax = .true. indicates that x(izamax) is finite but
! abs(real(x(izamax))) + abs(dimag(x(izamax))) overflows
!
if (incx == 1) then
! code for increment equal to 1
do i = 1, n
if (x(i) /= x(i)) then
! return when first NaN found
izamax = i
return
elseif (abs(real(x(i))) > hugeval .or. abs(dimag(x(i))) > hugeval) then
! keep looking for first NaN
do j = i+1, n
if (x(j) /= x(j)) then
! return when first NaN found
izamax = j
return
endif
enddo
! record location of first Inf
izamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(i))) + abs(dimag(x(i))) = Inf yet
val = abs(real(x(i))) + abs(dimag(x(i)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(i))) + 0.25*abs(dimag(x(i)))
izamax = i
elseif (val > smax) then ! everything finite so far
smax = val
izamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(i))) + 0.25*abs(dimag(x(i)))
if (val > smax) then
smax = val
izamax = i
endif
endif
endif
end do
else
! code for increment not equal to 1
ix = 1
do i = 1, n
if (x(ix) /= x(ix)) then
! return when first NaN found
izamax = i
return
elseif (abs(real(x(ix))) > hugeval .or. abs(dimag(x(ix))) > hugeval) then
! keep looking for first NaN
jx = ix + incx
do j = i+1, n
if (x(jx) /= x(jx)) then
! return when first NaN found
izamax = j
return
endif
jx = jx + incx
enddo
! record location of first Inf
izamax = i
return
else ! still no Inf found yet
if (.not. scaledsmax) then
! no abs(real(x(ix))) + abs(dimag(x(ix))) = Inf yet
val = abs(real(x(ix))) + abs(dimag(x(ix)))
if (val > hugeval) then
scaledsmax = .true.
smax = 0.25*abs(real(x(ix))) + 0.25*abs(dimag(x(ix)))
izamax = i
elseif (val > smax) then ! everything finite so far
smax = val
izamax = i
endif
else ! scaledsmax
val = 0.25*abs(real(x(ix))) + 0.25*abs(dimag(x(ix)))
if (val > smax) then
smax = val
izamax = i
endif
endif
endif
ix = ix + incx
end do
endif
end
+1
View File
@@ -50,6 +50,7 @@
* *
* ===================================================================== * =====================================================================
LOGICAL FUNCTION LSAME(CA,CB) LOGICAL FUNCTION LSAME(CA,CB)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -69,6 +69,7 @@
*> *>
* ===================================================================== * =====================================================================
REAL FUNCTION SASUM(N,SX,INCX) REAL FUNCTION SASUM(N,SX,INCX)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+148
View File
@@ -0,0 +1,148 @@
*> \brief \b SAXPBY
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE SAXPBY(N,SA,SX,INCX,SB,SY,INCY)
*
* .. Scalar Arguments ..
* REAL SA,SB
* INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
* REAL SX(*),SY(*)
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> SAXPBY constant times a vector plus constant times a vector.
*>
*> Y = ALPHA * X + BETA * Y
*>
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> number of elements in input vector(s)
*> \endverbatim
*>
*> \param[in] SA
*> \verbatim
*> SA is REAL
*> On entry, SA specifies the scalar alpha.
*> \endverbatim
*>
*> \param[in] SX
*> \verbatim
*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
*> \endverbatim
*>
*> \param[in] INCX
*> \verbatim
*> INCX is INTEGER
*> storage spacing between elements of SX
*> \endverbatim
*>
*> \param[in] SB
*> \verbatim
*> SB is REAL
*> On entry, SB specifies the scalar beta.
*> \endverbatim
*>
*> \param[in,out] SY
*> \verbatim
*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
*> \endverbatim
*>
*> \param[in] INCY
*> \verbatim
*> INCY is INTEGER
*> storage spacing between elements of SY
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*> \author Martin Koehler, MPI Magdeburg
*
*> \ingroup axpby
*
* =====================================================================
SUBROUTINE SAXPBY(N,SA,SX,INCX,SB,SY,INCY)
IMPLICIT NONE
*
* -- 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..--
*
* .. Scalar Arguments ..
REAL SA,SB
INTEGER INCX,INCY,N
* ..
* .. Array Arguments ..
REAL SX(*),SY(*)
* ..
* .. External Subroutines ..
EXTERNAL SSCAL
*
* =====================================================================
*
* .. Local Scalars ..
INTEGER I,IX,IY,M,MP1
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
IF (N.LE.0) RETURN
* Scale if SA.EQ.0
IF (SA.EQ.0.0E0 .AND. SB.NE.0.0E0) THEN
CALL SSCAL(N, SB, SY, INCY)
RETURN
END IF
IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
*
* code for both increments equal to 1
*
DO I = 1,N
SY(I) = SB*SY(I) + SA*SX(I)
END DO
ELSE
*
* code for unequal increments or equal increments
* not equal to 1
*
IX = 1
IY = 1
IF (INCX.LT.0) IX = (-N+1)*INCX + 1
IF (INCY.LT.0) IY = (-N+1)*INCY + 1
DO I = 1,N
SY(IY) = SB*SY(IY) + SA*SX(IX)
IX = IX + INCX
IY = IY + INCY
END DO
END IF
RETURN
*
* End of SAXPBY
*
END
+1
View File
@@ -86,6 +86,7 @@
*> *>
* ===================================================================== * =====================================================================
SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY) SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+1
View File
@@ -43,6 +43,7 @@
* *
* ===================================================================== * =====================================================================
REAL FUNCTION SCABS1(Z) REAL FUNCTION SCABS1(Z)
IMPLICIT NONE
* *
* -- Reference BLAS level1 routine -- * -- Reference BLAS level1 routine --
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- * -- Reference BLAS is a software package provided by Univ. of Tennessee, --

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