Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Rename read/write to copyTo/From #19

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

karllessard
Copy link
Contributor

Renames NdArray.read(dstBuffer) to NdArray.copyTo(dstBuffer), and NdArray.write(srcBuffer) to NdArray.copyFrom(srcBuffer), to make more obvious the direction of the data flow of these methods.

This is somehow related to tensorflow/java#510, though I just modified the signature in NdArray and left the one in DataBuffer intact, since the read/write methods of these entities tries to replicate the behaviour of the get/put methods of the Java NIO buffers.

@karllessard karllessard requested a review from Craigacp February 19, 2024 02:47
Copy link
Contributor

@Craigacp Craigacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth updating the javadoc with the version that had the old names in, otherwise it looks good.

@karllessard karllessard merged commit 369b05a into tensorflow:main Feb 20, 2024
@karllessard karllessard deleted the rename branch February 20, 2024 02:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants