From 52a6e701183a0324a408db0ae7bb9be00d3037e8 Mon Sep 17 00:00:00 2001 From: SimonDanisch Date: Thu, 23 Mar 2017 11:13:42 +0100 Subject: [PATCH] refs need to be typed --- src/kernel.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel.jl b/src/kernel.jl index 9f824f02..e378dfde 100644 --- a/src/kernel.jl +++ b/src/kernel.jl @@ -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 @@ -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