Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Drop specific typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Sep 16, 2019
1 parent d8e4a26 commit b38f5cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ function Base.reverse(input::CuArray{T, N}; dims::Integer) where {T, N}
index_in = offset_in + threadIdx().x

# the index of an element in the original array along dimension that we will flip
ik = ((UInt32(ceil(index_in / numelemsinprevdims)) - 1) % numelemsincurrdim) + 1
index_out = UInt32(index_in + (numelemsincurrdim - 2ik + 1) * numelemsinprevdims)
ik = ((ceil(index_in / numelemsinprevdims) - 1) % numelemsincurrdim) + 1

index_out = index_in + (numelemsincurrdim - 2ik + 1) * numelemsinprevdims

if 1 index_in length(input) && 1 index_out length(output)
@inbounds output[index_out] = input[index_in]
Expand Down

0 comments on commit b38f5cf

Please sign in to comment.