[code-reflection] Integrated: ComputeContext can now implement BufferAllocator

Gary Frost gfrost at openjdk.org
Fri Jun 14 14:35:53 UTC 2024


By making ComputeContext implement BufferAllocate.  We can simplify this code. 

S32Array arr = S32Array.create(cc.accelerator, len);

to just 

S32Array arr = S32Array.create(cc, len);


It still delegates to accelerator, which delegates to the baclend.  Allowing for example the backend to allocate on a GPU.

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

Commit messages:
 - ComputeContext can now implement BufferAllocator

Changes: https://git.openjdk.org/babylon/pull/139/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=139&range=00
  Stats: 51 lines in 11 files changed: 10 ins; 4 del; 37 mod
  Patch: https://git.openjdk.org/babylon/pull/139.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/139/head:pull/139

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


More information about the babylon-dev mailing list