freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] [PATCH] AltComponentView


From: Richard Guenther
Subject: Re: [pooma-dev] [PATCH] AltComponentView
Date: Tue, 23 Mar 2004 12:11:35 +0100 (CET)

On Tue, 23 Mar 2004, Richard Guenther wrote:

> Hi!
>
> Forgot that last time.

> @@ -2014,46 +1946,46 @@
>    /// ultimately work, Element_t must have a working const operator()(Loc<M>)
>    /// that returns a reference or proxy to the component.
>    //@{
> -  inline typename AltComponentView<Loc<1>, This_t>::Type_t
> +  inline typename ComponentView<Loc<1>, This_t>::Type_t
>    comp(const int &i1) const
>      {
>        return ComponentView<Loc<1>, This_t>::make(*this, Loc<1>(i1));
>      }

I'll take that back - causes "interesting" failures of array_test22:

/home/rguenth/src/pooma-bk/r2/src/Array/Array.h(1951): error: class
"ComponentView<Loc<1>, Array<1, Vector<2, double, Full>, Brick>>" has no
member "Type_t"
    inline typename ComponentView<Loc<1>, This_t>::Type_t
                                                   ^
          detected during:
            instantiation of class "Array<Dim, T, EngineTag> [with Dim=1,
T=Vector<2, double, Full>, EngineTag=Brick]" at line 1307
            instantiation of class "ComponentView<Components, Array<D2,
T2, E2>> [with Components=Loc<1>, Dim=1, T=Vector<2, double, Full>,
EngineTag=Brick]" at line 54 of
"/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Array/tests/array_test22.cpp"

where array_test22 just does:

    typedef Array<1, Vector<2, double>, Brick> Array_t;
54  typedef ComponentView<Loc<1>, Array_t>::Type_t CView_t;
    Array_t b(dom);
    CView_t d(b.comp(1));

The intel compiler seems to rewrite the template names
(ComponentView<Components, Array<D2, T2, E2>>), but I'm curious
which ComponentView gets instantiated, as the overload in Array.h should
work.  gcc just says

/home/rguenth/src/pooma-bk/r2/src/Array/Array.h: In instantiation of
`Array<1, Vector<2, double, Full>, Brick>':
/home/rguenth/src/pooma-bk/r2/src/Array/Array.h:1307:   instantiated from
`ComponentView<Loc<1>, main(int, char**)::Array_t>'
/net/bellatrix/home/rguenth/src/pooma-bk/r2/src/Array/tests/array_test22.cpp:54:
instantiated from here
/home/rguenth/src/pooma-bk/r2/src/Array/Array.h:1953: error: no type named
`Type_t' in `struct ComponentView<Loc<1>, main(int, char**)::Array_t>'

which is equally un-helpful.

Also, in Array.h:1290, the integer overload of ComponentView seems to have
only potential negative effect, but disabling it doesn't fix the above
problem (nor does it introduce new problems).

Any suggestions?

Thanks,

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]