[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freepooma-devel] Array::first(int)
From: |
Richard Guenther |
Subject: |
Re: [Freepooma-devel] Array::first(int) |
Date: |
Thu, 7 Apr 2005 10:20:50 +0200 (CEST) |
On Thu, 7 Apr 2005, ron hylton wrote:
> Array contains a first(int) function that calls engine_m.first(int).
> However first(int) has been eliminated from BrickBase in FreePooma, although
> it still seems to be in BrickViewBase and all the other engines.
>
> It's not immediately clear to me whether the correct fix is to put a
> first(int) back in BrickBase (passing it allong to the domain()) or to
> change Array to always go straight to the domain() and bypass first(int) in
> all the other engines.
>
> Does anyone know why the engines have first(int)?
I guess someone found it a good idea ;) The thing was to remove the
redundant firsts_m[Dim] member of BrickBase and just use domain[].first()
instead. If first(int) different from Array.domain()[int].first()
should be supported first(int) can be easily put back to BrickBase -
otherwise putting the shortcut in Array would be better. In fact, the
testsuite does not excercise first().
Of course, the documentation of Array::first says
/// @name Short-circuit functions that return information from domain.
//@{
inline int first(int d) const
so that suggests it really could be domain()[d].first().
I'll put back first() to BrickBase for r2_branch and figure out what
to do on head.
Thanks,
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/