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

Combine common code / reduce codegen by factoring out common parts #819

Merged
merged 4 commits into from May 16, 2020

Commits on May 16, 2020

  1. FIX: Split shape check functions into less generic parts

    Split these shape check functions into parts that don't require using
    the element type as a generic parameter. This means that less
    instantiations of this code is needed for a typical user of ndarray.
    bluss committed May 16, 2020
    Configuration menu
    Copy the full SHA
    ab52a98 View commit details
    Browse the repository at this point in the history
  2. FIX: Simplify code in Baseiter::fold

    Remove redundant .clone() and simplify inner loop
    bluss committed May 16, 2020
    Configuration menu
    Copy the full SHA
    b457aec View commit details
    Browse the repository at this point in the history
  3. FIX: Remove unused dimension edit in apply_core_strided_[cf]

    The original design was that the apply cores were "resumable", and thus
    we'd put the dimension "back in order" when exiting the method.
    
    However, this is not in use today (and loop break from FoldWhile also
    bypasses this tail code, anyway), so just remove this unused line.
    bluss committed May 16, 2020
    Configuration menu
    Copy the full SHA
    eb79293 View commit details
    Browse the repository at this point in the history
  4. FIX: Factor out the inner loops in Zip apply_core_*

    The innermost loop is the stretch of constant stride (for the contiguous
    case, this is the whole loop); with a lot of function arguments, this
    part is actually commmon to the three loops (contig, c, and f).
    
    Also make a small simplification of this inner loop; use a while loop to
    have less code to compile in this much instantiated function.
    bluss committed May 16, 2020
    Configuration menu
    Copy the full SHA
    a76bb92 View commit details
    Browse the repository at this point in the history