Skip to content

Commit abfd847

Browse files
committed
Don't materialize CPU Array objects.
1 parent 040bacd commit abfd847

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/abstractarray.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ end
8888

8989
## basic linear copies of identically-typed memory
9090

91+
# convert to something we can get a pointer to
9192
materialize(x::AbstractArray) = Array(x)
9293
materialize(x::GPUArray) = x
94+
materialize(x::Array) = x
9395

9496
for (D, S) in ((GPUArray, AbstractArray), (Array, GPUArray), (GPUArray, GPUArray))
9597
@eval begin

0 commit comments

Comments
 (0)