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

bindings for hpx/algorithm.hpp #7

Merged
merged 20 commits into from
Sep 1, 2024
Merged

Conversation

pingu-73
Copy link
Contributor

@pingu-73 pingu-73 commented Jul 17, 2024

Algos Done:

  • hpx::copy
  • hpx::copy_if
  • hpx::copy_n
  • hpx::count
  • hpx::count_if
  • hpx::ends_with
  • hpx::equal
  • hpx::fill (only works with linear vectors)
  • hpx::find
  • hpx::sort (with & without comparator)
  • hpx::merge
  • hpx::partial_sort (with and without comparator)

Signed-off-by: Dikshant <[email protected]>
Signed-off-by: Dikshant <[email protected]>
@pingu-73
Copy link
Contributor Author

pingu-73 commented Jul 17, 2024

@SAtacker my hpx::copy_n is wrong, currently for first argument(as per docs refer to beginning of the sequence of elements) it would consider starting of src vec.
To start copying from some other location in the src vector should i:

  • increase arguments and add a offset variable
  • or use slice?

Signed-off-by: Dikshant <[email protected]>
Signed-off-by: Dikshant <[email protected]>
hpx-sys/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Dikshant <[email protected]>
Signed-off-by: Dikshant <[email protected]>
@pingu-73 pingu-73 marked this pull request as ready for review July 22, 2024 08:28
@pingu-73 pingu-73 requested a review from SAtacker July 22, 2024 08:30
hpx-sys/include/wrapper.h Outdated Show resolved Hide resolved
@SAtacker
Copy link
Contributor

SAtacker commented Jul 22, 2024

@SAtacker my hpx::copy_n is wrong, currently for first argument(as per docs refer to beginning of the sequence of elements) it would consider starting of src vec. To start copying from some other location in the src vector should i:

  • increase arguments and add a offset variable
  • or use slice?

I don't have a preference given my limited experience with rust. I would prefer efficiency i.e. instead of creating an expensive temporary allocated array with vec.begin()+offset as starting element I would prefer no-copy reference to the remaining part of the elements since it is a copy operation. Does that makes sense, or did I miss anything?

@pingu-73 pingu-73 marked this pull request as draft July 23, 2024 11:54
@pingu-73 pingu-73 requested a review from SAtacker July 31, 2024 06:58
@pingu-73 pingu-73 marked this pull request as ready for review July 31, 2024 06:58
Copy link
Contributor

@SAtacker SAtacker left a comment

Choose a reason for hiding this comment

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

Please use the src vector instead of the cpp_src avoiding reconstruction.

hpx-sys/include/wrapper.h Outdated Show resolved Hide resolved
hpx-sys/include/wrapper.h Outdated Show resolved Hide resolved
hpx-sys/include/wrapper.h Outdated Show resolved Hide resolved
@pingu-73
Copy link
Contributor Author

pingu-73 commented Aug 29, 2024

@SAtacker this is the code-coverage report using cargo-llvm-cov

The following functions are not covered:

  • finalize_with_timeout
  • terminate
  • disconnect
  • disconnect_with_timeout
  • merge
Screenshot 2024-08-29 at 9 10 47 PM

@SAtacker SAtacker merged commit 4bb45f8 into STEllAR-GROUP:main Sep 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants