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

Juan Fumero jfumero at openjdk.org
Mon Oct 27 10:10:18 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);

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

Commit messages:
 - [hat] minor change
 - [hat] makeFloat4 from immutable supported on GPU
 - [hat][wip] float4 implementation with mutable/immutable variants
 - [hat] Float4 views docs
 - Merge branch 'code-reflection' into hat/float4/of
 - [hat] CUDA backend Float4.of supported
 - [hat] fix dialectify Float.of phase
 - [hat] Float4.of supported for OpenCL

Changes: https://git.openjdk.org/babylon/pull/642/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=642&range=00
  Stats: 604 lines in 26 files changed: 525 ins; 15 del; 64 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