-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Sparse vector/matrix: add fast implementation of find_next and find_prev (fixed) #23317
Commits on Aug 18, 2017
-
Sparse vector/matrix: add fast implementation of find_next and find_prev
Before this commit, find_next() will just use the default implementation of looping over each element. When find_next is called without a function filter as first argument, we *know* that semantics are to find elements x satisfying x != 0, so for sparse matrices/vectors, we may only loop over the stored elements. Some care must be taken for stored zero values; that's the reason for the indirection of _sparse_find_next (which only finds the next stored element) and the actual find_next (which does actual non-zero checks).
Configuration menu - View commit details
-
Copy full SHA for d45df8d - Browse repository at this point
Copy the full SHA d45df8dView commit details -
Sparse findprev/findnext: replace searchsorted(@view...) by searchsor…
…ted(...,lo=,hi=)
Configuration menu - View commit details
-
Copy full SHA for 14f443a - Browse repository at this point
Copy the full SHA 14f443aView commit details
Commits on Aug 19, 2017
-
_sparse_findnext/prev: fix indentation
(Use git blame -w for finding the non-whitespace edits to this code.)
Configuration menu - View commit details
-
Copy full SHA for 92558be - Browse repository at this point
Copy the full SHA 92558beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b54020 - Browse repository at this point
Copy the full SHA 4b54020View commit details
Commits on Aug 29, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 5dde4af - Browse repository at this point
Copy the full SHA 5dde4afView commit details -
Configuration menu - View commit details
-
Copy full SHA for daee267 - Browse repository at this point
Copy the full SHA daee267View commit details
Commits on Nov 3, 2017
-
Merge remote-tracking branch 'origin/master' into sparse-find-next
This fixes a few merge conflicts resulting from other additions to the sparse codebase.
Configuration menu - View commit details
-
Copy full SHA for 1ac4141 - Browse repository at this point
Copy the full SHA 1ac4141View commit details -
Optimized findnext() for sparse: update now that predicate needs to b…
…e explicit Since we now need explicit predicates [1], this optimization only works if we know that the predicate is a function that is false for zero values. As suggested in that pull request, we could find out by calling `f(zero(eltype(array)))` and hoping that `f` is pure, but I like being a bit more conservative and only applying this optimization only to the case where we *know* `f` is equal to `!iszero`. For clarity, this commit also renames the helper method _sparse_findnext() to _sparse_findnextnz(), because now that the predicate-less version doesn't exist anymore, the `nz` part isn't implicit anymore either. [1]: JuliaLang#23812
Configuration menu - View commit details
-
Copy full SHA for fe4b76e - Browse repository at this point
Copy the full SHA fe4b76eView commit details
Commits on Nov 10, 2017
-
sparse findnext()/findprev(): remove code duplication
Thanks to @Sacha0 for the suggestion!
Configuration menu - View commit details
-
Copy full SHA for 132ff27 - Browse repository at this point
Copy the full SHA 132ff27View commit details
Commits on Nov 14, 2017
-
sparse findnext()/findprev(): better type stability for exotic index …
…types This mostly means returning `zero(indtype(...))` instead of `0` in the not-found case. In addition, this commit replaces a few `== 0` checks by `iszero()` to avoid unnecessary promotions. We could similarly replace `+ 1` by `+ one(...)` but that becomes cumbersome very quickly.
Configuration menu - View commit details
-
Copy full SHA for 85bc773 - Browse repository at this point
Copy the full SHA 85bc773View commit details
Commits on Jan 4, 2018
-
Configuration menu - View commit details
-
Copy full SHA for a33abbe - Browse repository at this point
Copy the full SHA a33abbeView commit details
Commits on Jan 6, 2018
-
Fix sparse findprev()/findnext() for sub2ind deprecation
This is needed in response to JuliaLang#24715.
Configuration menu - View commit details
-
Copy full SHA for db62ae4 - Browse repository at this point
Copy the full SHA db62ae4View commit details