LAPACK with more pure procedures

I forked fortran-lapack of @FedericoPerini to make more procedures pure, listed here, so that more of the procedures in my translations of R packages could be designated pure. The purity analysis and refactoring was done by GPT-5.6 Sol.

3 Likes

What change did you make? Why not submitting a PR?

2 Likes

The changes are listed in a link I provided. I thought there were so many that a PR was unlikely to be accepted as is.

Ask @FedericoPerini how to best integrate your work back.

Except for the error routine, xerbla(), which prints some output, aren’t all of the BLAS and LAPACK routines effectively pure?

1 Like

In my version of LAPACK, about 10% of procedures are not, listed here.

1 Like

I don’t know the details of BLAS/LAPACK very much, but isn’t it potentially risky to set “pure” if some of LAPACK routines ultimately call external threaded BLAS routines…?

1 Like

Looks like you turned some functions into subroutines, right?

Existing impure functions have been retained for compatibility, but pure alternatives have been created, listed here.

I saw that, but what I meant is that in some cases you had apparently to turn some functions into subroutines?