|
From: | Rafael Spring |
Subject: | Re: [Toon-members] Efficient (dynamic) slicing |
Date: | Fri, 26 Feb 2010 11:46:00 -0800 |
Ok, so the real situation is that fillSubMatrix() is virtual (sorry, should have mentioned that in my first mail). That would probably require to be explicit about the template parameters, right? Can I now assume that the proposed pattern would not result in temp. matrix data being allocated from the heap? Or is there a better practice than this?
I am also a little confused by the Matrix documentation. For the slice() method there is an example:Matrix<> m(3,3); // Extract the top-left 2x2 matrix Matrix<2> b = m.slice(0,0,2,2);Is Matrix b now a copy of m's top left 2x2 or is b just referencing this data? Would then the following be a reference?Matrix<Dynamic, Dynamic, double, TooN::Internal::Slice<-1,1> > b = m.slice(0,0,2,2);
Please ignore the questions. The debugger just gave me all the answers.However, for the next beta of TooN, I'd love to have a small memory manager in the background to redirect the temp. allocations.
Rafael
-Ed --(You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/ ~er258)/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1 r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12 d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage_______________________________________________ Toon-members mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/toon-members
[Prev in Thread] | Current Thread | [Next in Thread] |