Skip to content

Layout template parameter of Spline Builder2D::operator() does not work for LayoutStrided #886

@EmilyBourne

Description

@EmilyBourne

Spline Builder2D::operator() has a template parameter Layout, but passing objects with the Layout LayoutStrided leads to an error. The error comes from this line:

m_spline_builder_deriv1(

as the 1D version:

template <class Layout, class BatchedInterpolationDDom>
void operator()(

also assumes that the layout is the same for all arguments and therefore does not like the argument created here:

ddc::Chunk spline1_deriv_min_alloc(
m_spline_builder_deriv1.batched_spline_domain(batched_interpolation_deriv_domain),

I am pretty certain that LayoutLeft will have the same problem.

If you are touching this argument then for Gysela it could also be useful to have a different layout for the values and derivatives (e.g. LayoutRight for the values, and LayoutStrided for the derivatives).

This bug was found by @PaulineVidal who has a reproducer if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions