Skip to content

Feature Request: minmax, position min/max, product, and sum #1

@okaneco

Description

@okaneco

Thanks for working on this.

There are two other function families that I find myself re-implementing a lot that I'd like to suggest as additions to the library.

minmax and more positions

  • minmax_simd
  • position_max_simd, position_min_simd, position_minmax_simd

It'd be nice to have these done in a single pass and without needing to successively call max/min then position.

Product and sum

  • product_simd, sum_simd

These are mainly for floating point numbers. Since floating point math isn't associative, if you call product/sum then you'll get scalarized operations. You have to use your own accumulators to get vectorized operations, otherwise the slice is operated on sequentially.

If product and sum are added, it should be noted in the documentation that the results will likely not be equal to .product::<float()/.sum::<float>().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions