int16-elements16-bit integer elements have no kernel
Reported by --explain after a verdict.
mettle explain int16-elements
The loop loads or stores int16/uint16. Mettle ships kernels for 8-bit and 32-bit integers and for both float widths, but not for 16-bit.
Fix: widen the array to int32. The loop then runs eight lanes at a time instead of one, which more than pays for the extra memory in a hot loop. Where the values fit in a byte, int8 is faster still.
This is a gap in the compiler, not a fact about your code. The report simulates the widening and tells you which kernel you would get.
Related
- call-in-bodyThe loop body calls a function
- extern-call-in-bodyThe loop body calls an external function
- indirect-callThe loop body calls through a function pointer
- alloc-in-bodyThe loop body allocates
- inline-asmThe loop body contains inline assembly
- control-flowThe loop body branches
- early-exitThe loop can leave before its trip count
- int64-elements64-bit integer elements have no kernel