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

Update result_type in set_union.hpp #6644

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

AmanpreetS18
Copy link

@AmanpreetS18 AmanpreetS18 commented Mar 15, 2025

Fixes #6631
1.Fixed the result_type in set_union.hpp as mentioned in issue 6631
2.Changed the 2nd parameter which was FwdIter3 to FwdIter2 as it was getting repeated, might be a type-error!

@StellarBot
Copy link

Can one of the admins verify this patch?

@AmanpreetS18
Copy link
Author

@hkaiser Please review this PR and how can i fix this clang format check which is failing?

@hkaiser
Copy link
Member

hkaiser commented Mar 15, 2025

@AmanpreetS18 please fix the reported clang-format issues:

diff --git a/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp b/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp
index 40ad33d..9c08152 100644
--- a/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp
+++ b/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp
@@ -367,7 +367,8 @@ namespace hpx {
                     !hpx::traits::is_random_access_iterator_v<FwdIter1> ||
                     !hpx::traits::is_random_access_iterator_v<FwdIter2>>;
 
-            using result_type = hpx::parallel::util::in_in_out_result<FwdIter1,FwdIter2, FwdIter3>;
+            using result_type = hpx::parallel::util::in_in_out_result<FwdIter1,
+                FwdIter2, FwdIter3>;
 
             return hpx::parallel::util::get_third_element(
                 hpx::parallel::detail::set_union<result_type>().call2(
@@ -400,7 +401,8 @@ namespace hpx {
             static_assert(hpx::traits::is_output_iterator_v<FwdIter3>,
                 "Requires at least output iterator.");
 
-            using result_type = hpx::parallel::util::in_in_out_result<FwdIter1,FwdIter2, FwdIter3>;
+            using result_type = hpx::parallel::util::in_in_out_result<FwdIter1,
+                FwdIter2, FwdIter3>;
 
             return hpx::parallel::util::get_third_element(
                 hpx::parallel::detail::set_union<result_type>().call(

Copy link

codacy-production bot commented Mar 15, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.56%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0005b92) 237187 203187 85.67%
Head commit (8c78fa8) 193208 (-43979) 164432 (-38755) 85.11% (-0.56%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6644) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@AmanpreetS18
Copy link
Author

@hkaiser Fixed the clang-format issue!

@AmanpreetS18
Copy link
Author

AmanpreetS18 commented Mar 19, 2025

@hkaiser please review this or are there any additional comments

@hkaiser
Copy link
Member

hkaiser commented Mar 19, 2025

I'm not sure why clang-format didn't complain, but inspect did flag some problems:

Details
*Lic* missing Boost license info, or wrong reference text
*SPDX-Lic* missing SPDX license info, or wrong reference text
*C* missing copyright notice
*EOL* invalid (cr only) line-ending
*END* file doesn't end with a newline
*LINK* invalid bookmarks, duplicate bookmarks, invalid urls, broken links, unlinked files
*N* file and directory name issues
*Tabs* tabs in file
*ASCII* non-ASCII chars in file
*APPLE-MACROS* calls to Apple's debugging macros in file
*WINDOWS-MACROS* calls to Windows macros in file
*ASSERT-MACROS* presence of C-style assert macro in file (use HPX_ASSERT instead)
*DEPRECATED-MACROS* presence of deprecated BOOST macro in file (see docs for replacements)
*M* uses of min or max that have not been protected from the min/max macros, or unallowed #undef-s
*U* unnamed namespace in header
*Endline Whitespace* Unnecessary whitespace at end of line
*Line length limit* The line is longer than allowed by the character limit
*I* uses of function without #include'ing corresponding header
*PRAGMA-ONCE* missing #pragma once
*DI* #include'ing deprecated header
*DN* uses of deprecated names
Directories with a file named "hpx-no-inspect" will not be inspected.
Files containing "hpx-no-inspect" will not be inspected.

/
/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp: *Line length limit*: [370](https://github.com/STEllAR-GROUP/hpx/blob/3270c7655d74fc7d75607fdde7ad8067ca29a6a0/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp#L370), [403](https://github.com/STEllAR-GROUP/hpx/blob/3270c7655d74fc7d75607fdde7ad8067ca29a6a0/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp#L403)

@hkaiser
Copy link
Member

hkaiser commented Mar 24, 2025

@AmanpreetS18 inspect is still not happy:

/libs/core/algorithms/examples/hpx/parallel/algorithms/set_union.hpp: *Endline Whitespace*: [369](https://github.com/STEllAR-GROUP/hpx/blob/8c78fa8860879b5ab5c9da0628a327345b8f2069/libs/core/algorithms/examples/hpx/parallel/algorithms/set_union.hpp#L369)
/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp: *Line length limit*: [370](https://github.com/STEllAR-GROUP/hpx/blob/8c78fa8860879b5ab5c9da0628a327345b8f2069/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp#L370), [403](https://github.com/STEllAR-GROUP/hpx/blob/8c78fa8860879b5ab5c9da0628a327345b8f2069/libs/core/algorithms/include/hpx/parallel/algorithms/set_union.hpp#L403)

@hkaiser
Copy link
Member

hkaiser commented Mar 31, 2025

@AmanpreetS18 are you still interested in moving this forward?

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.

set_union incorrect result type
3 participants