[code-reflection] Integrated: ArrayView support for HAT kernels

Ruby Chen duke at openjdk.org
Fri Sep 26 18:40:43 UTC 2025


On Wed, 17 Sep 2025 00:33:25 GMT, Ruby Chen <duke at openjdk.org> wrote:

> Adding an option to read and modify buffers as if they are arrays - e.g. the squares kernel would change from
> 
>  @CodeReflection
>   public static void kernel(KernelContext kc, S32Arr s32Arr) {
>     s32Arr.array(kc.x, s32Arr.array(kc.x) * s32Arr.array(kc.x));
>   }
> 
> to something like
> 
>  @CodeReflection
>   public static void kernel(KernelContext kc, S32Arr s32Arr) {
>     int[] arr = s32Arr.arrayView();
>     arr[kc.x] *= arr[kc.x];
>   }

This pull request has now been integrated.

Changeset: eb6a76b6
Author:    Ruby Chen <ruby.r.chen at gmail.com>
Committer: Gary Frost <gfrost at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/eb6a76b6935b7a87367abad0edf3801230949466
Stats:     978 lines in 17 files changed: 889 ins; 63 del; 26 mod

ArrayView support for HAT kernels

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

PR: https://git.openjdk.org/babylon/pull/571


More information about the babylon-dev mailing list