[code-reflection] RFR: [feature][HAT] 2D and 3D ranges for the NDRange API

Juan Fumero duke at openjdk.org
Thu Jul 24 07:08:19 UTC 2025


On Thu, 24 Jul 2025 07:04:48 GMT, Juan Fumero <duke at openjdk.org> wrote:

>> hat/core/src/main/java/hat/ComputeContext.java line 152:
>> 
>>> 150:                 case 2 -> ndRange = accelerator.range(rangeX, rangeY);
>>> 151:                 case 3 -> ndRange = accelerator.range(rangeX, rangeY, rangeZ);
>>> 152:             }
>> 
>> Should we add a default branch that throws an exception instead of initializing `ndRange` to null?
>
> I thought about this. However, this method is method is private, and only the public dispatch method sets the value. I will add the exception though.

BTW, in near future we should have our own exceptions (e.g., `HATRuntimeException`). For this PR I will use the generic `RuntimeException`

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

PR Review Comment: https://git.openjdk.org/babylon/pull/496#discussion_r2227623274


More information about the babylon-dev mailing list