[vector] Vector.cast
Lupusoru, Razvan A
razvan.a.lupusoru at intel.com
Wed May 30 18:45:40 UTC 2018
I started composing the reply to this several times but never got to click send. I admit I am not quite sure how I feel about this.
On one side, there are benefits to doing this since it makes behavior easier to understand since size would stay the same. On the other side, we have it working and fully tested with current approach so at least we have some confidence that implementation is fine. So I am a bit torn from my side - but it feels like the right thing would be to keep lane same and thus force resize to be explicit (and thus make it less of an error for developer bugs).
So I think you should probably go ahead with this change.
Thanks,
Razvan
-----Original Message-----
From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: Wednesday, May 30, 2018 11:41 AM
To: John Rose <john.r.rose at oracle.com>; Lupusoru, Razvan A <razvan.a.lupusoru at intel.com>
Cc: panama-dev at openjdk.java.net
Subject: Re: [vector] Vector.cast
Ok.
Razvan, any views on this before i start reducing down the scope of the cast implementations? (I realize you put a lot of effort into supporting the current functionality).
Thanks,
Paul.
> On May 25, 2018, at 8:13 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> Yes, that makes sense. A length changes should be a separate operation, which will generate very different code.
>
>> On May 25, 2018, at 3:08 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>>
>> Hi,
>>
>> Would it make sense to simplify Vector.cast to species of the same length? if length differs an exception is thrown.
>>
>> That’s one less thing to think about and same concept can then be applied to Shuffle and Mask, which is effectively a nop if no boxing occurs because the underlying lane elements don't change.
>>
>> We can lean on the reshape/rebracket/resize for other length transforming operations, in addition to mask/shuffle conversion to/from vector.
>>
>> Paul.
>
More information about the panama-dev
mailing list