On Mon, 8 Dec 2025 23:29:33 GMT, Paul Sandoz <[email protected]> wrote:

>> Okay, I got your point. I think this might be to maintain consistency with 
>> `UMINReduceMasked`; for the masked version, if no element is selected, it 
>> returns the identity value. I'm okay with both approaches, maybe let’s hear 
>> what @PaulSandoz  thinks.
>
> For masking we need to start with the identity or otherwise use the identify 
> when no mask bits are set. It would be better to declare as constants and 
> refer to them e.g., `UMAX_VALUE`, `UMIN_VALUE`. There are also other cases 
> where we use identity values for reduction and they follow the same pattern 
> of declaration and use.

Hi @PaulSandoz thanks for your input. 

> It would be better to declare as constants and refer to them e.g., 
> UMAX_VALUE, UMIN_VALUE. 

Do you mean adding two **public** constants to `Byte/Short/Integer/Long.java` ? 
Like `Byte.MIN_VALUE`. In this way, these two constants can be used in anywhere.

Or just two **private** constants in `ByteVector.java`? Like `MAX_OR_INF`.

I think you're referring to the former, right? To add a public constant, we 
need to go through the **CSR (Compatibility & Specification Review) process**, 
right? I haven't gone through that process before.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28692#discussion_r2600838156

Reply via email to