Re: limit
Leandro Franco Londoño <[email protected]>
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you Janusz, your suggestion was really appreciated. I converted the matrices type to compressed and I fixed some problems (the unsigned long int index helped a lot), now I have some problems because the rows and columns methods don't work with these matices but I will figure out how to solve them later. Well, I'm writing again because I found another funny problem. This time I get a "Not enough work space, increase capacity of C.", I found a similar question in the mail archives where someone suggested "to allocate enough storage to C to contain the result of the multiplication". I think I get the idea.. you need to tell the matrix how big it is going to be after the multiplication, but if both matrices are sparse and you don't know their sizes what should you do? should you allocate enough space for a full matrix, or could you do it dynamically ? Finally, ( I know I'm really boring but... ) could someone give me some hints about the space allocation for the compressed matrices? Thank you very much. Leandro Franco Londoño Ing. de Sistemas y Computación Universidad de los Andes Bogota Colombia Selon Janusz opechowski <[email protected]>: > Hello! > > So probably it will be a sparse matrix > (having zeroes in much more than a half of all > positions) , > like this : > > typedef matrix<double, > rectangle<>, > compressed<int, external, > index_from_one>, > row_major>::type MatA; > > but here instead of "int" you should take > as a index type something "safer" i.e. > "unsigned long int", because > on some architectures > int is 16 bit only so : around + - 32000 > and you need 20 bits one way so 32 bits > would be enough. > > If those matrices are not sparse ... , > (10^6)^2 = 10^12, > so .. terabyte matrices ? > Congratulations! > > Probably : > typedef matrix<double>::type MatA, > will be sutable if no > try to play with arrays : > > typedef matrix< double, > rectangle<>, > array< dense<> >, > row_major>::type MatA; > > Cheers > Janusz > > > > > > > > > > > --- Leandro Franco Londoño <[email protected]> > wrote: > Hello there, > > > > In the first place I would like to thank you guys > > for developing MTL, > > it was nice to find just exactly what I was looking > > for. > > > > Well... here is my question : I'am using matrices of > > type complex<double> > > for some calculations (a quantum computing > > simulator) but these matrices are > > really big (from 2^10 to 2^20 ) and I having some > > problems in the > > implementation. > > > > I would like to know how I should work with that > > type of matrices (that is a > > little bit general so all kind of ideas are welcome) > > and it will be specially > > usefull if someone could tell me what are the limits > > in the sizes using MTL > > ( can I do something like Matrix(2^32,2^32) ? ). > > > > > > Thank you very much for your help > > > > > > > > Leandro Franco Londoño > > Ing. de Sistemas y Computación > > Universidad de los Andes > > Bogota > > Colombia > > > > _______________________________________________ > > This list is archived at > http://www.osl.iu.edu/MailArchives/mtl-devel/ > > ________________________________________________________________________ > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://mail.messenger.yahoo.co.uk > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ > _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/