Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
GlobalOrder Class Reference

Items (cells, nodes) spread over the ranks, each with a global id in [0, n_global), regrouped so that rank r holds the ids [block_begin(n_global, r, p), block_begin(n_global, r + 1, p)) in order. An id may come from several ranks (shared nodes); it then takes any one of their values, so they should agree. Ids no rank sends are left zero. Without distributed, this rank holds every id and the regrouping is a local permutation (not collective). More...

#include <global_order.h>

Public Member Functions

 GlobalOrder ()=default
 
 GlobalOrder (std::span< const uint64_t > ids, uint64_t n_global, bool distributed)
 Plan for the items with these global ids (collective if distributed).
 
uint64_t n_global () const
 
uint64_t first () const
 
uint64_t size () const
 
template<typename T >
std::vector< T > gather (std::span< const T > values, uint32_t width) const
 This rank's block, width values per id, from the values (width per item) of the plan's items (collective if distributed).
 
std::pair< std::vector< uint64_t >, std::vector< uint64_t > > gather_csr (std::span< const uint64_t > offsets, std::span< const uint64_t > values) const
 Like gather, for items of different lengths (CSR offsets into values); returns the block's offsets (from 0) and values.
 

Detailed Description

Items (cells, nodes) spread over the ranks, each with a global id in [0, n_global), regrouped so that rank r holds the ids [block_begin(n_global, r, p), block_begin(n_global, r + 1, p)) in order. An id may come from several ranks (shared nodes); it then takes any one of their values, so they should agree. Ids no rank sends are left zero. Without distributed, this rank holds every id and the regrouping is a local permutation (not collective).

Constructor & Destructor Documentation

◆ GlobalOrder() [1/2]

GlobalOrder::GlobalOrder ( )
default

◆ GlobalOrder() [2/2]

GlobalOrder::GlobalOrder ( std::span< const uint64_t >  ids,
uint64_t  n_global,
bool  distributed 
)

Plan for the items with these global ids (collective if distributed).

Member Function Documentation

◆ first()

uint64_t GlobalOrder::first ( ) const
inline

◆ gather()

template<typename T >
template std::vector< uint64_t > GlobalOrder::gather ( std::span< const T >  values,
uint32_t  width 
) const

This rank's block, width values per id, from the values (width per item) of the plan's items (collective if distributed).

◆ gather_csr()

std::pair< std::vector< uint64_t >, std::vector< uint64_t > > GlobalOrder::gather_csr ( std::span< const uint64_t >  offsets,
std::span< const uint64_t >  values 
) const

Like gather, for items of different lengths (CSR offsets into values); returns the block's offsets (from 0) and values.

◆ n_global()

uint64_t GlobalOrder::n_global ( ) const
inline

◆ size()

uint64_t GlobalOrder::size ( ) const
inline

The documentation for this class was generated from the following files: