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

make cumsum call cumsum! #9683

Merged
merged 1 commit into from
Jan 8, 2015
Merged

make cumsum call cumsum! #9683

merged 1 commit into from
Jan 8, 2015

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Jan 8, 2015

See #9665: this makes cumsum! and cumsum use the same pairwise code for 1d arrays (whereas previously cumsum! used a completely different codepath based on the one for multidimensional arrays, which just does naive summation). Ideally, we'd use the pairwise algorithm for multidimensional arrays too, but that requires a much bigger code rewrite. Also updates the docs to mention using cumsum! to control the precision.

cc: @timholy, @ivarne

@timholy
Copy link
Sponsor Member

timholy commented Jan 8, 2015

LGTM

@tkelman
Copy link
Contributor

tkelman commented Jan 8, 2015

Wonder why appveyor is not building on this? Might need a force re-push to try again?

stevengj added a commit that referenced this pull request Jan 8, 2015
@stevengj stevengj merged commit 29c64d1 into JuliaLang:master Jan 8, 2015
@tkelman
Copy link
Contributor

tkelman commented Jan 16, 2015

Should this be backported along with #9650?

@stevengj
Copy link
Member Author

It could be, I suppose. It's an accuracy improvement without changing any API.

@tkelman
Copy link
Contributor

tkelman commented Jan 18, 2015

nevermind on backporting, caused a test failure:

exception on 9: ERROR: test error during isequal(cumsum(A),A1)
`cumsum` has no method matching cumsum(::Array{Int64,3})
 in anonymous at test.jl:62
 in do_test at test.jl:37
 in anonymous at no file:394
 in runtests at C:\cygwin64\home\MPC_CAR\julia\test\testdefs.jl:5
 in anonymous at multi.jl:855
 in run_work_thunk at multi.jl:621
 in anonymous at task.jl:855
while loading arrayops.jl, in expression starting on line 388
ERROR: test error during isequal(cumsum(A),A1)
`cumsum` has no method matching cumsum(::Array{Int64,3})
while loading arrayops.jl, in expression starting on line 388
while loading C:\cygwin64\home\MPC_CAR\julia\test\runtests.jl, in expression starting on line 39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants