Skip to content

Backpermute needn't have the same index container #563

Open

Description

@mchav

I often times compute the indices I want to backpermute has an unboxed vector. But the call site requires that I use the same vector container as my source to do so. So I end up having to roll my own in the case that I have a boxed or storable vector. Would it be possible to make backpermute polymorphic in its index container type?

Activity

  1. Shimuuar commented on Jun 9, 2026

    @Shimuuar
    Contributor

    Sure! That doesn't seems to be right choice. Say who in their right mind would want to store indices in boxed vector? But I think generalizing type of backpermute would be breaking change. It will break type inference in cases where fact that both arguments have same vector type.

    In the meantime you can use backpermute xs (VG.convert is). It's fusible in second argument so it should be fused away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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