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

[oneDPL] Histogram APIs #546

Conversation

danhoeflinger
Copy link
Contributor

@danhoeflinger danhoeflinger commented Jun 17, 2024

Proposing oneapi::dpl::histogram specification for oneDPL.

@danhoeflinger danhoeflinger changed the title Dev/dhoeflin/one dpl histogram [oneDPL] Histogram Jun 17, 2024
@danhoeflinger danhoeflinger changed the title [oneDPL] Histogram [oneDPL] Histogram APIs Jun 17, 2024
@akukanov akukanov added the DPL label Aug 12, 2024
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
source/elements/oneDPL/source/parallel_api.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@akukanov akukanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add the description of the return value.

@danhoeflinger
Copy link
Contributor Author

danhoeflinger commented Aug 16, 2024

Let's also add the description of the return value.

added.

danhoeflinger and others added 20 commits August 20, 2024 14:23
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@@ -519,5 +519,40 @@ than an element in the range being searched.

The elements of ``[start, end)`` must be partitioned with respect to the comparator used.

.. code:: cpp

template <typename Policy, typename InputIt, typename Size, typename OutputIt,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest swapping the order of OutputIt and ValueType to be consistent with their use in the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have caught something here that is a problem.
I have a proposal to fix it, but I think we want to do more than just reorder the template parameters.

Instead of having a free floating ValueType template parameter. I believe we should instead directly use std::iterator_traits<InputIt>::value_type as the type of first_interval_begin and last_interval_end.

I think it is better for force users to provide bounds which are convertible to the value_type of the input sequence, and do the conversion once when accepting the arguments rather than each time in the comparison operator. This will change the signature and some of the language. I have updated it accordingly, please take a look.

Also, while this is not the same exact API as what is currently implemented in oneDPL, it is not incompatible with the existing implementation's API. I believe we can continue to support that API as an extension without a breaking change, but lets discuss that in the implementation PR, which will be up shortly.

…ence

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger
Copy link
Contributor Author

We have decided to instead go with #571 in an offline discussion. closing this.

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

Successfully merging this pull request may close these issues.

3 participants