Commit Graph
21 Commits
Author SHA1 Message Date
Mark Gates 97b0bedb32 implicit none in BLAS 2025-08-22 01:02:05 -04: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
Mark Gates 62b19990a2 doxygen: new group structure 2023-07-04 01:29:12 -04:00
Maria Kraynyuk ce3f662e12 Add Index-64 API as extended API with _64 suffix for CBLAS 2023-06-22 16:15:41 -07:00
langou 88aa204975 Revert "Add Index-64 API as extended API with _64 suffix for CBLAS" 2023-06-21 02:33:49 -06:00
Maria Kraynyuk 4c2236a536 Add Index-64 API as extended API with _64 suffix for CBLAS 2023-06-06 10:56:33 -07:00
Igor Zhuravlov 5f58f3cae6 comments unified: 'End of' comment: trash removed at the end of line 2021-04-06 18:07:14 -03:00
Julie e18d437924 Making LAPACK's code eternal... no more version and date in source files.
GitHub is now enabling us to track accurately version and date.
No need for this anymore.
2021-03-25 10:16:58 -07:00
Tim Leslie 50781b7649 Remove unused NCOLA variable 2020-09-27 09:42:32 +10:00
Henning Thielemann 98fd66325b BLAS doxygen array parameter comments: use the same format as LAPACK
i.e. "A is TYPE array, dimension ( LDx, N )"
2017-06-09 14:22:41 +02:00
Julie bc6a755be4 Updating version number on source file modified since 3.6.1
This is really old school, but a lot of times we have users sending us
copy pasting of codes, and that is the only way to know the version of
the code.
2016-12-23 15:01:32 -08:00
Hans Johnson 9dafba6d41 STYLE: Remove trailing whitespace in Fortran files
This is mostly a long term maintenance improvement.

Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.

By removing whitespace on one patch, it makes future
code reviews much easier.

=SCRIPT====================================================================

if which tempfile &>/dev/null; then
  TEMPMAKER=tempfile
elif which mktemp &>/dev/null; then
  TEMPMAKER=mktemp
else
  echo "Cannot find tempfile program." 2>&1
  exit 1
fi

MYTEMP=$($TEMPMAKER)
trap 'rm -f $MYTEMP' SIGINT SIGTERM

stripit() {
  echo "stripping $1"
  sed 's/[ \t]*$//' "$1" > $MYTEMP
  cp $MYTEMP "$1"
}

if [ $# -gt 0 ]; then
  while [ "$1" != "" ]; do
    stripit $1
    shift
  done
else
  while read -t 2; do
    stripit $REPLY
  done
fi

rm $MYTEMP
=================================================
2016-07-09 11:19:34 -05:00
julie 50d40d7852 Updating version number 2015-11-15 20:33:40 +00:00
langou 2b911746d5 Edited the code of xGBMV, xGEMV and xGEMM by removing the test for an entry of
B (or X) being zero to skip a loop so as to enable better NaN (or Inf)
propagation.

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

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

The snippets of code is as follows

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

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

The snippet of code now becomes

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

This enables correct NaN propagation for this piece of code.

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

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

Hello LAPACK people,

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

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

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

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

Thanks,

~tom
2014-07-12 19:58:39 +00:00
julie 1c3ba60067 Cosmetic changes in Doxygen presentation.
Use \par instead of \details for section.

add a Contributors Section and a Reference Section.
Remove (some) verbatim section when not needed.
Those changes have been done by hand so I am not sure I manage to catch them all.
2011-11-03 20:32:56 +00:00
julie 0d9e213c67 Correct Warning detected during Doxygen Generation.
Now each routine should have the correct list of arguments.
This allowed to detect and fix problems in parameter description of many routines.
2011-10-31 22:21:11 +00:00
julie e1d39294ae Integrating Doxygen in comments 2011-10-06 06:53:11 +00:00
julie d9d50d133b First pass for BLAS to homgenize notation for transpose (**T) and conjugate transpose (**H)
Corresponds to bug0024
2011-04-02 11:46:46 +00:00
julie a0d64643e4 Last round of modifications to the comments for the generation of the manpages 2009-01-02 21:57:02 +00:00
jason baba851215 Move LAPACK trunk into position. 2008-10-28 01:38:50 +00:00