Skip to content

Commit

Permalink
conforming to conventions for :code:foo vs foo
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Hoeflinger <[email protected]>
  • Loading branch information
danhoeflinger committed Aug 20, 2024
1 parent df2a94b commit 91d46fd
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions source/elements/oneDPL/source/parallel_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,27 +532,27 @@ The elements of ``[start, end)`` must be partitioned with respect to the compara
histogram(Policy&& exec, InputIt1 start, InputIt1 end, InputIt2 boundary_start,
InputIt2 boundary_end, OutputIt histogram_first); // (2)
:code:`oneapi::dpl::histogram` computes the histogram over the data in :code:`[start, end)`
``oneapi::dpl::histogram`` computes the histogram over the data in ``[start, end)``
by counting the number of elements that map to each of a set of bins and storing the counts into
the output sequence starting from :code:`histogram_first`. Input values that do not map to a defined
bin are skipped silently. The value type of :code:`OutputIt` must be an integral type of sufficient
the output sequence starting from ``histogram_first``. Input values that do not map to a defined
bin are skipped silently. The value type of ``OutputIt`` must be an integral type of sufficient
size to store the counts of the histogram without overflow. The return value is an iterator targeting
past the last element of the output sequence starting from :code:`histogram_first`.

1. The elements of :code:`[start, end)` are mapped into :code:`num_intervals` bins that evenly divide the range
:code:`[first_interval_begin, last_interval_end)`. Each bin is of size
:code:`bin_size = (last_interval_end - first_interval_begin) / num_intervals` as represented by a real
number without rounding or truncation. An input element :code:`start[i]` maps to a bin
:code:`histogram_first[j]` if and only if
:code:`(first_interval_begin + j * bin_size <= start[i]) && (start[i] < first_interval_begin + (j + 1) * bin_size)`.
`ValueType` must be an arithmetic type. The value type of :code:`InputIt` must be an arithmetic type.

2. The elements of :code:`[start, end)` are mapped into :code:`(boundary_end - boundary_start - 1)`
bins defined by the values in :code:`[boundary_start, boundary_end)`. An input
element :code:`start[i]` maps to a bin :code:`histogram_first[j]` if and only if
:code:`(boundary_start[j] <= start[i]) && (start[i] < boundary_start[j + 1])`. The value types
of :code:`InputIt1` and :code:`InputIt2` must be arithmetic types. The values in
:code:`[boundary_start, boundary_end)` must be sorted with respect to :code:`operator<`.
past the last element of the output sequence starting from ``histogram_first``.

1. The elements of ``[start, end)`` are mapped into ``num_intervals`` bins that evenly divide the range
``[first_interval_begin, last_interval_end)``. Each bin is of size
``bin_size = (last_interval_end - first_interval_begin) / num_intervals`` as represented by a real
number without rounding or truncation. An input element ``start[i]`` maps to a bin
``histogram_first[j]`` if and only if
``(first_interval_begin + j * bin_size <= start[i]) && (start[i] < first_interval_begin + (j + 1) * bin_size)``.
`ValueType` must be an arithmetic type. The value type of ``InputIt`` must be an arithmetic type.

2. The elements of ``[start, end)`` are mapped into ``(boundary_end - boundary_start - 1)``
bins defined by the values in ``[boundary_start, boundary_end)``. An input
element ``start[i]`` maps to a bin ``histogram_first[j]`` if and only if
``(boundary_start[j] <= start[i]) && (start[i] < boundary_start[j + 1])``. The value types
of ``InputIt1`` and ``InputIt2`` must be arithmetic types. The values in
``[boundary_start, boundary_end)`` must be sorted with respect to ``operator<``.

.. _`C++ Standard`: https://isocpp.org/std/the-standard
.. _`SYCL`: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html

0 comments on commit 91d46fd

Please sign in to comment.