On Wed, Sep 21, 2011 at 04:54:29PM -0000, Garth Wells wrote:
> On 21 September 2011 17:40, Johan Hake <email address hidden> wrote:
> > On Wednesday September 21 2011 09:00:16 Garth Wells wrote:
> >> We should look at this - it will allow the removal of some ugly copies
> >> in DOLFIN.
> >
> > Agree, but at the moment are boost::multi_arrays not so pleasent for the SWIG
> > interface. Copying is enforced. Not sure this is a big deal for such a low
> > lever functionality, but it is sad that it should be needed, if the underlying
> > structure is just a c-array, which numpy wraps just fine.
> >
>
> I think that if this type of data is used intensively at the Python
> level, then there will be bigger performance issues to worry about
> than data copying.
>
> The multi_array interface is somewhat secondary - the important point
> is flattening the double pointer in the UFC interface.
We should avoid using any other data structures than plain C arrays in
the UFC interface.
Or we should use STL data structures (or boost) throughout UFC, but
that sounds more like UFC >= 3.0.
On Wed, Sep 21, 2011 at 04:54:29PM -0000, Garth Wells wrote:
> On 21 September 2011 17:40, Johan Hake <email address hidden> wrote:
> > On Wednesday September 21 2011 09:00:16 Garth Wells wrote:
> >> We should look at this - it will allow the removal of some ugly copies
> >> in DOLFIN.
> >
> > Agree, but at the moment are boost::multi_arrays not so pleasent for the SWIG
> > interface. Copying is enforced. Not sure this is a big deal for such a low
> > lever functionality, but it is sad that it should be needed, if the underlying
> > structure is just a c-array, which numpy wraps just fine.
> >
>
> I think that if this type of data is used intensively at the Python
> level, then there will be bigger performance issues to worry about
> than data copying.
>
> The multi_array interface is somewhat secondary - the important point
> is flattening the double pointer in the UFC interface.
We should avoid using any other data structures than plain C arrays in
the UFC interface.
Or we should use STL data structures (or boost) throughout UFC, but
that sounds more like UFC >= 3.0.
--
Anders
> Garth /bugs.launchpad .net/ufc/ +bug/787405/ +subscriptions
>
> > Johan
> >
> >
> > Title:
> > Double pointers used for rectangular arrays
> >
> > To manage notifications about this bug go to:
> > https:/
> >
>