Sometimes (many times) the vectorize needs a type hint to know how large vectors to return. Sometimes it is easy to do so somewhere in the code after that, eg by this:
for v in vectorize(stuff) {
let v: u32x4 = v;
...
}
But this is not always comfortable/possible. Furthermore, in case of MutProxy it is even more cumbersome as it leaks the uninteresting type to the code. Using turbofish on the vectorize is also a bit gnarly, because it has bazzilion of type parameters of weird types.
Try to explore if it is possible to come up with a way to hide the other params somehow and simply hint by the desired types, both in read mode and in mutable mode, something like this:
Sometimes (many times) the
vectorize
needs a type hint to know how large vectors to return. Sometimes it is easy to do so somewhere in the code after that, eg by this:But this is not always comfortable/possible. Furthermore, in case of
MutProxy
it is even more cumbersome as it leaks the uninteresting type to the code. Using turbofish on thevectorize
is also a bit gnarly, because it has bazzilion of type parameters of weird types.Try to explore if it is possible to come up with a way to hide the other params somehow and simply hint by the desired types, both in read mode and in mutable mode, something like this:
If not possible, how close can we get?