From 4052662780793819674
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,94e9c2bbb0060b48
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-07-22 18:33:03 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Walter Landry <wlandry@ucsd.edu>
Newsgroups: comp.std.c++
Subject: Re: Proposals for small vectors?
Date: Tue, 23 Jul 2002 01:32:23 GMT
Organization: Univ of Calif San Diego
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <877kjnpg3p.fsf@grue.ucsd.edu>
References: <87wurryywb.fsf@grue.ucsd.edu> <3D38FB4F.1020909@animats.com>
X-Trace: mail2news.demon.co.uk 1027387948 mail2news:2371 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Date: Mon, 22 Jul 2002 22:13:00 +0000 (UTC)
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
X-MailScanner: Passed
Lines: 46
Xref: archiver1.google.com comp.std.c++:12780

John Nagle <nagle@animats.com> writes:

>     Someone suggested I propose it to Boost, and someone else
> suggested a more complicated template-based approach.
> But I haven't followed up.  All I was proposing was the library
> from Graphics Gems, cleaned up a bit.

Well, I've implemented a template-based approach.  I'm trying to find
out if it has applicability beyond what I wrote it for.  I think it
covers what you want, but I could be wrong.

>     My main concern is that 2D, 3D, and 4D vectors and matrices be
> efficiently
> supported in C++ in a standard way.  All 3D graphics programs pass
> such objects around with great enthusiasm, and several different
> formats are in use.  Interconversion of these objects is an
> ongoing hassle.  C arrays are usually used because they're
> standard, but of course you don't get any operators on them.
> 
>     Does anybody in the graphics community want to push
> this forward?

What kind of thing does the graphics community want?  Do you usually
have a lot of small, simple equations?  How would you ideally like
them to appear as code?  Is making the vectors and matrices as small
as possible important?  Do you always know the size of the vectors and
matrices at compile time?  Is it important to be able to dynamically
resize them?  How much of a performance penalty are you willing to
pay?  Does your tolerance of a penalty go up if there is still a way
to get around it (i.e. you can use C-style notation, and it is just as
fast as C arrays)?

It would be useful if you could post some representative code.  Then
we could see how the various projects (algebra3, uBlas, Blitz, and
FTensor) handle it.

Thanks,
Walter Landry
wlandry@ucsd.edu

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



