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

This commit is contained in:
Martin Kroeker 2024-08-05 16:45:05 +02:00 committed by GitHub
parent 14a8a9a43c
commit c8b4ceca85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

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 )

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 )