Skip to content

Commit

Permalink
first version of fill_cache; TODO: fix this
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha committed Jun 26, 2018
1 parent a70522c commit b9c4206
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/auxiliary_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ function clear_cache()
return err
end

#function fill_cache(device::cl.CL_device_id)
# ccall((:CLBlastFillCache, libCLBlast), cl.CL_int, (cl.CL_device_id), device)
#end
function fill_cache(device::cl.Device)
err = ccall((:CLBlastFillCache, libCLBlast), cl.CL_int, (cl.CL_device_id,), pointer(device))
if err != cl.CL_SUCCESS
println(STDERR, "Calling function `fill_cache($device)` failed!")
throw(cl.CLError(err))
end
return err
end
2 changes: 1 addition & 1 deletion test/auxiliary_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ for error_code in keys(CLBlast._clblast_status_codes)
end

CLBlast.clear_cache()
#CLBlast.fill_cache()
CLBlast.fill_cache(device)

0 comments on commit b9c4206

Please sign in to comment.