Public Types | Static Public Member Functions | Public Attributes | List of all members
rapidsmpf::streaming::PartitioningSpec Struct Reference

Partitioning specification for a single hierarchical level. More...

#include <channel_metadata.hpp>

Public Types

enum class  Type : std::uint8_t { NONE , INHERIT , HASH , ORDER }
 Type tag for PartitioningSpec. More...
 

Static Public Member Functions

static PartitioningSpec none ()
 Create a spec indicating no partitioning information. More...
 
static PartitioningSpec inherit ()
 Create a spec indicating partitioning passes through from parent. More...
 
static PartitioningSpec from_hash (HashScheme h)
 Create a spec for hash partitioning. More...
 
static PartitioningSpec from_order (OrderScheme o)
 Create a spec for order/range partitioning. More...
 

Public Attributes

Type type = Type::NONE
 The type of partitioning.
 
std::optional< HashSchemehash
 Valid only when type == HASH.
 
std::optional< OrderSchemeorder
 Valid only when type == ORDER.
 

Detailed Description

Partitioning specification for a single hierarchical level.

Represents how data is partitioned at one level of the hierarchy (e.g., inter-rank or local). Use the static factory methods to construct.

Definition at line 143 of file channel_metadata.hpp.

Member Enumeration Documentation

◆ Type

Type tag for PartitioningSpec.

Enumerator
NONE 

No partitioning information at this level.

INHERIT 

Partitioning is inherited from parent level unchanged.

HASH 

Hash partitioning.

ORDER 

Order/range partitioning.

Definition at line 147 of file channel_metadata.hpp.

Member Function Documentation

◆ from_hash()

static PartitioningSpec rapidsmpf::streaming::PartitioningSpec::from_hash ( HashScheme  h)
inlinestatic

Create a spec for hash partitioning.

Parameters
hThe hash scheme to use.
Returns
A PartitioningSpec with type HASH.

Definition at line 179 of file channel_metadata.hpp.

◆ from_order()

static PartitioningSpec rapidsmpf::streaming::PartitioningSpec::from_order ( OrderScheme  o)
static

Create a spec for order/range partitioning.

Parameters
oThe order scheme to use. o.keys must be non-empty; otherwise throws std::invalid_argument.
Returns
A PartitioningSpec with type ORDER.

◆ inherit()

static PartitioningSpec rapidsmpf::streaming::PartitioningSpec::inherit ( )
inlinestatic

Create a spec indicating partitioning passes through from parent.

Returns
A PartitioningSpec with type INHERIT.

Definition at line 170 of file channel_metadata.hpp.

◆ none()

static PartitioningSpec rapidsmpf::streaming::PartitioningSpec::none ( )
inlinestatic

Create a spec indicating no partitioning information.

Returns
A PartitioningSpec with type NONE.

Definition at line 162 of file channel_metadata.hpp.


The documentation for this struct was generated from the following file: