Move the Find Index of Minimum code in a separate header . Collect all methods and add a test
Move the Find Index of Minimum code in a separate header . Collect all methods and add a test
We use a particular SIMD "optimized" way in order to find the index of the minimum in a relatively large "unordered" array of pair wise distances.
The discussion started in ATLASRECTS-5244.
@ssnyder pointed to some blogs . And then
to the vec.h
we have in ATLAS.
Most blogs describe the int case, use x86-64 intrinsics and assume various levels of Avx
.
We do it for floats,
using the gcc vector extension plus helpers (a few I created were to support this)
and we assume (for now) x86_64-v2
. So not exactly the same but I referenced some of the blog authors
in the comment.
This basically brings everything from https://github.com/AnChristos/FindMinimumIndex back. Except the "benchmark" as this prb will need some external support which prb will come next year (@akraszna_
We were already using one of the SIMD which I moved to the header. So there is one code movement from one place to another.
The other inmplementations are the std
ones i.e using STL
(did not solve the issue at least with gcc but there is hope in the future). And what we had before (the C
).
Plus one that could be faster for what we use but needs a bit of study before we switch.