Skip to content

Replacement of internal lambda in oneDPL code by functional objects #2153

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

Merged
merged 47 commits into from
Apr 15, 2025

Conversation

SergeyKopienko
Copy link
Contributor

@SergeyKopienko SergeyKopienko commented Mar 31, 2025

In this PR we reimplements lambda code as functional objects according to our offline discussion.

Other linked PR's: #2148, #2152

@SergeyKopienko SergeyKopienko added this to the 2022.9.0 milestone Mar 31, 2025
@SergeyKopienko SergeyKopienko marked this pull request as draft March 31, 2025 13:52
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/move_lambdas_out branch 6 times, most recently from 162526f to 78250d2 Compare March 31, 2025 16:09
@SergeyKopienko SergeyKopienko marked this pull request as ready for review March 31, 2025 16:10
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/move_lambdas_out branch 6 times, most recently from 0db580a to 5813665 Compare March 31, 2025 17:25
@SergeyKopienko SergeyKopienko changed the title Re-implement lambda code as functional objects Replace internal lambda's in oneDPL code by functional objects Mar 31, 2025
@SergeyKopienko SergeyKopienko changed the title Replace internal lambda's in oneDPL code by functional objects Replace internal lambdas in oneDPL code by functional objects Mar 31, 2025
@SergeyKopienko SergeyKopienko changed the title Replace internal lambdas in oneDPL code by functional objects Replace internal lambda in oneDPL code by functional objects Mar 31, 2025
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/move_lambdas_out branch from 7b3e2be to c0ca621 Compare April 2, 2025 10:58
@SergeyKopienko SergeyKopienko changed the title Replace internal lambda in oneDPL code by functional objects Replacement of internal lambda in oneDPL code by functional objects Apr 3, 2025
…eview comment: using one __pattern_transform_unary_op instead of __pattern_for_each_fn
…eview comment: using __pattern_transform_unary_op instead of __pattern_find_if_pred
…eview comment: using __pattern_transform_unary_op instead of __pattern_any_of_pred
…eview comment: using __pattern_transform_binary_op instead of __pattern_equal_pred and __pattern_search_pred
…eview comment: using __pattern_transform_fn instead of __pattern_adjacent_find_ranges_pred
…eview comment: using __pattern_transform_fn instead of __pattern_is_sorted_pred
…eview comment: using __pattern_transform_unary_op instead of __pattern_count_if_pred
…eview comment: using __pattern_transform_unary_op instead of __pattern_copy_if_ranges_pred
…eview comment: using __pattern_transform_binary_op instead of __pattern_merge_comp
…eview comment: using __pattern_transform_binary_op instead of __pattern_min_element_comp
…eview comment: using __transform_functor instead of __pattern_adjacent_difference_op_caller_fn
…ment: using __transform_functor instead of __pattern_adjacent_difference_op_caller_fn
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/move_lambdas_out branch from 7284c47 to 97915de Compare April 15, 2025 13:31
…view comment: using __transform_functor instead of __transform_fn and __transform_fn2"

This reverts commit 0ceb34b.
… - fix review comment: using __transform_functor instead of __pattern_adjacent_difference_op_caller_fn"

This reverts commit a3d3e30.

# Conflicts:
#	include/oneapi/dpl/pstl/hetero/numeric_impl_hetero.h
…lf review comment: move __parallel_reduce_by_segment_fallback_fn1 and __parallel_reduce_by_segment_fallback_fn2 into __internal namespace
@MikeDvorskiy
Copy link
Contributor

I think, we should the device copyable trait specialization (see sycl_traits.h) for the new functors, probably not for all, but for mostly.

Copy link
Contributor

@MikeDvorskiy MikeDvorskiy left a comment

Choose a reason for hiding this comment

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

LGTM
But CI and (the all our test) should be passed before merging.

@SergeyKopienko SergeyKopienko merged commit b2441dd into main Apr 15, 2025
19 checks passed
@SergeyKopienko SergeyKopienko deleted the dev/skopienko/move_lambdas_out branch April 15, 2025 20:15
timmiesmith pushed a commit that referenced this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants