Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Const correctness

$
0
0

Hello,

Is there a reason the parameters of mkl_sparse_?_create_[b|c]sr are of type C_INT or C_[FLOAT|DOUBLE|FLOAT_COMPLEX|DOUBLE_COMPLEX] instead of const C_INT const or const C_[FLOAT|DOUBLE|FLOAT_COMPLEX|DOUBLE_COMPLEX] const? Do you modify the pointers or the values provided by the user? I currently need to use ugly const_cast because my pointers are of type const T* const. E.g.,

            mkl_sparse_d_create_bsr(&bsr, SPARSE_INDEX_BASE_ONE, SPARSE_LAYOUT_COLUMN_MAJOR, *m, *k, *bs, const_cast<int*>(ia), const_cast<int*>(ia + 1), const_cast<int*>(ja), const_cast<double*>(a));

Any chance this could get fixed?

Thanks.


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>