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

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


On Fri, 14 Jun 2024 14:30:43 GMT, Gary Frost <gfrost at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 8dd9d638
Author:    Gary Frost <gfrost at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/8dd9d6389c5b67e23ac5d128df6970a62f11af9e
Stats:     51 lines in 11 files changed: 10 ins; 4 del; 37 mod

ComputeContext can now implement BufferAllocator

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

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


More information about the babylon-dev mailing list