YAC 3.7.1
Yet Another Coupler
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dist_merge.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef DIST_MERGE_H
6#define DIST_MERGE_H
7
8#include "yac_mpi_common.h"
9
10// The distribute merge is used by the coupling configuration in order to
11// synchronise the configuration between all processes.
12
14
20 size_t(*get_pack_size)(void * element, MPI_Comm comm);
21
25 void(*pack)(
26 void * element, void * buffer, int buffer_size, int * position, MPI_Comm);
27
32 void(*unpack)(
33 void * buffer, int buffer_size, int * position, void * element,
34 MPI_Comm comm);
35
39 int(*compare)(void const * a, void const * b);
40
56 void(*merge)(void * to, void * from, MPI_Comm comm);
57
61 void(*free_data)(void * element);
62};
63
83 size_t * count, void ** array, size_t element_size, MPI_Comm comm,
84 struct yac_dist_merge_vtable * vtable, size_t ** idx_old_to_new);
85
86#endif // DIST_MERGE_H
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)
Definition dist_merge.c:64
void(* unpack)(void *buffer, int buffer_size, int *position, void *element, MPI_Comm comm)
Definition dist_merge.h:32
int(* compare)(void const *a, void const *b)
Definition dist_merge.h:39
void(* free_data)(void *element)
Definition dist_merge.h:61
void(* merge)(void *to, void *from, MPI_Comm comm)
Definition dist_merge.h:56
size_t(* get_pack_size)(void *element, MPI_Comm comm)
Definition dist_merge.h:20
void(* pack)(void *element, void *buffer, int buffer_size, int *position, MPI_Comm)
Definition dist_merge.h:25
double * buffer