Skip to content

Fixes and follow-ups to two-sided broadcasting in arithmethic ops #936

@bluss

Description

@bluss

In #898 we left the following "known issues" open that we can fix after that PR's review and merge:

  • Rename BroadcastShape to DimMax - we also move the broadcast method out of the trait (it can just be a free function)
  • It is a wish that the D: Dimension + DimMax<E> bound in arith ops becomes just D: Dimension, i.e. the DimMax with associated type becomes implied by D: Dimension. At this point it is not certain how this can be done.
  • Preserve the allocation of the input array in arithmetic ops in more cases (when only the left/right side needs broadcast) in array + &array and &array + array
  • Preserve the allocation of the input array in arithmetic ops in more cases (when the left side needs broadcast in Array + Array)
  • Improve performance of "no-broadcasting-needed" scenario in &array + &array operation
  • Potentially provide public function or method similar to broadcast_with - that does the broadcasting of two arrays together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions