RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v13]

Emanuel Peter epeter at openjdk.org
Thu Sep 19 06:31:43 UTC 2024


On Wed, 18 Sep 2024 16:53:53 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> > > > Why is this even called `VectorMath`? Because those ops are not at all restricted to vectorization, right?
> > > 
> > > 
> > > Nomenclature is suggested by Paul.
> > 
> > 
> > @PaulSandoz Do you want to limit these **scalar** operations to a class name that implies **vector** use?
> 
> It's whatever math functions are required to in support of vector operations (as the JavaDoc indicates) that are not provided by other classes such as the boxed primitives or `java.lang.Math`.

Ok. I suppose these methods could eventually be moved to `java.lang.Math` or some other `java.lang` class, when the VectorAPI goes out of incubator mode?

I feel like these saturating operations, and also the unsigned ops could find a more wider use, away from (explicit) vector usage. For example, the saturating operations are nice because they prevent overflows, and in some cases that would be very nice to have readily available.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20507#issuecomment-2360099389


More information about the hotspot-compiler-dev mailing list