Skip to content

Commit 5532c29

Browse files
committed
proper error, no isbits but pointerfree
1 parent 186b482 commit 5532c29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/broadcast.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ end
105105

106106

107107
function arg_length(x::AbstractArray)
108-
if !isbits(x)
109-
error("Non isbits Arrays in GPU Broadcast not supported (So arrays that don't contain pointers to memory are, e.g. UnitRanges). Try converting it to a gpu array. Found: $(typeof(x))")
108+
if !Base.datatype_pointerfree(x)
109+
error("Arrays type contains pointer - this doesn't work on the GPU (So arrays that don't contain pointers to memory, e.g. UnitRanges, would work).
110+
Try converting it to a gpu array. Found: $(typeof(x))"
111+
)
110112
end
111113
UInt32.(size(x))
112114
end

0 commit comments

Comments
 (0)