Skip to content

Commit

Permalink
refs need to be typed
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch authored and vchuravy committed Mar 27, 2017
1 parent 5ef373d commit 52a6e70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end

function set_arg!(k::Kernel, idx::Integer, arg::CLMemObject)
@assert idx > 0
arg_boxed = Ref(arg.id)
arg_boxed = Ref{typeof(arg.id)}(arg.id)
@check api.clSetKernelArg(k.id, cl_uint(idx-1), sizeof(CL_mem), arg_boxed)
return k
end
Expand All @@ -90,7 +90,7 @@ function set_arg!{T}(k::Kernel, idx::Integer, arg::T)
if !isbits(T) # TODO add more thorough mem layout checks and the clang stuff
error("Only isbits types allowed. Found: $T")
end
boxed_arg = Ref(arg)
boxed_arg = Ref{T}(arg)
@check api.clSetKernelArg(k.id, cl_uint(idx - 1), sizeof(T), boxed_arg)
return k
end
Expand Down

0 comments on commit 52a6e70

Please sign in to comment.