Use templates for native arm and x64 f32 methods#143684
Open
thecoop wants to merge 6 commits intoelastic:mainfrom
Open
Use templates for native arm and x64 f32 methods#143684thecoop wants to merge 6 commits intoelastic:mainfrom
thecoop wants to merge 6 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
ldematte
approved these changes
Mar 5, 2026
Contributor
ldematte
left a comment
There was a problem hiding this comment.
Looks great! One idea, but they can be for a follow up: the scalar ops (vec_dotf32 and vec_sqrf32) are also basically identical but for the vector and scalar ops. Maybe we can templatize them too?
And one further idea, this one definitely for a follow up: what if we "reverse" things a bit? If we templatize the scalar ops too, the only thing that will remain platform specific will be the vector functions (e.g. sqrf32_vector) and the templates (e.g. call_f32_bulk); all the definitions/exports could be common.
ldematte
approved these changes
Mar 5, 2026
Contributor
ldematte
left a comment
There was a problem hiding this comment.
Still LGTM.
I'm happy when you are happy there is no regression (benchmarks/tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Template bulk and single float32 methods