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

Go to the source code of this file.

Functions

size_t yac_param_get_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine)
 Get the size in bytes required to pack a given parameter using MPI_Pack_size.
 
void yac_param_pack (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine)
 Pack a parameter into an MPI buffer.
 
void yac_param_unpack (struct yac_param *param, void const *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine)
 Unpack a parameter from an MPI buffer and apply its values to the given parameter.
 

Function Documentation

◆ yac_param_get_pack_size()

size_t yac_param_get_pack_size ( struct yac_param * param,
MPI_Comm comm,
char const * routine )

Get the size in bytes required to pack a given parameter using MPI_Pack_size.

Parameters
paramPointer to parameter that will be packed.
commMPI communicator (for MPI_Pack_size).
routineName of the calling routine (for error messages).
Returns
Size in bytes required for packing.

Get the size in bytes required to pack a given parameter using MPI_Pack_size.

Definition at line 257 of file param_utils.c.

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

◆ yac_param_pack()

void yac_param_pack ( struct yac_param * param,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm,
char const * routine )

Pack a parameter into an MPI buffer.

Parameters
paramPointer to parameter that will be packed.
bufferBuffer to pack into.
buffer_sizeSize of buffer.
positionPosition in buffer (as in MPI_Pack).
commMPI communicator.
routineName of the calling routine (for error messages).
Remarks
Only non-default parameters are packed.

Pack a parameter into an MPI buffer.

Definition at line 493 of file param_utils.c.

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

◆ yac_param_unpack()

void yac_param_unpack ( struct yac_param * param,
void const * buffer,
int buffer_size,
int * position,
MPI_Comm comm,
char const * routine )

Unpack a parameter from an MPI buffer and apply its values to the given parameter.

Parameters
paramPointer to parameter that will receive the unpacked values.
bufferBuffer to unpack from.
buffer_sizeSize of buffer.
positionPosition in buffer (as in MPI_Unpack).
commMPI communicator.
routineName of the calling routine (for error messages).
Remarks
This routine assumes, that the provided parameter is at its default state before unpacking. Only non-default parameters are unpacked and applied.

Definition at line 703 of file param_utils.c.

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