| ▲ | janwas 2 years ago | |
(For other readers:) This is what our Highway library does - wrapper functions around intrinsics, plus a (constexpr if possible) Lanes() function to query the length. For very many cases, writing the code once for an 'unknown to the programmer' vector length indeed works. One example that doesn't work so well is a sorting network; its size depends on the vector length. (I see you mention this below.) | ||