[vectorIntrinsics+fp16] RFR: 8299373: Extend vector conversion APIs for Halffloat type. [v2]

Jatin Bhateja jbhateja at openjdk.org
Wed Jan 4 09:00:07 UTC 2023


On Mon, 2 Jan 2023 04:35:24 GMT, Swati Sharma <duke at openjdk.org> wrote:

>> Hi All,
>> 
>> The patch contains the below changes:
>> 
>> - Extended existing conversion APIs (convertShape, castShape, convert) for half float vectors.
>> - Define new conversion operators for casting to/from halffloat type.
>> - Extended existing JTREG conversion tests for half float types.
>> 
>> Please review and provide your feedback.
>> 
>> Thanks,
>> Swati
>
> Swati Sharma has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8299373: Intrinsification issues resolved for Halffloat.

test/jdk/jdk/incubator/vector/AbstractVectorConversionTest.java line 381:

> 379:             Number v = (Number) Array.get(src, srcPos + i);
> 380:             if (srcSpecies.elementType() == Halffloat.class) {
> 381:                  v = (Number) Halffloat.valueOf(v.shortValue()).floatValue();

Any specific reason for not directly calling Float.float16ToFloat(short) here ?

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

PR: https://git.openjdk.org/panama-vector/pull/208


More information about the panama-dev mailing list