Skip to content

Add a few docstrings for public functions#363

Merged
williamfgc merged 1 commit into
JuliaGPU:mainfrom
nhz2:nz/public
Jun 2, 2026
Merged

Add a few docstrings for public functions#363
williamfgc merged 1 commit into
JuliaGPU:mainfrom
nhz2:nz/public

Conversation

@nhz2

@nhz2 nhz2 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #355

Comment thread src/array.jl

Create an uninitialized array on the device with the specified type and size.
"""
array(x::AbstractArray) = to_device(x)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We probably need a separate docstring for this method since it is semantically distinct from the others.

@PhilipFackler PhilipFackler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you. This is a good start and a welcome reminder that we need to add docstrings (and exports) for all of our API functions.

Comment thread src/JACC.jl

public zeros, ones, fill
public to_device, to_host, transfer!
public @parallel_for, @parallel_reduce

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor, we also use parallel_reduce as convenience functions , e.g., JACC.parallel_reduce(x) sums all the elements of x. This is a great start!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

parallel_reduce is already exported above, which implies public usually.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My bad. Thanks for catching it!

@williamfgc

Copy link
Copy Markdown
Collaborator

Test this please

@williamfgc williamfgc merged commit 3825851 into JuliaGPU:main Jun 2, 2026
14 of 15 checks passed
@nhz2 nhz2 deleted the nz/public branch June 2, 2026 20:20
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.

Memory allocation docstrings are missing

3 participants