[Rd] constness in BLAS.h/dger arguments

Daniel Sabanés Bové daniel.sabanesbove at ifspm.uzh.ch
Fri Sep 3 14:40:52 CEST 2010


Hi,

I am writing code interfacing R's BLAS functions, and have a problem
with two missing const's in the header of F77_NAME(dger) in
src/include/R_ext/BLAS.h. The current definition is missing the
appropriate consts for the arrays x and y, which are stated in the BLAS
documentation [2] to be "unchanged on exit". This issue was already
mentioned on the list in March 2009 [1], however without any (public)
answer from R-core.

I have tested the attached patch for this issue in the latest R-patched
version and the current release version, and did not encounter any
problem during compilation. Since conversion from double* to const
double* in a function call is not a problem, I do not think that any
external packages could get problems when BLAS.h would be changed in
this way.

It would be great if this change could make it into the next release
version of R.

Thanks in advance,
Daniel


[1] https://stat.ethz.ch/pipermail/r-devel/2009-March/052535.html
[2] http://www.netlib.org/lapack/explore-html/a00044_source.html



-------------- next part --------------
A non-text attachment was scrubbed...
Name: BLAS.h.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20100903/80b63add/attachment.bin>


More information about the R-devel mailing list