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

Commit b5aaeb6

Browse files
committed
Simplify at-cuda implementation.
1 parent c39de57 commit b5aaeb6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/execution.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,11 @@ A device-side launch, aka. dynamic parallelism, is similar but more restricted:
103103
"""
104104
macro cuda(ex...)
105105
# destructure the `@cuda` expression
106-
if length(ex) > 0 && ex[1].head == :tuple
107-
error("The tuple argument to @cuda has been replaced by keywords: `@cuda threads=... fun(args...)`")
108-
end
109106
call = ex[end]
110107
kwargs = ex[1:end-1]
111108

112109
# destructure the kernel call
113-
if call.head != :call
114-
throw(ArgumentError("second argument to @cuda should be a function call"))
115-
end
110+
Meta.isexpr(call, :call) || throw(ArgumentError("second argument to @cuda should be a function call"))
116111
f = call.args[1]
117112
args = call.args[2:end]
118113

0 commit comments

Comments
 (0)