[code-reflection] RFR: ArrayView support for HAT kernels
Ruby Chen
duke at openjdk.org
Fri Sep 26 17:41:31 UTC 2025
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];
}
-------------
Commit messages:
- cleanup
- Merge branch 'array-view' of ssh://github.com/rbrchen/babylon into array-view
- Merge branch 'code-reflection' into array-view
- Refactor arrayview and add Java backend handling
- minor changes
- Merge branch 'code-reflection' into array-view
- Remove excess files
- Add 2D support and cleanup
- Merge branch 'code-reflection' into array-view
- Basic ArrayView support for primitive arrays
Changes: https://git.openjdk.org/babylon/pull/571/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=571&range=00
Stats: 978 lines in 17 files changed: 889 ins; 63 del; 26 mod
Patch: https://git.openjdk.org/babylon/pull/571.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/571/head:pull/571
PR: https://git.openjdk.org/babylon/pull/571
More information about the babylon-dev
mailing list