File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ Creates a private local of `mem` per item in the workgroup. This can be safely u
190
190
across [`@synchronize`](@ref) statements.
191
191
"""
192
192
macro private (expr)
193
- expr
193
+ esc ( expr)
194
194
end
195
195
196
196
"""
Original file line number Diff line number Diff line change 1
1
using KernelAbstractions
2
2
using Test
3
3
4
+ @kernel function stmt_form ()
5
+ @uniform bs = @groupsize ()[1 ]
6
+ @private s = bs ÷ 2
7
+ @synchronize
8
+ end
9
+
4
10
@kernel function typetest (A, B)
5
11
priv = @private eltype (A) (1 ,)
6
12
I = @index (Global, Linear)
54
60
55
61
function private_testsuite (backend, ArrayT)
56
62
@testset " kernels" begin
63
+ wait (stmt_form (backend (), 16 )(ndrange= 16 ))
57
64
A = ArrayT {Int} (undef, 64 )
58
65
wait (private (backend (), 16 )(A, ndrange= size (A)))
59
66
@test all (A[1 : 16 ] .== 16 : - 1 : 1 )
You can’t perform that action at this time.
0 commit comments