[code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v7]
Juan Fumero
jfumero at openjdk.org
Fri Oct 31 07:50:07 UTC 2025
> This PR adds support for creating float4 objects within the device code:
>
>
> Float4 f = Float4.of(x, y, z ,w)
>
>
> In addition, it provides a CPU implementation for this type a new method to operate in `lanewise`. This operation is CPU only at the moment:
>
>
> Float4 vA ...
> Float4 vB ...
> Float4 vC = vA.linewise(vB, Float::sum);
Juan Fumero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 15 additional commits since the last revision:
- Merge branch 'code-reflection' into hat/float4/of
- [hat] config bits message fixed
- [hat] Log Config bits for OpenCL moved to OpenCL backend instantiation
- [hat] Dialect for handling vector types simplified
- [hat] minor refactor ocl-codegen
- [hat] codegen - cleanup old OpenCL typecasts
- [hat] Move vectorOf codegen method to common C99 codegen
- [hat] minor change
- [hat] makeFloat4 from immutable supported on GPU
- [hat][wip] float4 implementation with mutable/immutable variants
- ... and 5 more: https://git.openjdk.org/babylon/compare/8d67a217...aec780a9
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/642/files
- new: https://git.openjdk.org/babylon/pull/642/files/251f1a52..aec780a9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=06
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=05-06
Stats: 494433 lines in 6718 files changed: 341377 ins; 104665 del; 48391 mod
Patch: https://git.openjdk.org/babylon/pull/642.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/642/head:pull/642
PR: https://git.openjdk.org/babylon/pull/642
More information about the babylon-dev
mailing list