Skip to content

Commit

Permalink
Merge pull request #313 from yuehhua/refactor
Browse files Browse the repository at this point in the history
Avoiding scalar indexing in cuda
  • Loading branch information
DhairyaLGandhi authored Apr 15, 2021
2 parents 2c3bdb8 + 63b6b64 commit c30ea9b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils.jl
Original file line number Diff line number Diff line change
@@ -12,7 +12,4 @@ Return the maximum value for each dimension. An array of dimensions `dims` is ac
The maximum of each dimension in the element is computed.
"""
maximum_dims(dims::AbstractArray{<:Integer}) = (maximum(dims), )

function maximum_dims(dims::AbstractArray{<:Tuple})
Tuple(maximum(xs) for xs in zip(dims...))
end
maximum_dims(dims::AbstractArray{NTuple{N, T}}) where {N,T} = ntuple(i -> maximum(x->x[i], dims), N)

0 comments on commit c30ea9b

Please sign in to comment.