Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
Maintained by go/gitwatcher - Please do not modify manually [ID: 530458]
Maintained by go/gitwatcher - Please do not modify manually [ID: 530406]
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
All current Reactor vector types are implemented as 128-bit underneath. It makes it easy to bitcast between them, narrow/widen at no cost, and swizzle cheaply (see b/148295813 ).
It also means that we should support the exact same operators and intrinsics for Byte16, Byte8, and Byte4, and any other set of vector types of the same element type. Currently they're not uniform.
One way to achieve this would be to derive Byte4 and Byte8 from Byte16, and only have the overridden getType() determine what its size is during load and store operations. Note this would make it valid to do arithmetic between different sized vectors, which allows bug-prone behavior (though supporting bitcasting between them already allows similar bugs). To avoid this we could have a template base class (e.g. ByteVec<int N>).
Future 'wide' vector support probably should not implement the same set of operations. SIMD::Byte would be a vector of 32-bit elements where only the lower 8-bit is accessible. SIMD::Byte4 would be a vector of byte4 vectors.