Describe replicated or contiguous band-group storage.
More...
#include <para_band_output.h>
Describe replicated or contiguous band-group storage.
The layout is constructed collectively on the supplied band domain. Replicated storage designates group 0 as the representative for broadcasting; every group still stores all bands. Distributed storage assigns each contiguous range to the band group that stores it.
◆ ParaBandOutput()
| Parallel::ParaBandOutput::ParaBandOutput |
( |
int | local_nbands, |
|
|
int | global_nbands, |
|
|
const ParaWorld & | band_world ) |
Construct and validate the layout collectively on a valid band domain.
- Parameters
-
| local_nbands | Number of bands stored by this group. |
| global_nbands | Global band count, identical across the domain. |
| band_world | Domain connecting corresponding k-point and PW ranks across band groups. Its communicator must outlive this object. |
◆ band_group()
| int Parallel::ParaBandOutput::band_group |
( |
| ) |
const |
Return the current rank within the band domain.
◆ bands_are_replicated()
| bool Parallel::ParaBandOutput::bands_are_replicated |
( |
| ) |
const |
Return whether every band group stores all global bands.
◆ bcast_band() [1/2]
| void Parallel::ParaBandOutput::bcast_band |
( |
int | global_band, |
|
|
double * | data, |
|
|
int | count ) const |
Broadcast host data from the group owning a global band.
All groups must call in the same band/component order with matching element counts. A serial build validates the band and leaves data unchanged.
- Parameters
-
| global_band | Zero-based global band index. |
| data | Host buffer to broadcast in place. |
| count | Number of elements; zero is allowed. |
◆ bcast_band() [2/2]
| void Parallel::ParaBandOutput::bcast_band |
( |
int | global_band, |
|
|
std::complex< double > * | data, |
|
|
int | count ) const |
Broadcast complex host data with the same contract as the real overload.
◆ gather_matrix()
Obtain a complete matrix on every rank from local band columns. Replicated input is returned locally without synchronizing replicas. Distributed columns are gathered in band-group order; row counts must match across groups. Empty band sets and empty local shards are valid.
- Parameters
-
- Returns
- Complete matrix with global_nbands() columns on every rank.
◆ global_nbands()
| int Parallel::ParaBandOutput::global_nbands |
( |
| ) |
const |
Return the global band count.
◆ local_index()
| int Parallel::ParaBandOutput::local_index |
( |
const int | global_band | ) |
const |
Return a global band's local index on its owner.
◆ local_nbands()
| int Parallel::ParaBandOutput::local_nbands |
( |
| ) |
const |
Return the current band group's local band count.
◆ local_offset()
| int Parallel::ParaBandOutput::local_offset |
( |
| ) |
const |
Return the current band group's global starting offset.
◆ owner_group()
| int Parallel::ParaBandOutput::owner_group |
( |
const int | global_band | ) |
const |
Return the band-domain rank designated as a global band's owner.
◆ band_counts_
| std::vector<int> Parallel::ParaBandOutput::band_counts_ |
|
private |
◆ band_group_
| int Parallel::ParaBandOutput::band_group_ = 0 |
|
private |
◆ band_offsets_
| std::vector<int> Parallel::ParaBandOutput::band_offsets_ |
|
private |
◆ band_world_
| ParaWorld Parallel::ParaBandOutput::band_world_ |
|
private |
◆ bands_are_replicated_
| bool Parallel::ParaBandOutput::bands_are_replicated_ = true |
|
private |
◆ global_nbands_
| int Parallel::ParaBandOutput::global_nbands_ = 0 |
|
private |
◆ local_nbands_
| int Parallel::ParaBandOutput::local_nbands_ = 0 |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_band_output.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_band_output.cpp