Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the performance of reinterpretarray with simultaneous reshaping #37559

Merged
merged 3 commits into from
Sep 29, 2020

Commits on Sep 29, 2020

  1. Add reinterpret(reshape, T, a)

    This addresses longstanding performance problems with `reinterpret`
    when `sizeof(eltype(a))` is an integer multiple of `sizeof(T)`.
    By reshaping the array to have an extra "channel dimension,"
    LLVM can unroll the inner loop thanks to static size information.
    Conversely, this consumes the initial "channel dimension" if
    `sizeof(T)` is an integer multiple of `sizeof(eltype(a))`.
    timholy committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    bc2abbe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69a82b5 View commit details
    Browse the repository at this point in the history
  3. Omit the N from SCartesianIndex2 and friends

    In order to make this a subtype of `AbstractCartesianIndex`, formerly
    this added a useless type parameter `N` to indicate the dimensionality
    of the array for which this index was constructed. But since none of the
    code depends on `N`, and it would have forced useless specialization,
    it seems better to not have it.
    timholy committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    7143444 View commit details
    Browse the repository at this point in the history