## Function template partial_sum

boost::compute::partial_sum

## Synopsis

template<typename InputIterator, typename OutputIterator>
OutputIterator
partial_sum(InputIterator first, InputIterator last, OutputIterator result,
command_queue & queue = system::default_queue());

## Description

Calculates the cumulative sum of the elements in the range [`first`

, `last`

) and writes the resulting values to the range beginning at `result`

.

Space complexity on GPUs: \Omega(n)

Space complexity on GPUs when `first`

== `result:`

\Omega(2n)

Space complexity on CPUs: \Omega(1)