ChillFish8 / cfavml

An unopinionated SIMD vector operation library for Rust, supporting no_std and no-alloc workloads.
Apache License 2.0
3 stars 1 forks source link

Implement specialised `max_value` & `min_value` operations #1

Closed ChillFish8 closed 3 months ago

ChillFish8 commented 3 months ago

The intention of this API is to allow things similar to that of the vector_x_value API of operations, where instead of needing to allocate a new array in order to select either the element in the vector or a separate single value, we simply take the provided value and broadcast it for desired operations.

This in particular can help for things like ReLu activation which zeroes any element < 0.

Likely operation API naming:

<dtype>_x<dims>_<arch>_nofma_max_value(value: T, a: &[T], result: &mut [T])