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
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>().
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_simdposition_max_simd,position_min_simd,position_minmax_simdIt'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_simdThese 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>().