Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Simplify at-cuda implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Mar 3, 2020
1 parent e95a15b commit 178ce3f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,11 @@ A device-side launch, aka. dynamic parallelism, is similar but more restricted:
"""
macro cuda(ex...)
# destructure the `@cuda` expression
if length(ex) > 0 && ex[1].head == :tuple
error("The tuple argument to @cuda has been replaced by keywords: `@cuda threads=... fun(args...)`")
end
call = ex[end]
kwargs = ex[1:end-1]

# destructure the kernel call
if call.head != :call
throw(ArgumentError("second argument to @cuda should be a function call"))
end
Meta.isexpr(call, :call) || throw(ArgumentError("second argument to @cuda should be a function call"))
f = call.args[1]
args = call.args[2:end]

Expand Down

0 comments on commit 178ce3f

Please sign in to comment.