Loading...
Searching...
No Matches
q3::execution::BandPartition Struct Reference

#include <init.hpp>

Public Attributes

std::vector< int > counts
 
std::vector< int > displacements
 
int local_first_band = 0
 
int local_number_of_bands = 0
 

Detailed Description

A contiguous, near-equal division of bands across the ranks sharing them.

counts and displacements are in complex elements (bands multiplied by elements_per_band) so they can be handed straight to ExecutionPolicy::allgather_across_bands. The remainder is spread one unit per rank over the lowest ranks rather than dumped on the last one, which keeps the longest local block as short as possible – the batch is only finished when the slowest rank is.

band_granularity is the number of bands that must stay together on one rank. It exists for the gamma-only Hamiltonian, which packs two real wavefunctions into the real and imaginary parts of a single complex transform and so walks bands in pairs. Splitting 130 bands as 65 and 65 hands both ranks an odd count, which breaks that pairing and makes each rank compute a different result from the serial one. Passing 2 keeps every rank's block even, so the pairing – and the arithmetic – match serial exactly.

Definition at line 45 of file init.hpp.

Member Data Documentation

◆ counts

std::vector<int> q3::execution::BandPartition::counts

◆ displacements

std::vector<int> q3::execution::BandPartition::displacements

◆ local_first_band

int q3::execution::BandPartition::local_first_band = 0

◆ local_number_of_bands

int q3::execution::BandPartition::local_number_of_bands = 0

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