lucasmaystre / svdlibc

A fork of Doug Rohde's SVD C Library.
http://tedlab.mit.edu/~dr/SVDLIBC/
48 stars 19 forks source link

Small change to make svdlibc work with larger matrices on highmem machines #1

Open bharathkrishnan opened 12 years ago

bharathkrishnan commented 12 years ago

Make sure that we can allocate DMat or SMat if their size is larger than max integer provided we have enough memory.

Without this change, memory allocation fails for Ut of size > 16G even if we have more than 16G of RAM.

Alternate fix would be to cast rows*cols to long inside the calloc call.