I’m prototyping implemeting Vector2/3/4 vector types and i realized if the SIMD storage is an integer vector,
* aren’t available as checked operators.
error: '+' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead
Even though vectors could never conform to
Numeric, it would very much make sense for a higher-level vector type to support
*. is it possible to have reasonably performant SIMD checked arithmetic on vector types?
I’ve also considered just implementing
* as calling into
&* on their underlying storage, but then it’d be weird where
+ on scalars can overflow but
+ on vectors wraps around.