|
Boost : |
Subject: Re: [boost] [gsoc] Proposal - Boost.Matrix - DRAFT RFC
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-03-31 22:29:06
On Tue, Mar 31, 2009 at 6:17 PM, Kornel Kisielewicz
<kornel.kisielewicz_at_[hidden]> wrote:
> template<typename T, std::size_t N, std::size_t M, class Traits> matrix
I'd suggest using Rows and Cols as arguments of the template instead of M and N.
> In cases that make heavy use of fixed sized matrices and vectors (
> like real-time computer graphics ), such a tradeoff is unacceptable --
> due to increased memory consumption as well as effective vectorized
> math operations, and alignment of structures passed ( a single 4D
> vector should effectively fit a 128 bit register, and a single 128 bit
> move operation ).
IMO the abstraction provided by a template <typename T,size_t
Rows,size_t Cols> class matrix is unnecessary and will only get in the
way for computer graphics applications. I've seen several attempts
like this at generalizing matrices for game engine use getting
scrapped and refactored to a more traditional set of types (not
templates) and functions (this doesn't mean that such generalizations
are not appropriate in general.)
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk