cython_blas does not use const in signatures
See original GitHub issueUsually, BLAS interfaces for C use function signatures with const qualifiers - examples:
void F77_daxpy( FINT, const double *, const double *, FINT, double *, FINT);
F77_NAME(daxpy)(const int *n, const double *da,
const double *dx, const int *incx,
double *dy, const int *incy);
However, the Cython pxd
file for cython_blas
generates the function signatures without const
qualifier:
cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) nogil
Which makes it harder to wrap into existing programs if they are using const
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:16 (16 by maintainers)
Top Results From Across the Web
c++ - Top-level const doesn't influence a function signature
When values are accepted by value they go out of scope as the function returns, so there's no valid scenario involving returning a...
Read more >`const` all the things? – Arthur O'Dwyer
TLDR: I'm not putting const on all the things, either. ... This signature is saying “Please give me references to two of your...
Read more >const - JavaScript - MDN Web Docs - Mozilla
The const declaration creates block-scoped constants, much like variables declared using the let keyword. The value of a constant can't be ...
Read more >Python Constants: Improve Your Code's Maintainability
In practice, Python constants are just variables that never change. ... You'll use constants to represent values that won't change.
Read more >Here's why the const keyword in Java is not implemented
Why is the const keyword in Java not implemented? It's part of the language, but it can't be used to make a variable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://www.damnyouautocorrect.com I know we have a pandemic and all, but impunity is not immunity…
It should be ok. The compiler will cast
T *
toconst T *
but not the other way around. It is the absence ofconst
that cause the problems (i.e. requiring an explicitconst_cast
ofconst T *
toT *
when calling BLAS). Addingconst
qualifier to the prototypes can be done with impunity. It will only help to solve problems. It should not cause any backwards compatibility issues. In my opinion such a PR would be welcome.