Skip to content

Commit d6f3e66

Browse files
committed
Readd old definition
1 parent ca11482 commit d6f3e66

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/KernelAbstractions.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,25 @@ macro context()
369369
return esc(:(__ctx__))
370370
end
371371

372+
# Defined to keep cpu support for `__print`
373+
@generated function KernelIntrinsics._print(items...)
374+
str = ""
375+
args = []
376+
377+
for i in 1:length(items)
378+
item = :(items[$i])
379+
T = items[i]
380+
if T <: Val
381+
item = QuoteNode(T.parameters[1])
382+
end
383+
push!(args, item)
384+
end
385+
386+
return quote
387+
print($(args...))
388+
end
389+
end
390+
372391
"""
373392
@print(items...)
374393

0 commit comments

Comments
 (0)