- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to put in a feature request for MKL:
Currently, the c interface of mkl does not provide for const pointers. It only does for pointers to const ( i.e. double const * and not double const * const ) - the latter meaning that the pointer itself is not changing as well and not only what it points to (through it, to be exact).
This results in a lot of const (un)casting when one tries to write wrapper classes, since any sensible c++ programmer would provide with 2 versions of the (example, schematically) container data:
double * data() { return ptr_ ; }
double const * const data() const { return ptr_ ;}
This creates a logical havoc when writing lapack/blas wrappers. Would you please consider correcting it ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks Petros, we will consider this request into one of the next releases of Intel MKL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petros,
Could you give a more detailed example which demonstrates the problem? Many C interfaces accept pointers by value, and function is allowed to change these parameters because the change will not affect corresponding arguments. If a function has a 'const T' parameter of a non-reference type T, then const qualifier is disregarded in many respects. For example, one cannot overload a function with a parameter of non-reference type T by making the parameter 'const T'.
Thanks
Dima
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page