YAC 3.7.1
Yet Another Coupler
Loading...
Searching...
No Matches
dist_merge.h File Reference
#include "yac_mpi_common.h"
Include dependency graph for dist_merge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yac_dist_merge_vtable
 

Functions

void yac_dist_merge (size_t *count, void **array, size_t element_size, MPI_Comm comm, struct yac_dist_merge_vtable *vtable, size_t **idx_old_to_new)
 

Function Documentation

◆ yac_dist_merge()

void yac_dist_merge ( size_t * count,
void ** array,
size_t element_size,
MPI_Comm comm,
struct yac_dist_merge_vtable * vtable,
size_t ** idx_old_to_new )

Distributes and merges an array across all processes in comm. After the call, the array will be the same on all processes.

Parameters
[in,out]countnumber of elements in the array
[in,out]arrayarray of elements to by synchronised
[in]element_sizesize of a single element
[in]commcommunicator
[in]vtablevirtual method table that is to be used for the synchronisation
[out]idx_old_to_newif idx_old_to_new != NULL this routine will allocate an array that has the original size of the input array. After the call the i'th element of the input array will be at position idx_old_to_new[i] in the new array.
Remarks
This routine can be applied recursively: The merge function may itself call yac_dist_merge to synchronise some of the additional information.

Definition at line 64 of file dist_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function: