Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix poorly formated documentation #21

Open
IvanUkhov opened this issue Nov 20, 2016 · 0 comments
Open

Fix poorly formated documentation #21

IvanUkhov opened this issue Nov 20, 2016 · 0 comments

Comments

@IvanUkhov
Copy link
Member

IvanUkhov commented Nov 20, 2016

The following functions are poorly formated due to the poor formatting in the original code:

  • dsdot,
  • srotmg,
  • srotm,
  • drotmg, and
  • drotm.

The documentation script should be adjusted in order to account for those cases.

MartyIX added a commit to MartyIX/blas that referenced this issue Feb 1, 2017
Hopefully fixes/improves blas-lapack-rs#21 issue.

I have used the following repo: https://github.com/Reference-LAPACK/lapack as the data source, I'm not sure if it is a correct one though. However, it should be documented somewhere. :-)

I ran:

```
python3 c.py ../.data/lapack-master >new.result
```

and I got the following diff:

```
27,29c27,30
< /// Returns D.P. Dot product accumulated in D.P., for S.P. SX and SY DSDOT = sum
< /// for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), where LX = 1 if INCX .GE.
< /// 0, else LX = 1+(1-N)*INCX, and LY is defined in a similar way using INCY.
---
> /// Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
> /// DSDOT = sum for I = 0 to N-1 of  SX(LX+I*INCX) * SY(LY+I*INCY),
> /// where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
> /// defined in a similar way using INCY.
312,321c313,324
< /// CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE SECOND
< /// COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*> SY2)**T. WITH
< /// SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
< ///
< /// SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
< ///
< ///  (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0) H=() () () () (SH21 SH22),
< /// (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0). LOCATIONS 2-4 OF SPARAM CONTAIN
< /// SH11,SH21,SH12, AND SH22 RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0
< /// IMPLIED BY THE VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
---
> /// CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
> /// THE SECOND COMPONENT OF THE 2-VECTOR  (SQRT(SD1)*SX1,SQRT(SD2)*>    SY2)**T.
> /// WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
> ///
> /// SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0
> ///
> ///   (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0)
> /// H=(          )    (          )    (          )    (          )
> ///   (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0).
> /// LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
> /// RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
> /// VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
345,353c348,357
< /// SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE LX =
< /// (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY. WITH
< /// SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
< ///
< /// SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
< ///
< ///  (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0) H=() () () () (SH21 SH22),
< /// (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0). SEE SROTMG FOR A DESCRIPTION OF DATA
< /// STORAGE IN SPARAM.
---
> /// SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
> /// LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
> /// WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
> ///
> /// SFLAG=-1.E0     SFLAG=0.E0        SFLAG=1.E0     SFLAG=-2.E0
> ///
> ///   (SH11  SH12)    (1.E0  SH12)    (SH11  1.E0)    (1.E0  0.E0)
> /// H=(          )    (          )    (          )    (          )
> ///   (SH21  SH22),   (SH21  1.E0),   (-1.E0 SH22),   (0.E0  1.E0).
> /// SEE  SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
369,378c373,384
< /// CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE SECOND
< /// COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*> DY2)**T. WITH
< /// DPARAM(1)=DFLAG, 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) H=() () () () (DH21 DH22),
< /// (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). LOCATIONS 2-4 OF DPARAM CONTAIN
< /// DH11, DH21, DH12, AND DH22 RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0
< /// IMPLIED BY THE VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
---
> /// CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
> /// THE SECOND COMPONENT OF THE 2-VECTOR  (DSQRT(DD1)*DX1,DSQRT(DD2)*>    DY2)**T.
> /// WITH DPARAM(1)=DFLAG, 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)
> /// H=(          )    (          )    (          )    (          )
> ///   (DH21  DH22),   (DH21  1.D0),   (-1.D0 DH22),   (0.D0  1.D0).
> /// LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
> /// RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
> /// VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
402,410c408,417
< /// DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE LX =
< /// (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY. WITH DPARAM(1)=DFLAG, 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) H=() () () () (DH21 DH22),
< /// (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). SEE DROTMG FOR A DESCRIPTION OF DATA
< /// STORAGE IN DPARAM.
---
> /// DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
> /// LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY.
> /// WITH DPARAM(1)=DFLAG, 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)
> /// H=(          )    (          )    (          )    (          )
> ///   (DH21  DH22),   (DH21  1.D0),   (-1.D0 DH22),   (0.D0  1.D0).
> /// SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant