Template Numerical Library version\ main:d08c4dec
|
Namespace for TNL containers. More...
Namespaces | |
namespace | NDArraySyncPatterns |
Namespace where synchronization patterns for distributed N-dimensional arrays are defined. |
Classes | |
class | Array |
Array is responsible for memory management, access to array elements, and general array operations. More... | |
class | ArrayView |
ArrayView is a simple data structure which provides a non-owning encapsulation of array data. That is, ArrayView is like Array without memory management. More... | |
struct | Block |
Minimal class representing a block of an equidistant D-dimensional lattice. More... | |
class | ByteArraySynchronizer |
class | ConstStaticSizesHolder |
class | DistributedArray |
Distributed array. More... | |
class | DistributedArraySynchronizer |
class | DistributedArrayView |
Distributed array view. More... | |
class | DistributedNDArray |
Distributed N-dimensional array. More... | |
class | DistributedNDArraySynchronizer |
Synchronizer for DistributedNDArray. More... | |
class | DistributedNDArrayView |
Distributed N-dimensional array view. More... | |
class | DistributedVector |
DistributedVector extends DistributedArray with algebraic operations. More... | |
class | DistributedVectorView |
DistributedVectorView extends DistributedArrayView with algebraic operations. More... | |
class | GinkgoVector |
Wrapper for representing vectors using Ginkgo data structure. More... | |
class | HypreParVector |
Wrapper for Hypre's parallel vector. More... | |
class | HypreVector |
Wrapper for Hypre's sequential vector. More... | |
class | IndexedMap |
class | IndexedSet |
struct | LocalBeginsHolder |
class | NDArray |
Dynamic N-dimensional array. More... | |
class | NDArrayIndexer |
Indexer for N-dimensional arrays. It does not store any data, only the sizes of each dimension. More... | |
class | NDArrayStorage |
Base storage class for NDArray and StaticNDArray. More... | |
class | NDArrayView |
Simple data structure which provides a non-owning encapsulation of N-dimensional array data. More... | |
class | SizesHolder |
Holds static and dynamic sizes of an N-dimensional array. More... | |
class | StaticArray |
Array with constant size. More... | |
class | StaticNDArray |
Static N-dimensional array. More... | |
class | StaticSizesHolder |
Holds static sizes of an N-dimensional array. More... | |
class | StaticVector |
Vector with constant size. More... | |
class | Subrange |
class | UnorderedIndexedSet |
class | Vector |
Vector extends Array with algebraic operations. More... | |
class | VectorView |
VectorView extends ArrayView with algebraic operations. More... |
Typedefs | |
template<typename Index, std::size_t dimension, Index value = 0> | |
using | make_sizes_holder |
Alias template which simplifies creating a SizesHolder type with a constant value for each dimension. |
Functions | |
template<typename idx> | |
std::set< Block< 3, idx > > | createInteriorSides (const std::vector< Block< 3, idx > > &decomposition) |
Creates all unique sides of blocks in a 3D decomposition. | |
template<typename idx, typename OutputIterator> | |
void | createSides (const Block< 3, idx > &block, OutputIterator output) |
Creates the sides of a 3D block and adds them to the output vector. | |
template<typename idx> | |
std::set< Block< 3, idx > > | createSides (const std::vector< Block< 3, idx > > &decomposition) |
Creates all unique sides of blocks in a 3D decomposition. | |
template<typename Index> | |
std::vector< Block< 3, Index > > | decomposeBlock (const Block< 3, Index > &global, Index num_x, Index num_y=1, Index num_z=1) |
Decompose a "global" block into several (sub-)blocks in a 3D manner with given block counts along each axis. | |
template<typename Index> | |
std::vector< Block< 3, Index > > | decomposeBlockOptimal (const Block< 3, Index > &global, Index num_blocks, const std::function< Index(const std::vector< Block< 3, Index > > &) > &f=[](const std::vector< Block< 3, Index > > &decomposition) -> Index { return getInterfaceArea(decomposition);}) |
Decompose a "global" block into several (sub-)blocks in an optimal 3D manner. | |
template<std::size_t I, int N, class T> | |
constexpr const T && | get (const StaticArray< N, T > &&a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr const T & | get (const StaticArray< N, T > &a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr const T && | get (const StaticVector< N, T > &&a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr const T & | get (const StaticVector< N, T > &a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr T && | get (StaticArray< N, T > &&a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr T & | get (StaticArray< N, T > &a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr T && | get (StaticVector< N, T > &&a) noexcept |
template<std::size_t I, int N, class T> | |
constexpr T & | get (StaticVector< N, T > &a) noexcept |
template<typename idx> | |
idx | getArea (const Block< 3, idx > &block, const StaticVector< 3, idx > &axes_weights={ 1, 1, 1 }) |
Calculates the area of a 2D block in 3D space. | |
template<int D, typename Index> | |
Block< D, Index >::CoordinatesType | getBlockVertex (const Block< D, Index > &block, SyncDirection direction) |
Selects a vertex of a block based on a direction from its center. | |
template<typename idx> | |
idx | getInterfaceArea (const std::vector< Block< 3, idx > > &decomposition, const StaticVector< 3, idx > &axes_weights={ 1, 1, 1 }) |
Calculates the total area of interior sides in a 3D decomposition. | |
template<typename idx> | |
double | getMaximumImbalance (const std::vector< Block< 3, idx > > &decomposition, idx global_volume=0) |
Calculates the maximum imbalance of blocks in a decomposition. | |
template<int D, typename idx> | |
idx | getVolume (const Block< D, idx > &block) |
Calculates the volume of a D-dimensional block. | |
template<int D, typename idx> | |
idx | getVolume (const std::vector< Block< D, idx > > &decomposition) |
Calculates the volume occupied by blocks in a decomposition. | |
template<class Coefficients, typename Vector> | |
constexpr auto | linearCombination (const std::array< Vector, Coefficients::getSize() > &vectors) -> typename detail::LinearCombinationReturnType< Coefficients, detail::ConstantVectorTypesWrapper< Vector >, std::integral_constant< std::size_t, 0 > >::type |
Generates an expression for a linear combination of vectors. | |
template<class Coefficients, typename... Vectors, std::enable_if_t< IsArrayType< decltype(Containers::detail::get_from_pack< 0 >(std::declval< Vectors >()...)) >::value, bool> | |
constexpr auto | linearCombination (const Vectors &... vectors) -> typename detail::LinearCombinationReturnType< Coefficients, detail::VectorTypesWrapper< Vectors... >, std::integral_constant< std::size_t, 0 > >::type |
Generates an expression for a linear combination of vectors. | |
template<typename Output, typename Input> | |
void | nd_absolute (Output &output, const Input &input) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_add (Output &output, const Input1 &input1, const Input2 &input2) |
template<typename Output, typename Input> | |
void | nd_assign (Output &output, const Input &input) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_divide (Output &output, const Input1 &input1, const Input2 &input2) |
template<typename Output, typename Func, typename... Input> | |
void | nd_map (Output &output, Func f, const Input &... input) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_maximum (Output &output, const Input1 &input1, const Input2 &input2) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_minimum (Output &output, const Input1 &input1, const Input2 &input2) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_multiply (Output &output, const Input1 &input1, const Input2 &input2) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_pow (Output &output, const Input1 &input1, const Input2 &input2) |
template<std::size_t axis = 0, typename Input, typename Reduction> | |
auto | nd_reduce (const Input &input, Reduction reduction, typename Input::ValueType identity) |
nd_reduce implements (parallel) reduction across specified axis of N-dimensional array (NDArray) with automatic output allocation. | |
template<std::size_t axis = 0, typename Input, typename Reduction, typename Output> | |
void | nd_reduce (const Input &input, Reduction reduction, typename Input::ValueType identity, Output &output) |
nd_reduce implements (parallel) reduction across specified axis of N-dimensional array (NDArray). | |
template<typename Output, typename Input> | |
void | nd_sign (Output &output, const Input &input) |
template<typename Output, typename Input> | |
void | nd_sqrt (Output &output, const Input &input) |
template<typename Output, typename Input> | |
void | nd_square (Output &output, const Input &input) |
template<typename Output, typename Input1, typename Input2> | |
void | nd_subtract (Output &output, const Input1 &input1, const Input2 &input2) |
template<int D, typename idx> | |
bool | operator!= (const Block< D, idx > &left, const Block< D, idx > &right) |
Compares two blocks point-wise. | |
SyncDirection | operator& (SyncDirection a, SyncDirection b) |
Bitwise AND operator for SyncDirection. | |
template<typename SizesHolder, std::size_t ConstValue, typename OtherHolder> | |
LocalBeginsHolder< SizesHolder, ConstValue > | operator+ (const LocalBeginsHolder< SizesHolder, ConstValue > &lhs, const OtherHolder &rhs) |
template<typename Index, std::size_t... sizes, typename OtherHolder> | |
SizesHolder< Index, sizes... > | operator+ (const SizesHolder< Index, sizes... > &lhs, const OtherHolder &rhs) |
Combines the sizes of two instance of SizesHolder with the operator +. | |
template<typename SizesHolder, std::size_t ConstValue, typename OtherHolder> | |
LocalBeginsHolder< SizesHolder, ConstValue > | operator- (const LocalBeginsHolder< SizesHolder, ConstValue > &lhs, const OtherHolder &rhs) |
template<typename Index, std::size_t... sizes, typename OtherHolder> | |
SizesHolder< Index, sizes... > | operator- (const SizesHolder< Index, sizes... > &lhs, const OtherHolder &rhs) |
Combines the sizes of two instance of SizesHolder with the operator -. | |
SyncDirection & | operator-= (SyncDirection &a, SyncDirection b) |
Bitwise operator which clears all bits from b in a. | |
template<int D, typename idx> | |
bool | operator< (const Block< D, idx > &left, const Block< D, idx > &right) |
Lexicographically compares two blocks by joining their begin and end points. | |
template<typename Value, typename Device, typename Index> | |
File & | operator<< (File &&file, ArrayView< Value, Device, Index > view) |
template<typename Value, typename Device, typename Index, typename Allocator> | |
File & | operator<< (File &&file, const Array< Value, Device, Index, Allocator > &array) |
template<int Size, typename Value> | |
File & | operator<< (File &&file, const StaticArray< Size, Value > &array) |
Serialization of static arrays into binary files. | |
template<typename Value, typename Device, typename Index> | |
File & | operator<< (File &file, ArrayView< Value, Device, Index > view) |
Serialization of array views into binary files. | |
template<typename Value, typename Device, typename Index, typename Allocator> | |
File & | operator<< (File &file, const Array< Value, Device, Index, Allocator > &array) |
Serialization of arrays into binary files. | |
template<int Size, typename Value> | |
File & | operator<< (File &file, const StaticArray< Size, Value > &array) |
Serialization of static arrays into binary files. | |
template<typename Value, typename Device, typename Index, typename Allocator> | |
std::ostream & | operator<< (std::ostream &str, const Array< Value, Device, Index, Allocator > &array) |
Overloaded insertion operator for printing an array to output stream. | |
template<typename Value, typename Device, typename Index> | |
std::ostream & | operator<< (std::ostream &str, const ArrayView< Value, Device, Index > &view) |
Overloaded insertion operator for printing an array view to output stream. | |
template<int D, typename idx> | |
std::ostream & | operator<< (std::ostream &str, const Block< D, idx > &block) |
Writes a textual representation of the given multiindex into the given stream. | |
template<typename SizesHolder, std::size_t ConstValue> | |
std::ostream & | operator<< (std::ostream &str, const LocalBeginsHolder< SizesHolder, ConstValue > &holder) |
template<typename Index, std::size_t... sizes> | |
std::ostream & | operator<< (std::ostream &str, const SizesHolder< Index, sizes... > &holder) |
Prints the sizes contained in an instance of SizesHolder to the given output stream. | |
template<int Size, typename Value> | |
std::ostream & | operator<< (std::ostream &str, const StaticArray< Size, Value > &a) |
template<typename Index> | |
std::ostream & | operator<< (std::ostream &str, const Subrange< Index > &range) |
template<typename Value, typename Index, typename Key> | |
std::ostream & | operator<< (std::ostream &str, IndexedMap< Value, Index, Key > &set) |
template<typename Element, typename Index> | |
std::ostream & | operator<< (std::ostream &str, IndexedSet< Element, Index > &set) |
template<class Key, class Index, class Compare, class Allocator> | |
std::ostream & | operator<< (std::ostream &str, IndexedSet< Key, Index, Compare, Allocator > &set) |
template<typename Element, typename Index> | |
std::ostream & | operator<< (std::ostream &str, UnorderedIndexedSet< Element, Index > &set) |
template<class Key, class Index, class Hash, class KeyEqual, class Allocator> | |
std::ostream & | operator<< (std::ostream &str, UnorderedIndexedSet< Key, Index, Hash, KeyEqual, Allocator > &set) |
template<int D, typename idx> | |
bool | operator== (const Block< D, idx > &left, const Block< D, idx > &right) |
Compares two blocks point-wise. | |
template<typename Value, typename Device, typename Index, typename Allocator> | |
File & | operator>> (File &&file, Array< Value, Device, Index, Allocator > &array) |
template<typename Value, typename Device, typename Index> | |
File & | operator>> (File &&file, ArrayView< Value, Device, Index > view) |
template<int Size, typename Value> | |
File & | operator>> (File &&file, StaticArray< Size, Value > &array) |
Deserialization of static arrays from binary files. | |
template<typename Value, typename Device, typename Index, typename Allocator> | |
File & | operator>> (File &file, Array< Value, Device, Index, Allocator > &array) |
Deserialization of arrays from binary files. | |
template<typename Value, typename Device, typename Index> | |
File & | operator>> (File &file, ArrayView< Value, Device, Index > view) |
Deserialization of array views from binary files. | |
template<int Size, typename Value> | |
File & | operator>> (File &file, StaticArray< Size, Value > &array) |
Deserialization of static arrays from binary files. | |
SyncDirection | operator| (SyncDirection a, SyncDirection b) |
Bitwise OR operator for SyncDirection. | |
SyncDirection | opposite (SyncDirection direction) |
Returns an opposite direction for given direction. | |
template<typename DistributedNDArray, std::size_t Q, typename BlockType> | |
void | setNeighbors (DistributedNDArraySynchronizer< DistributedNDArray > &synchronizer, const std::array< SyncDirection, Q > &pattern, int rank, const std::vector< BlockType > &decomposition, const BlockType &global) |
Set neighbors for a synchronizer according to given synchronization pattern and decomposition of a global block. | |
template<typename Index> | |
Subrange< Index > | splitRange (Index globalSize, const MPI::Comm &communicator) |
A helper function which splits a one-dimensional range. | |
template<typename Index> | |
Subrange< Index > | splitRange (Index rangeBegin, Index rangeEnd, int rank, int num_subintervals) |
A helper function which splits a one-dimensional range. | |
template<typename Real> | |
__cuda_callable__ Real | TriangleArea (const StaticVector< 2, Real > &a, const StaticVector< 2, Real > &b, const StaticVector< 2, Real > &c) |
template<typename Real> | |
__cuda_callable__ Real | TriangleArea (const StaticVector< 3, Real > &a, const StaticVector< 3, Real > &b, const StaticVector< 3, Real > &c) |
template<typename Real> | |
__cuda_callable__ StaticVector< 3, Real > | VectorProduct (const StaticVector< 3, Real > &u, const StaticVector< 3, Real > &v) |
Namespace for TNL containers.
using TNL::Containers::make_sizes_holder |
Alias template which simplifies creating a SizesHolder type with a constant value for each dimension.
Index | Integral type used for storing dynamic sizes. |
Dimension | Number of values stored in the SizesHolder. |
Value | The value to substitute to the SizesHolder for each dimension. |
std::vector< Block< 3, Index > > TNL::Containers::decomposeBlock | ( | const Block< 3, Index > & | global, |
Index | num_x, | ||
Index | num_y = 1, | ||
Index | num_z = 1 ) |
Decompose a "global" block into several (sub-)blocks in a 3D manner with given block counts along each axis.
global | The large block to decompose. |
num_x | Number of blocks along the x-axis. |
num_y | Number of blocks along the y-axis. |
num_z | Number of blocks along the z-axis. |
std::vector< Block< 3, Index > > TNL::Containers::decomposeBlockOptimal | ( | const Block< 3, Index > & | global, |
Index | num_blocks, | ||
const std::function< Index(const std::vector< Block< 3, Index > > &) > & | f = []( const std::vector< Block< 3, Index > >& decomposition ) -> Index { return getInterfaceArea( decomposition ); } ) |
Decompose a "global" block into several (sub-)blocks in an optimal 3D manner.
global | The large block to decompose. |
num_blocks | Number of blocks. |
f | The objective function that should be minimized. |
idx TNL::Containers::getArea | ( | const Block< 3, idx > & | block, |
const StaticVector< 3, idx > & | axes_weights = { 1, 1, 1 } ) |
Calculates the area of a 2D block in 3D space.
block | The block whose area will be calculated. |
axes_weights | Optional weights that modify the area based on the block orientation. axes_weights.x() multiplies the area of blocks normal to the x-axis, axes_weights.y() multiplies the area of blocks normal to the y-axis, and axes_weights.z() multiplies the area of blocks normal to the z-axis. |
Block< D, Index >::CoordinatesType TNL::Containers::getBlockVertex | ( | const Block< D, Index > & | block, |
SyncDirection | direction ) |
Selects a vertex of a block based on a direction from its center.
block | is the block. |
direction | is the direction from the center of the block to one of its vertices. |
std::invalid_argument | when the direction does not point to a vertex. E.g., SyncDirection::BackBottomLeft is valid, but SyncDirection::TopRight or SyncDirection::Left are not. |
idx TNL::Containers::getInterfaceArea | ( | const std::vector< Block< 3, idx > > & | decomposition, |
const StaticVector< 3, idx > & | axes_weights = { 1, 1, 1 } ) |
Calculates the total area of interior sides in a 3D decomposition.
decomposition | A vector of blocks that form a 3D decomposition of a large block. |
axes_weights | Optional weights that modify interface areas based on the interior side orientation. axes_weights.x() multiplies the area of sides normal to the x-axis, axes_weights.y() multiplies the area of sides normal to the y-axis, and axes_weights.z() multiplies the area of sides normal to the z-axis. |
double TNL::Containers::getMaximumImbalance | ( | const std::vector< Block< 3, idx > > & | decomposition, |
idx | global_volume = 0 ) |
Calculates the maximum imbalance of blocks in a decomposition.
Imbalance is a non-negative quantity that measures how much the block's volume differs from the ideal, average volume. If all blocks have the ideal volume, then all blocks have zero imbalance.
decomposition | Vector of blocks in the decomposition. |
global_volume | Optional pre-computed volume of all blocks. |
|
constexpr |
Generates an expression for a linear combination of vectors.
This function creates an expression for a linear combination of vectors, i.e.
\[ \vec ET = \alpha_1 \vec v_1 + \alpha_2 \vec v_2 + \dots + \alpha_n \vec v_n \]
The coefficients \( \alpha_i \) are given as a Coefficients class, which must provide a static method getValue( int i ) that returns the i-th coefficient. The vectors are given as arguments to the function. The transformation to the expression template is done at compile time and so the coefficients must be static.
Coefficients | Class with static parameters of the linear combination. It must provide a static method getValue( int i ) that returns the i-th coefficient. |
Vector | Type of the vectors in the linear combination. It can be any vector type that can be combined with expression templates, i.e. TNL::Containers::StaticVector, TNL::Containers::Vector or TNL::Containers::DistributedVector. |
vectors | Input vectors that will be combined with Coefficients. |
|
constexpr |
Generates an expression for a linear combination of vectors.
This function creates an expression for a linear combination of vectors, i.e.
\[ \vec ET = \alpha_1 \vec v_1 + \alpha_2 \vec v_2 + \dots + \alpha_n \vec v_n \]
The coefficients \( \alpha_i \) are given as a Coefficients class, which must provide a static method getValue( int i ) that returns the i-th coefficient. The vectors are given as arguments to the function. The transformation to the expression template is done at compile time and so the coefficients must be static.
Coefficients | Class with static parameters of the linear combination. It must provide a static method getValue( int i ) that returns the i-th coefficient. |
Vectors | A variadic pack of the vector types in the linear combination. Each pack can contain any vector types that can be combined with expression templates, i.e. TNL::Containers::StaticVector, TNL::Containers::Vector or TNL::Containers::DistributedVector. |
vectors | Input vectors that will be combined with Coefficients. |
auto TNL::Containers::nd_reduce | ( | const Input & | input, |
Reduction | reduction, | ||
typename Input::ValueType | identity ) |
nd_reduce implements (parallel) reduction across specified axis of N-dimensional array (NDArray) with automatic output allocation.
This overloaded version automatically creates and returns a new NDArray with dimensions reduced by removing the specified axis. It wraps the original nd_reduce function that requires an output array parameter.
axis | is the dimension index to reduce over (compile-time constant) |
Input | is the NDArray type providing access to data and dimensions |
Reduction | is a binary function object for reduction operation |
input | is the input NDArray to be reduced |
reduction | is a binary function object defining the reduction operation This can be a user-defined lambda function or an instance of some Function objects for reduction operations. |
identity | is the identity element for the reduction operation |
The function creates an output array with dimensions determined by removing the specified axis from the input. For example, reducing a 3D array with dimensions \((X,Y,Z)\) along axis 1 will produce a 2D array with dimensions \((X,Z)\).
The reduction operation is applied across all elements along the specified axis using the same logic as the original nd_reduce function.
void TNL::Containers::nd_reduce | ( | const Input & | input, |
Reduction | reduction, | ||
typename Input::ValueType | identity, | ||
Output & | output ) |
nd_reduce implements (parallel) reduction across specified axis of N-dimensional array (NDArray).
This function reduces an N-dimensional array to a lower-dimensional array by applying a binary operation along the specified axis. The reduction operation must be associative and commutative for correct results in parallel execution. The function handles different array dimensions (1D to 6D) with customizable axis configuration.
axis | is the dimension index to reduce over (compile-time constant) |
Input | is the NDArray type providing access to data and dimensions |
Reduction | is a binary function object for reduction operation |
Output | is the resulting array type with reduced dimensions |
input | is the input NDArray to be reduced |
reduction | is a binary function object defining the reduction operation This can be a user-defined lambda function or an instance of some Function objects for reduction operations. |
identity | is the identity element for the reduction operation |
output | is the result array with dimensions reduced by removing the specified axis |
The function handles different dimensions through template specialization:
The reduction operation is applied across all elements along the specified axis. For higher dimensions (4D+), the implementation uses parallelFor with a kernel that processes sub-ranges of the output dimensions.
File & TNL::Containers::operator<< | ( | File && | file, |
const StaticArray< Size, Value > & | array ) |
Serialization of static arrays into binary files.
file | output file |
array | is an array to be written into the output file. |
File & TNL::Containers::operator<< | ( | File & | file, |
const StaticArray< Size, Value > & | array ) |
Serialization of static arrays into binary files.
file | output file |
array | is an array to be written into the output file. |
std::ostream & TNL::Containers::operator<< | ( | std::ostream & | str, |
const Array< Value, Device, Index, Allocator > & | array ) |
Overloaded insertion operator for printing an array to output stream.
Value | is a type of the array elements. |
Device | is a device where the array is allocated. |
Index | is a type used for the indexing of the array elements. |
str | is a output stream. |
array | is the array to be printed. |
std::ostream & TNL::Containers::operator<< | ( | std::ostream & | str, |
const ArrayView< Value, Device, Index > & | view ) |
Overloaded insertion operator for printing an array view to output stream.
Value | is a type of the array view elements. |
Device | is a device where the array view is allocated. |
Index | is a type used for the indexing of the array view elements. |
str | is a output stream. |
view | is the array view to be printed. |
File & TNL::Containers::operator>> | ( | File && | file, |
StaticArray< Size, Value > & | array ) |
Deserialization of static arrays from binary files.
file | input file |
array | is an array to be read from the input file. |
File & TNL::Containers::operator>> | ( | File & | file, |
StaticArray< Size, Value > & | array ) |
Deserialization of static arrays from binary files.
file | input file |
array | is an array to be read from the input file. |
|
nodiscard |
A helper function which splits a one-dimensional range.
globalSize | Size of the global range [0, globalSize) to be split. |
communicator | MPI communicator consisting of ranks for which the range is split. |
|
nodiscard |
A helper function which splits a one-dimensional range.
rangeBegin | Beginning of the interval [rangeBegin, rangeEnd). |
rangeEnd | End of the interval [rangeBegin, rangeEnd). |
rank | Index of the subinterval for which the output is calculated. |
num_subintervals | Total number of subintervals. |