#include <string.h>
#include "dist_merge.h"
#include "utils_common.h"
Go to the source code of this file.
|
static size_t | get_pack_size (size_t count, unsigned char *array, size_t element_size, MPI_Comm comm, size_t(*element_get_pack_size)(void *element, MPI_Comm comm)) |
|
static void | pack (size_t count, unsigned char *array, size_t element_size, void *buffer, int buffer_size, int *position, MPI_Comm comm, void(*element_pack)(void *element, void *buffer, int buffer_size, int *position, MPI_Comm)) |
|
static void | unpack (void *buffer, int buffer_size, int *position, size_t *count, unsigned char **array, size_t element_size, MPI_Comm comm, void(*element_unpack)(void *buffer, int buffer_size, int *position, void *element, MPI_Comm comm)) |
|
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) |
|
◆ get_pack_size()
static size_t get_pack_size |
( |
size_t | count, |
|
|
unsigned char * | array, |
|
|
size_t | element_size, |
|
|
MPI_Comm | comm, |
|
|
size_t(* | element_get_pack_size )(void *element, MPI_Comm comm) ) |
|
static |
◆ pack()
static void pack |
( |
size_t | count, |
|
|
unsigned char * | array, |
|
|
size_t | element_size, |
|
|
void * | buffer, |
|
|
int | buffer_size, |
|
|
int * | position, |
|
|
MPI_Comm | comm, |
|
|
void(* | element_pack )(void *element, void *buffer, int buffer_size, int *position, MPI_Comm) ) |
|
static |
◆ unpack()
static void unpack |
( |
void * | buffer, |
|
|
int | buffer_size, |
|
|
int * | position, |
|
|
size_t * | count, |
|
|
unsigned char ** | array, |
|
|
size_t | element_size, |
|
|
MPI_Comm | comm, |
|
|
void(* | element_unpack )(void *buffer, int buffer_size, int *position, void *element, MPI_Comm comm) ) |
|
static |
◆ 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] | count | number of elements in the array |
[in,out] | array | array of elements to by synchronised |
[in] | element_size | size of a single element |
[in] | comm | communicator |
[in] | vtable | virtual method table that is to be used for the synchronisation |
[out] | idx_old_to_new | if 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. |
Definition at line 64 of file dist_merge.c.