Skip to content
Snippets Groups Projects
Commit f12ed5cc authored by Tom Fischer's avatar Tom Fischer Committed by Dmitri Naumov
Browse files

[MaL] Binary output of CRS matrix: respect the const.

parent 4e90a8c1
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ template<class T> void CS_write(std::ostream &os, unsigned n, unsigned const* iA ...@@ -26,7 +26,7 @@ template<class T> void CS_write(std::ostream &os, unsigned n, unsigned const* iA
os.write(reinterpret_cast<char*>(&n), sizeof(unsigned)); os.write(reinterpret_cast<char*>(&n), sizeof(unsigned));
os.write(reinterpret_cast<char*>(const_cast<unsigned*>(iA)), (n + 1) * sizeof(unsigned)); os.write(reinterpret_cast<char*>(const_cast<unsigned*>(iA)), (n + 1) * sizeof(unsigned));
os.write(reinterpret_cast<char*>(const_cast<unsigned*>(jA)), iA[n] * sizeof(unsigned)); os.write(reinterpret_cast<char*>(const_cast<unsigned*>(jA)), iA[n] * sizeof(unsigned));
os.write(reinterpret_cast<char*>(A), iA[n] * sizeof(T)); os.write(reinterpret_cast<char const*>(A), iA[n] * sizeof(T));
} }
template<class T> void CS_read(std::istream &is, unsigned &n, unsigned* &iA, unsigned* &jA, T* &A) template<class T> void CS_read(std::istream &is, unsigned &n, unsigned* &iA, unsigned* &jA, T* &A)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment