The constructors of ddc::DiscreteElement, ddc::DiscreteVector and the different domains (ddc::DiscreteDomain, ddc::StridedDiscreteDomain and ddc::SparseDiscreteDomain) have both an implicit reordering and slicing semantic:
ddc::DiscreteElement<X, Z> delem_xz;
ddc::DiscreteElement<Y> delem_y;
ddc::DiscreteElement<Y, X> delem_yx(delem_xz, delem_y);
In generic code it is not always clear whether the slicing is intentional. We could add a tag to distinguish the different semantics, something like:
ddc::DiscreteElement<X, Z> delem_xz;
ddc::DiscreteElement<Y> delem_y;
// ddc::DiscreteElement<Y, X> delem_yx(delem_xz, delem_y); does not compile anymore
ddc::DiscreteElement<Y, X> delem_yx(ddc::with_slicing, delem_xz, delem_y);
and make the existing constructor only have a reordering semantic.
The constructors of
ddc::DiscreteElement,ddc::DiscreteVectorand the different domains (ddc::DiscreteDomain,ddc::StridedDiscreteDomainandddc::SparseDiscreteDomain) have both an implicit reordering and slicing semantic:ddc::DiscreteElement<X, Z> delem_xz; ddc::DiscreteElement<Y> delem_y; ddc::DiscreteElement<Y, X> delem_yx(delem_xz, delem_y);In generic code it is not always clear whether the slicing is intentional. We could add a tag to distinguish the different semantics, something like:
and make the existing constructor only have a reordering semantic.