[code-reflection] RFR: Use memory segment

Paul Sandoz psandoz at openjdk.org
Tue Feb 25 19:14:26 UTC 2025


Replace many uses of `ByteBuffer` use with idiomatic `MemorySegment` use. This also tends to make clearer the life cycle of segments. Generally in any ONNX APIs we design i think we should avoid exposing `*Buffer`. The "escape hatch" for accessing the data of a `Tensor` should be `MemorySegment`.

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

Commit messages:
 - Variable rename.
 - Use memory segment.

Changes: https://git.openjdk.org/babylon/pull/328/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=328&range=00
  Stats: 84 lines in 6 files changed: 14 ins; 12 del; 58 mod
  Patch: https://git.openjdk.org/babylon/pull/328.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/328/head:pull/328

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


More information about the babylon-dev mailing list