Browse Source

prevent compilers from using FMA (Reference-LAPACK PR 1033)

tags/v0.3.28^2
Martin Kroeker GitHub 1 year ago
parent
commit
c8b4ceca85
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions
  1. +8
    -4
      lapack-netlib/SRC/dlanv2.f
  2. +8
    -4
      lapack-netlib/SRC/slanv2.f

+ 8
- 4
lapack-netlib/SRC/dlanv2.f View File

@@ -109,7 +109,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup doubleOTHERauxiliary
*> \ingroup lanv2
*
*> \par Further Details:
* =====================
@@ -144,7 +144,7 @@
* ..
* .. Local Scalars ..
DOUBLE PRECISION AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB,
$ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN,
$ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN,
$ SAFMN2, SAFMX2
INTEGER COUNT
* ..
@@ -248,10 +248,14 @@
*
* Compute [ A B ] = [ CS SN ] [ AA BB ]
* [ C D ] [-SN CS ] [ CC DD ]
*
* Note: Some of the multiplications are wrapped in parentheses to
* prevent compilers from using FMA instructions. See
* https://github.com/Reference-LAPACK/lapack/issues/1031.
*
A = AA*CS + CC*SN
B = BB*CS + DD*SN
C = -AA*SN + CC*CS
B = ( BB*CS ) + ( DD*SN )
C = -( AA*SN ) + ( CC*CS )
D = -BB*SN + DD*CS
*
TEMP = HALF*( A+D )


+ 8
- 4
lapack-netlib/SRC/slanv2.f View File

@@ -109,7 +109,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup realOTHERauxiliary
*> \ingroup lanv2
*
*> \par Further Details:
* =====================
@@ -144,7 +144,7 @@
* ..
* .. Local Scalars ..
REAL AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB,
$ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN,
$ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z, SAFMIN,
$ SAFMN2, SAFMX2
INTEGER COUNT
* ..
@@ -248,10 +248,14 @@
*
* Compute [ A B ] = [ CS SN ] [ AA BB ]
* [ C D ] [-SN CS ] [ CC DD ]
*
* Note: Some of the multiplications are wrapped in parentheses to
* prevent compilers from using FMA instructions. See
* https://github.com/Reference-LAPACK/lapack/issues/1031.
*
A = AA*CS + CC*SN
B = BB*CS + DD*SN
C = -AA*SN + CC*CS
B = ( BB*CS ) + ( DD*SN )
C = -( AA*SN ) + ( CC*CS )
D = -BB*SN + DD*CS
*
TEMP = HALF*( A+D )


Loading…
Cancel
Save