← Back to team overview

dolfin team mailing list archive

Re: GenericTensor and shared_ptr

 

B1;2600;0cOn Thu, Jan 20, 2011 at 09:56:39AM -0800, Johan Hake wrote:
> It turns out that SWIG has introduced a regression wrt shared ptr handling in
> its 2.0.0 release. The bug causes things like GenericMatrix.data() to not
> work, as it expects a GenericMatrix but gets a subclass. So basically the swig
> handled upcast algorithm is screwed. See buildbots for error message...
>
> I have to file a bug for this and try to fix it upstream. Possible solutions
> are:
>
>   1) Force people to downgrade SWIG to 1.3.40 until a fix excist
>   2) Remove shared_ptr handling of GenericTensors until fix excist
>   3) Trye to hack a fix fox this for the moment (I tried once and it did not
>      work...)
>
> I reluctantly vote for 2.

I vote for (2) too.

(1) sounds problematic and if you didn't manage to do (3), there's
little chance someone else will. :-)

--
Anders


> Johan
>
>
> On Wednesday January 19 2011 12:16:13 Johan Hake wrote:
> > Hello!
> >
> > GenericTensors and its derived classes are now stored using shared_ptr.
> > SWIG provides dereference typemaps to all reference and value calls.
> >
> > It should now be straight forward to add shared_ptr functions in the C++
> > interface, like the one Garth implemented for BlockFoo.
> >
> > If the interface is extended with shared_ptr version of a method, remember
> > to %ignore the reference version (if excisting).
> >
> > Johan
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dolfin
> > Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dolfin
> > More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References