We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07b50a4 commit 21ccac6Copy full SHA for 21ccac6
src/sorting.jl
@@ -543,3 +543,9 @@ end
543
function Base.partialsort(c::AnyCuArray, k::Union{Integer, OrdinalRange}; kwargs...)
544
return partialsort!(copy(c), k; kwargs...)
545
end
546
+
547
+function Base.sortperm(c::AnyCuVector; by=identity, kw...)
548
+ tups = tuple.(c, eachindex(c))
549
+ sort!(tups, by=by∘first, kw...)
550
+ return last.(tups)
551
+end
0 commit comments