Skip to content

Commit 8050692

Browse files
authored
Merge pull request #6 from Reference-LAPACK/master
rebase
2 parents 67ab142 + a6870da commit 8050692

File tree

167 files changed

+963
-808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+963
-808
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ matrix:
2121
env: CMAKE_BUILD_TYPE=Release
2222
before_install:
2323
- brew update > /dev/null
24-
- brew install gcc > /dev/null
24+
- brew upgrade gcc > /dev/null
2525
- os: osx
2626
env: CMAKE_BUILD_TYPE=Coverage
2727
before_install:
2828
- brew update > /dev/null
29-
- brew install gcc > /dev/null
29+
- brew upgrade gcc > /dev/null
3030

3131
script:
3232
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST

BLAS/SRC/cgemm.f

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
215215
* ..
216216
* .. Local Scalars ..
217217
COMPLEX TEMP
218-
INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
218+
INTEGER I,INFO,J,L,NROWA,NROWB
219219
LOGICAL CONJA,CONJB,NOTA,NOTB
220220
* ..
221221
* .. Parameters ..
@@ -228,19 +228,16 @@ SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
228228
* Set NOTA and NOTB as true if A and B respectively are not
229229
* conjugated or transposed, set CONJA and CONJB as true if A and
230230
* B respectively are to be transposed but not conjugated and set
231-
* NROWA, NCOLA and NROWB as the number of rows and columns of A
232-
* and the number of rows of B respectively.
231+
* NROWA and NROWB as the number of rows of A and B respectively.
233232
*
234233
NOTA = LSAME(TRANSA,'N')
235234
NOTB = LSAME(TRANSB,'N')
236235
CONJA = LSAME(TRANSA,'C')
237236
CONJB = LSAME(TRANSB,'C')
238237
IF (NOTA) THEN
239238
NROWA = M
240-
NCOLA = K
241239
ELSE
242240
NROWA = K
243-
NCOLA = M
244241
END IF
245242
IF (NOTB) THEN
246243
NROWB = K

BLAS/SRC/crotg.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Arguments:
2828
* ==========
2929
*
30-
*> \param[in] CA
30+
*> \param[in,out] CA
3131
*> \verbatim
3232
*> CA is COMPLEX
3333
*> \endverbatim

BLAS/SRC/dgemm.f

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
215215
* ..
216216
* .. Local Scalars ..
217217
DOUBLE PRECISION TEMP
218-
INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
218+
INTEGER I,INFO,J,L,NROWA,NROWB
219219
LOGICAL NOTA,NOTB
220220
* ..
221221
* .. Parameters ..
@@ -224,17 +224,15 @@ SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
224224
* ..
225225
*
226226
* Set NOTA and NOTB as true if A and B respectively are not
227-
* transposed and set NROWA, NCOLA and NROWB as the number of rows
228-
* and columns of A and the number of rows of B respectively.
227+
* transposed and set NROWA and NROWB as the number of rows of A
228+
* and B respectively.
229229
*
230230
NOTA = LSAME(TRANSA,'N')
231231
NOTB = LSAME(TRANSB,'N')
232232
IF (NOTA) THEN
233233
NROWA = M
234-
NCOLA = K
235234
ELSE
236235
NROWA = K
237-
NCOLA = M
238236
END IF
239237
IF (NOTB) THEN
240238
NROWB = K

BLAS/SRC/drotg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
* Arguments:
2727
* ==========
2828
*
29-
*> \param[in] DA
29+
*> \param[in,out] DA
3030
*> \verbatim
3131
*> DA is DOUBLE PRECISION
3232
*> \endverbatim
3333
*>
34-
*> \param[in] DB
34+
*> \param[in,out] DB
3535
*> \verbatim
3636
*> DB is DOUBLE PRECISION
3737
*> \endverbatim
@@ -86,15 +86,15 @@ SUBROUTINE DROTG(DA,DB,C,S)
8686
* .. Intrinsic Functions ..
8787
INTRINSIC DABS,DSIGN,DSQRT
8888
* ..
89-
ROE = DB
90-
IF (DABS(DA).GT.DABS(DB)) ROE = DA
9189
SCALE = DABS(DA) + DABS(DB)
9290
IF (SCALE.EQ.0.0d0) THEN
9391
C = 1.0d0
9492
S = 0.0d0
9593
R = 0.0d0
9694
Z = 0.0d0
9795
ELSE
96+
ROE = DB
97+
IF (DABS(DA).GT.DABS(DB)) ROE = DA
9898
R = SCALE*DSQRT((DA/SCALE)**2+ (DB/SCALE)**2)
9999
R = DSIGN(1.0d0,ROE)*R
100100
C = DA/R

BLAS/SRC/drotmg.f

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
152152
DD1 = DD1/DU
153153
DD2 = DD2/DU
154154
DX1 = DX1*DU
155+
ELSE
156+
* This code path if here for safety. We do not expect this
157+
* condition to ever hold except in edge cases with rounding
158+
* errors. See DOI: 10.1145/355841.355847
159+
DFLAG = -ONE
160+
DH11 = ZERO
161+
DH12 = ZERO
162+
DH21 = ZERO
163+
DH22 = ZERO
164+
*
165+
DD1 = ZERO
166+
DD2 = ZERO
167+
DX1 = ZERO
155168
END IF
156169
ELSE
157170

BLAS/SRC/dzasum.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*> \verbatim
2525
*>
2626
*> DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
27-
*> returns a single precision result.
27+
*> returns a double precision result.
2828
*> \endverbatim
2929
*
3030
* Arguments:

BLAS/SRC/sgemm.f

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
215215
* ..
216216
* .. Local Scalars ..
217217
REAL TEMP
218-
INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
218+
INTEGER I,INFO,J,L,NROWA,NROWB
219219
LOGICAL NOTA,NOTB
220220
* ..
221221
* .. Parameters ..
@@ -224,17 +224,15 @@ SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
224224
* ..
225225
*
226226
* Set NOTA and NOTB as true if A and B respectively are not
227-
* transposed and set NROWA, NCOLA and NROWB as the number of rows
228-
* and columns of A and the number of rows of B respectively.
227+
* transposed and set NROWA and NROWB as the number of rows of A
228+
* and B respectively.
229229
*
230230
NOTA = LSAME(TRANSA,'N')
231231
NOTB = LSAME(TRANSB,'N')
232232
IF (NOTA) THEN
233233
NROWA = M
234-
NCOLA = K
235234
ELSE
236235
NROWA = K
237-
NCOLA = M
238236
END IF
239237
IF (NOTB) THEN
240238
NROWB = K

BLAS/SRC/srotg.f

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
* Arguments:
2727
* ==========
2828
*
29-
*> \param[in] SA
29+
*> \param[in,out] SA
3030
*> \verbatim
3131
*> SA is REAL
3232
*> \endverbatim
3333
*>
34-
*> \param[in] SB
34+
*> \param[in,out] SB
3535
*> \verbatim
3636
*> SB is REAL
3737
*> \endverbatim
@@ -86,15 +86,15 @@ SUBROUTINE SROTG(SA,SB,C,S)
8686
* .. Intrinsic Functions ..
8787
INTRINSIC ABS,SIGN,SQRT
8888
* ..
89-
ROE = SB
90-
IF (ABS(SA).GT.ABS(SB)) ROE = SA
9189
SCALE = ABS(SA) + ABS(SB)
9290
IF (SCALE.EQ.0.0) THEN
9391
C = 1.0
9492
S = 0.0
9593
R = 0.0
9694
Z = 0.0
9795
ELSE
96+
ROE = SB
97+
IF (ABS(SA).GT.ABS(SB)) ROE = SA
9898
R = SCALE*SQRT((SA/SCALE)**2+ (SB/SCALE)**2)
9999
R = SIGN(1.0,ROE)*R
100100
C = SA/R

BLAS/SRC/srotmg.f

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
152152
SD1 = SD1/SU
153153
SD2 = SD2/SU
154154
SX1 = SX1*SU
155+
ELSE
156+
* This code path if here for safety. We do not expect this
157+
* condition to ever hold except in edge cases with rounding
158+
* errors. See DOI: 10.1145/355841.355847
159+
SFLAG = -ONE
160+
SH11 = ZERO
161+
SH12 = ZERO
162+
SH21 = ZERO
163+
SH22 = ZERO
164+
*
165+
SD1 = ZERO
166+
SD2 = ZERO
167+
SX1 = ZERO
155168
END IF
156169
ELSE
157170

0 commit comments

Comments
 (0)