Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP/RFC: Conversion/elimination of sort related functions (cf. #1850, #1539) #2066

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base/combinatorics.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Sort.@in_place_matrix_op
#import Sort.@in_place_matrix_op

function factorial(n::Integer)
if n < 0
Expand Down Expand Up @@ -70,7 +70,7 @@ function shuffle!(a::AbstractVector)
return a
end

@in_place_matrix_op shuffle
#@in_place_matrix_op shuffle

function randperm(n::Integer)
a = Array(typeof(n), n)
Expand Down
2 changes: 1 addition & 1 deletion base/darray2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ myindexes(d::DArray) = d.indexes[localpiece(d)]

# find which piece holds index (I...)
function locate(d::DArray, I::Int...)
ntuple(ndims(d), i->search_sorted_last(d.cuts[i], I[i]))
ntuple(ndims(d), i->searchsortedlast(d.cuts[i], I[i]))
end

chunk{T,N,A}(d::DArray{T,N,A}, i...) = fetch(d.chunks[i...])::A
Expand Down
42 changes: 23 additions & 19 deletions base/export.jl
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ export
ipermute,
isperm,
issorted,
issorted_r,
issorted_by,
issortedr,
issortedby,
last,
linspace,
logspace,
Expand Down Expand Up @@ -614,34 +614,38 @@ export
rot90,
rotl90,
rotr90,
search_sorted,
search_sorted_r,
search_sorted_by,
search_sorted_first,
search_sorted_first_r,
search_sorted_first_by,
search_sorted_last,
search_sorted_last_r,
search_sorted_last_by,
searchsorted,
searchsortedr,
searchsortedby,
searchsortedfirst,
searchsortedfirstr,
searchsortedfirstby,
searchsortedlast,
searchsortedlastr,
searchsortedlastby,
select,
select_r,
select_by,
selectr,
selectby,
select!,
select_r!,
select_by!,
selectr!,
selectby!,
shuffle,
shuffle!,
size,
slice,
slicedim,
sort,
sort!,
sort_by,
sort_by!,
sortperm,
sortperm!,
sortby,
sortby!,
sortr,
sortr!,
sortperm,
sortperm!,
sortpermby,
sortpermby!,
sortpermr,
sortpermr!,
squeeze,
step,
stride,
Expand Down
Loading