Re: Contiguous allocation of multi-dimensional vector
On Aug 14, 1:08 pm, terminator <farid.mehr...@gmail.com> wrote:
if your compiler is elegant in recursive templates you can:
[crafty recursive template removed]
Quite clever. Probably a bit of overkill for any matrix problem I
have had, but still quite clever. Seriously though, unless I were
developing a library that supported such things, I would probably
still opt for individual implementations/specializations for the
problem set I actually had rather than a recursive template solution.
In other words, unless I were developing the code to be a matrix
library that could handle any dimension matrix, I personally, would
rather have the two or three specializations for matrixes that I
actually need, rather than a recursive template that handles every
possible kind of matrix. The reason is two fold. 1) Debugger
technology available to me makes debugging recursive template code
much more difficult than straight forward template code (although that
can be a challenge too at times). 2) Current optimizer technology
hasn't performed the wonders for me that sophisticated template
programmers posit that it should be able to perform. That is, the
code actually generated isn't as good as far as I can tell. Your
mileage may vary, but I am a simple person who prefers simple
solutions when having a general solution isn't required for the
problem I have. That is not to say that I wouldn't use a third party
library that provided such matrixes, just that I wouldn't go that
route myself unless I were developing such a library. :)
joe