Skip to content

Conversation

davidkoski
Copy link
Collaborator

No description provided.

@davidkoski davidkoski requested a review from awni April 30, 2025 16:04
@@ -61,12 +61,6 @@ extension MLXArray {
}
}

/// Replace the interior ctx (`mlx_array` pointer) with a new value by transferring ownership
@inline(__always)
func update(_ ctx: mlx_array) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was internal to the indexing code and takes a bare mlx_array. Only a single callers so I just moved the body there (it is already calling mlx-c code so this is IMHO less confusing)

///
/// Note: this is an implementation detail and only visible because of the need to call it from
/// other `mlx-swift` modules.
public func _updateInternal(_ array: MLXArray) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rename and updated docs.

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!!

@davidkoski davidkoski merged commit abe1092 into main Apr 30, 2025
1 check passed
@davidkoski davidkoski deleted the rename-update branch April 30, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants