Skip to content

Unary mapper - #8

Draft
AntoinePrv wants to merge 8 commits into
xtensor-stack:mainfrom
AntoinePrv:unary-mapper
Draft

Unary mapper#8
AntoinePrv wants to merge 8 commits into
xtensor-stack:mainfrom
AntoinePrv:unary-mapper

Conversation

@AntoinePrv

Copy link
Copy Markdown
Contributor

This is taking a different approach to transform

  • Only buffer pointers (in the end this is only relevant thing)
  • Caller-specified alignment can remove header and trailer
  • No scalar op (recomputing when pure, local buffer otherwise),
    but we could detect when the user func supports it to use when not pure.
    Resulting in a different header/trailer strategy than transform.
  • Explicit loop unrolling (turned out to me relevant on some compiler).
  • Support for mixed sizes: e.g. func can take/return std::array<batch<T>, N> for working with different sizes (as done e.g. in widen).

On top of this:

  • Add benchmarks
  • Factor data between tests and benchmarks

Furthermore, adding some aliases (abs, exp, sqrt...).
We should eventually add all of them and run full benchmark suite to know how we are performing (as a mix of xsimd implmentation and loop running here).

So far it seems to perform slighly better that transform on small and medium batches (large are dominated by the SIMD ops which are the same), at least on Neon.
I think we still need to expand on the benchmarks across multiple platforms and function, but eventually we may want to merge both.

Sill have to do map_binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant