Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

mhp basic algorithms and views #634

Open

Description

@lslusarczyk

Summary

Provide selected algorithms and views working on distributed structure.

Concepts

  • A distributed_range is a forward_range with a segments that returns a range of remote_ranges.
  • A remote_range is a forward_range with a rank stating which memory locale it is in.
    distributed_segments

Feature details

The distributed ranges concepts allow algorithms to be implemented in a hierarchical fashion, by decomposing the
distributed range into its segments and applying local versions of algorithms to each segment in parallel. Crucially,
distributed algorithms will be written generically, using only the distributed range concept, and then applied to any data
structure that satisfies the distributed range concept.

The following algorithms are provided by this feature using distributed_vector and MPI backend:

  • for_each
  • for_each_tile
  • copy
  • fill
  • reduce
  • sort
  • inclusive_scan
  • exclusive_scan
  • transform

Views are lightweight objects that usually provide a nonowning, lazily-evaluated view of another range. Views provide the
same range interface as data structures, allowing them to be iterated over and used in algorithms just like normal data structures. In distributed ranges, we provide a set of views that operate on normal ranges, but also on remote and distributed ranges by offering the rank and segments CPOs if they are provided by the underlying base range to which the view is applied.

The following views are provided by this feature using distributed_vector and MPI backend:

  • zip
  • iota
  • take
  • drop
  • counted
  • enumerate
  • transform

Example

distributed_algos_and_views

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions