2

Is there any C++ matrix library for large matrices(matrices that can't fit in RAM)?

Or maybe some library that is designed to handle with large matrices and more faster relative to basic matrix libraries?

I think Windows can handle such matrices by using swap file, but maybe there is optimized algorithms for this?

I found ScaLAPACK but not sure it's the best choice.

mrgloom
  • 15,245
  • 23
  • 126
  • 226
  • are you taking about a single matrix not fitting in ram? – tay10r Apr 19 '13 at 06:54
  • How big can it grow? What is the upper bound? – Arun Apr 19 '13 at 06:57
  • if it can fit in ram, you would be talking about more than a billion units ( 8gb ). if it were otherwise a smaller large matrix, have you heard about cuda? you can always save matrices on disk manually – tay10r Apr 19 '13 at 06:58
  • I don't know about the size of matrix, but for example I have 8Gb of RAM and using matlab I get out of memory(if I use swap file it takes too long), also I want my program can work on 2Gb RAM machine also. For example I need such operation as calculate SVD. – mrgloom Apr 19 '13 at 07:18
  • 1
    Also I heard about CUDA but GPU have even smaller amout of memory about 1 Gb. – mrgloom Apr 19 '13 at 07:21

1 Answers1

1

You may use block matrix multiplication and inversion in order to reduce swapping.

If your matrices are sparse (i.e. they have a lot of elements that are zero), you can save memory by using a special storage approach.

Javier
  • 10,845
  • 4
  • 41
  • 52
  • 1
    In particular, [eigen](http://eigen.tuxfamily.org/dox/TutorialSparse.html) library has some features to work with sparse matrices. – Eugene B Apr 19 '13 at 16:31