On Thu, 28 May 2026 08:04:49 GMT, Emanuel Peter <[email protected]> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorOperators.java
>> line 682:
>>
>>> 680: public static final Conversion<Byte,Short> B2S = convert("B2S",
>>> 'C', byte.class, short.class, VO_KIND_CAST, VO_ALL);
>>> 681: /** Convert {@code byteVal} to {@code (Float16)byteVal}. */
>>> 682: public static final Conversion<Byte,Float16> B2H = convert("B2H",
>>> 'C', byte.class, Float16.class, VO_KIND_CAST, VO_ALL);
>>
>> Float16 is not a primitive. What happens when you do a cast
>> `(short)byteVal`? Is that sensible, or should we use the
>> `Float.valueOf(...)` semantics?
>
> Same question for other cases below.
Paul choose not to sprinkle the Float16 instead of primitive type every where,
and suggested to add a normative paragraph at the start of Float16Vector.java
which mentions about Float16 being considered as primitive type
https://github.com/jatin-bhateja/jdk/blob/fdb0e33c1933c6c12e42e7fabc827e93d5fd75a1/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16Vector.java#L65
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r3316834289