Skip to content

Commit b16a84b

Browse files
committed
Disallow scalar iteration during JLArray execution.
1 parent 449eed4 commit b16a84b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/host/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# host-level indexing
22

3-
export allowscalar, @allowscalar, assertscalar
3+
export allowscalar, @allowscalar, @disallowscalar, assertscalar
44

55

66
# mechanism to disallow scalar operations

src/reference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function GPUArrays.gpu_call(::JLBackend, f, args...; blocks::Int, threads::Int)
6868
ctx = JLKernelContext(threads, blocks)
6969
device_args = jlconvert.(args)
7070
tasks = Array{Task}(undef, threads)
71-
@allowscalar for blockidx in 1:blocks
71+
@disallowscalar for blockidx in 1:blocks
7272
ctx.blockidx = blockidx
7373
for threadidx in 1:threads
7474
thread_ctx = JLKernelContext(ctx, threadidx)

0 commit comments

Comments
 (0)