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

Reduction functions with pre-allocated output storage. #6197

Merged
merged 4 commits into from
Mar 18, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add an entry to NEWS.md about the reduction functions that allow pre-…
…allocated output
  • Loading branch information
lindahua committed Mar 18, 2014
commit b2e25f97efb3a6293c0025faed9b7c70a596cb24
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ Deprecated or removed

* `read` methods that modify a passed array are now called `read!` ([#5970])

* Reduction functions that accept a pre-allocated output array, including
`sum!`, `prod!`, `maximum!`, `minimum!`, `all!`, `any!` ([#6197])

[#4042]: https://github.com/JuliaLang/julia/issues/4042
[#5164]: https://github.com/JuliaLang/julia/issues/5164
[#4026]: https://github.com/JuliaLang/julia/issues/4026
Expand Down
18 changes: 12 additions & 6 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ Iterable Collections

.. function:: maximum!(r, A)

Compute the maximum value of ``A`` over the singleton dimensions of ``r``, and write results to ``r``.
Compute the maximum value of ``A`` over the singleton dimensions of ``r``,
and write results to ``r``.

.. function:: minimum(itr)

Expand All @@ -574,7 +575,8 @@ Iterable Collections

.. function:: minimum!(r, A)

Compute the minimum value of ``A`` over the singleton dimensions of ``r``, and write results to ``r``.
Compute the minimum value of ``A`` over the singleton dimensions of ``r``,
and write results to ``r``.

.. function:: extrema(itr)

Expand Down Expand Up @@ -607,7 +609,8 @@ Iterable Collections

.. function:: sum!(r, A)

Sum elements of ``A`` over the singleton dimensions of ``r``, and write results to ``r``.
Sum elements of ``A`` over the singleton dimensions of ``r``,
and write results to ``r``.

.. function:: sum(f, itr)

Expand All @@ -623,7 +626,8 @@ Iterable Collections

.. function:: prod!(r, A)

Multiply elements of ``A`` over the singleton dimensions of ``r``, and write results to ``r``.
Multiply elements of ``A`` over the singleton dimensions of ``r``,
and write results to ``r``.

.. function:: any(itr) -> Bool

Expand All @@ -635,7 +639,8 @@ Iterable Collections

.. function:: any!(r, A)

Test whether any values in ``A`` along the singleton dimensions of ``r`` are true, and write results to ``r``.
Test whether any values in ``A`` along the singleton dimensions of ``r`` are true,
and write results to ``r``.

.. function:: all(itr) -> Bool

Expand All @@ -647,7 +652,8 @@ Iterable Collections

.. function:: all!(r, A)

Test whether all values in ``A`` along the singleton dimensions of ``r`` are true, and write results to ``r``.
Test whether all values in ``A`` along the singleton dimensions of ``r`` are true,
and write results to ``r``.

.. function:: count(p, itr) -> Integer

Expand Down