Skip to content

Populate "high level" stl like algorithm #107

@ThomasRetornaz

Description

@ThomasRetornaz

Hi
I currently migrate from boost:simd to libsimdpp
I heavily use transform and reduce algorithm from plain pointers and simd aware operators
I will try to implement such algorithm using libsimdpp
Are you interested if i providing such "high level" algorithm to the main library?

Possible signature for transform could be
template<typename T, typename U, typename UnOp> U* transform(T const* first, T const* last, U* out, UnOp f) { ..... }
where UnOp should be designed by users to handle both litterals and "simd vectors"

Transform functions must handle

  • prelude (if they are not musch element to fit in simd register)
  • main simd part (element wich fit in simd register and use simd load/store)
  • epilogue (remaining element which not fit in simd register)

I will add

  • few traits to pick up the most reliable number of elements for simd part
  • isaligned function to switch beetween load load_u and store and store_u (which seem missing)
  • transform and reduce algorithm (for a begining)

Do you have any concern where i should put those different functions
I will make a pull request if you are interested

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions