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

Extend parallel algorithms to work with hpx::partitioned_vector et.al. #1338

Open
hkaiser opened this Issue Dec 25, 2014 · 7 comments

Comments

5 participants
@hkaiser
Member

hkaiser commented Dec 25, 2014

The existing parallel algorithms should be extended to seamlessly work with distributed data structures like hpx::partitioned_vector. Unfortunately this requires additional code for each specific algorithms.

For more information about the parallel algorithms already implemented see #1141.

Here is the list of algorithms mandated by N4310 which should be ported to the distributed case:

  • adjacent_difference (see #2859)
  • adjacent_find (see #2859)
  • all_of any_of none_of (see #2859)
  • copy (see #1346) copy_n
  • copy_if
  • move (see #2010)
  • count count_if (see #1340)
  • equal mismatch
  • exclusive_scan inclusive_scan (see #2287)
  • reduce transform (see #2725)
  • fill (#2202)
  • fill_n
  • find find_if find_if_not (see #2792)
  • find_end find_first_of (see #2793)
  • for_each
  • for_each_n (see #2725)
  • generate (see #1968)
  • generate_n
  • inner_product inplace_merge merge
  • is_heap is_heap_until
  • is_partitioned is_sorted is_sorted_until
  • lexicographical_compare
  • max_element min_element minmax_element (#1968)
  • partial_sort partial_sort_copy partition partition_copy nth_element sort stable_partition stable_sort
  • remove remove_copy remove_copy_if remove_if
  • replace replace_copy replace_copy_if replace_if
  • reverse reverse_copy
  • rotate rotate_copy
  • search search_n
  • set_difference set_intersection set_symmetric_difference set_union includes
  • swap_ranges
  • uninitialized_copy uninitialized_copy_n
  • uninitialized_fill uninitialized_fill_n
  • unique unique_copy

These were added by N4310:

  • transform_reduce (see #1333, #2859)
  • transform_exclusive_scan transform_inclusive_scan (see #2725)
@taeguk

This comment has been minimized.

Show comment
Hide comment
@taeguk

taeguk Mar 28, 2017

Member

@hkaiser exclusive_scan and inclusive_scan is not checked although these are already implemented.

Member

taeguk commented Mar 28, 2017

@hkaiser exclusive_scan and inclusive_scan is not checked although these are already implemented.

@hkaiser

This comment has been minimized.

Show comment
Hide comment
@hkaiser

hkaiser Mar 28, 2017

Member

@taeguk right, thanks for the heads-up. Should be fine now.

Member

hkaiser commented Mar 28, 2017

@taeguk right, thanks for the heads-up. Should be fine now.

@hkaiser hkaiser changed the title from Extend parallel algorithms to work with hpx::vector et.al. to Extend parallel algorithms to work with hpx::partitioned_vector et.al. Mar 28, 2017

@taeguk

This comment has been minimized.

Show comment
Hide comment
@taeguk

taeguk Mar 28, 2017

Member

@hkaiser It seems that there are only two distributed data structures. (hpx::partitioned_vector and hpx::unordered_map). Is it right?

Member

taeguk commented Mar 28, 2017

@hkaiser It seems that there are only two distributed data structures. (hpx::partitioned_vector and hpx::unordered_map). Is it right?

@hkaiser

This comment has been minimized.

Show comment
Hide comment
@hkaiser

hkaiser Mar 28, 2017

Member

@hkaiser It seems that there are only two distributed data structures. ( hpx::partitioned_vector and hpx::unordered_map ). Is it right?

Yes. hpx::unordered_map has no iterators implemented yet, however.

Member

hkaiser commented Mar 28, 2017

@hkaiser It seems that there are only two distributed data structures. ( hpx::partitioned_vector and hpx::unordered_map ). Is it right?

Yes. hpx::unordered_map has no iterators implemented yet, however.

@mcopik

This comment has been minimized.

Show comment
Hide comment
@mcopik

mcopik Mar 31, 2017

Contributor

@hkaiser According to the issue progress tracker, transform_*_scan have been added with PR #2287 but it looks that only regular scans have been added there. I don't see transform scans in hpx/parallel/segmented_algorithms.

Contributor

mcopik commented Mar 31, 2017

@hkaiser According to the issue progress tracker, transform_*_scan have been added with PR #2287 but it looks that only regular scans have been added there. I don't see transform scans in hpx/parallel/segmented_algorithms.

@hkaiser

This comment has been minimized.

Show comment
Hide comment
@hkaiser

hkaiser Mar 31, 2017

Member

@mcopik Thanks, I fixed the list above.

Member

hkaiser commented Mar 31, 2017

@mcopik Thanks, I fixed the list above.

@hkaiser hkaiser modified the milestones: 1.0.0, 1.1.0 Apr 23, 2017

ajaivgeorge added a commit to ajaivgeorge/hpx that referenced this issue Jun 21, 2017

Implemented segmented algorithms extending existing parallel algorithms
Tasks completed as part of GSoC project -
  - Moved unit tests for segmented algorithms from component to
    parallel/segmented_algorithms
  - Implemented segmented for_each_n using existing segmented for_each
    along with test
  - Implemented segmented unary transform along with test
  - Implemented 2 versions of segmented binary transform with 4 and 5
    iterators as parameters along with tests for both
  - Implemented segmented reduce along with test
  - Implemented segmented transform_inclusive/exclusive_scan by
    modifying existing inclusive/exculsive_scan to accept one more
    default parameter (unary operator) as input, along with tests
    both
  - modified dispatch in both algorithms/detail and
    segmented_algorithms/detail to add helper functions for output
    inference and casting
See: #1338

@msimberg msimberg removed this from the 1.1.0 milestone Nov 21, 2017

@brjsp

This comment has been minimized.

Show comment
Hide comment
@brjsp

brjsp Apr 2, 2018

Contributor

Actually, copy_n already seems to work: brjsp@694c725

Contributor

brjsp commented Apr 2, 2018

Actually, copy_n already seems to work: brjsp@694c725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment