@@ -17,8 +17,8 @@ function _reverse(input::AnyGPUArray{T, N}, output::AnyGPUArray{T, N};
1717
1818 # # COV_EXCL_START
1919 @kernel unsafe_indices= true function kernel (input, output)
20- offset_in = Int32 (@groupsize ()[ 1 ] ) * (@index (Group, Linear) - 1 i32)
21- index_in = offset_in + @index (Local, Linear)
20+ offset_in = Int32 (KI . get_local_size () . x ) * (KI . get_group_id () . x - 1 i32)
21+ index_in = offset_in + KI . get_local_id () . x
2222
2323 @inbounds if index_in <= length (input)
2424 idx = Tuple (nd_idx[index_in])
@@ -31,7 +31,7 @@ function _reverse(input::AnyGPUArray{T, N}, output::AnyGPUArray{T, N};
3131
3232 nthreads = 256
3333
34- kernel (get_backend (input), nthreads )(input, output; ndrange= length (input))
34+ kernel (get_backend (input))(input, output; ndrange= length (input), nthreads )
3535end
3636
3737# in-place version, swapping elements on half the number of threads
@@ -52,8 +52,8 @@ function _reverse!(data::AnyGPUArray{T, N}; dims=1:ndims(data)) where {T, N}
5252
5353 # # COV_EXCL_START
5454 @kernel unsafe_indices= true function kernel (data)
55- offset_in = Int32 (@groupsize ()[ 1 ] ) * (@index (Group, Linear) - 1 i32)
56- index_in = offset_in + @index (Local, Linear)
55+ offset_in = Int32 (KI . get_local_size () . x ) * (KI . get_group_id () . x - 1 i32)
56+ index_in = offset_in + KI . get_local_id () . x
5757
5858 @inbounds if index_in <= reduced_length
5959 idx = Tuple (nd_idx[index_in])
@@ -77,7 +77,7 @@ function _reverse!(data::AnyGPUArray{T, N}; dims=1:ndims(data)) where {T, N}
7777
7878 nthreads = 256
7979
80- kernel (get_backend (data), nthreads )(data; ndrange= length (data))
80+ kernel (get_backend (data))(data; ndrange= length (data), nthreads )
8181end
8282
8383
0 commit comments