Skip to content

Commit ec91274

Browse files
committed
fix #104
1 parent c2841ec commit ec91274

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/broadcast.jl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,8 @@ function Base.foreach(func, over::GPUArray, Bs...)
104104
end
105105

106106

107-
function arg_length(x::T) where T <: AbstractArray
108-
if !Base.datatype_pointerfree(T)
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: $(T)"
111-
)
112-
end
113-
UInt32.(size(x))
114-
end
115107
arg_length(x::Tuple) = (UInt32(length(x)),)
116-
arg_length(x::GPUArray) = UInt32.(size(x))
108+
arg_length(x::AbstractArray) = UInt32.(size(x))
117109
arg_length(x) = () # Scalar
118110

119111
struct BInfo{Typ, N}

0 commit comments

Comments
 (0)