RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v13]
Jatin Bhateja
jbhateja at openjdk.org
Thu Sep 19 06:55:45 UTC 2024
On Thu, 19 Sep 2024 06:41:16 GMT, Jatin Bhateja <jbhateja 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.
Hi @eme64 , as per @PaulSandoz and @jddarcy we should wait till Valhalla preview to add full blown unsigned value type and associated operations, for the time being restricting the scope of these new operations to VectorAPI.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20507#issuecomment-2360137469
More information about the core-libs-dev
mailing list