[vector] RFR -- removing Shape as type parameter
Brian Goetz
brian.goetz at oracle.com
Wed Nov 28 18:23:40 UTC 2018
> I have only one comment: on API level S_Max_BIT overlaps with
> Vector.preferredSpecies(), so it was agreed to not to expose it on API
> level when [Int|...]MaxVector's were incorporated. With your change it
> becomes part of the API:
>
> +public enum Shape {
> + S_64_BIT(64),
> + S_128_BIT(128),
> + S_256_BIT(256),
> + S_512_BIT(512),
> + S_Max_BIT(Unsafe.getUnsafe().getMaxVectorSize(byte.class) * 8);
>
> - static final SMaxBit S_Max_BIT = new SMaxBit();
> - static final class SMaxBit extends Vector.Shape {
>
> I don't have a strong preference here: preferredSpecies() looks more
> flexible, but I see that S_Max_BIT can be more convenient to use. My
> point is: only one should stay.
Yes, I agree -- I want to address this in a subsequent round, but am
trying to break things up into small, manageable changes. Overall I
think there's room to narrow the impact of Species on the API, but let's
take that one step at a time.
More information about the panama-dev
mailing list