Skip to content

Commit a9a395a

Browse files
authored
Merge pull request #95 from JuliaGPU/sd/fix94
fix #94
2 parents 7aa9b89 + 3dddaf8 commit a9a395a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/broadcast.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ function Base.foreach(func, over::GPUArray, Bs...)
104104
end
105105

106106

107-
function arg_length(x::AbstractArray)
108-
if !Base.datatype_pointerfree(x)
107+
function arg_length(x::T) where T <: AbstractArray
108+
if !Base.datatype_pointerfree(T)
109109
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))"
110+
Try converting it to a gpu array. Found: $(T)"
111111
)
112112
end
113113
UInt32.(size(x))

0 commit comments

Comments
 (0)