[code-reflection] RFR: Proposal for supporting Float4.of for CPU host code and GPU device code [v2]

Juan Fumero jfumero at openjdk.org
Mon Oct 27 10:36:00 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 ... 
> vA.linewise(vB, (a, b) -> Float::sum);

Juan Fumero has updated the pull request incrementally with one additional commit since the last revision:

  [hat] Move vectorOf codegen method to common C99 codegen

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/642/files
  - new: https://git.openjdk.org/babylon/pull/642/files/31e0db21..2f954e0b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=01
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=00-01

  Stats: 80 lines in 4 files changed: 24 ins; 50 del; 6 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