Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Add collect function #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add collect function #28

wants to merge 2 commits into from

Conversation

MikeInnes
Copy link
Collaborator

Consistent with the behaviour of the GPU stack, and others.

src/xrt.jl Outdated
@@ -240,6 +240,8 @@ struct XRTArray{T, Dims, N} <: AbstractArray{T, N}
end
end

Base.collect(xs::XRTArray) = xs.storage.localstorage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be convert(Array, xs) to make sure to get the data from the remote if not present.

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