|
YAC 3.21.0
Yet Another Coupler
|
#include <limits.h>#include <math.h>#include <stdlib.h>#include <string.h>#include "parameter/param.h"#include "parameter/param_utils.h"#include "utils_common.h"#include "yac_assert.h"#include "yac_mpi_internal.h"
Go to the source code of this file.
Functions | |
| static size_t | get_mpi_pack_size (int count, MPI_Datatype datatype, MPI_Comm comm) |
| Get the size in bytes required to pack a given number of elements of a specified MPI datatype using MPI_Pack_size. | |
| static char * | get_scalar_string_dup (struct yac_param *param) |
| Get a dynamically allocated copy of the scalar string value of a parameter. | |
| static size_t | get_param_record_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine) |
| Get the size in bytes required to pack a parameter record. | |
| static size_t | get_scalar_record_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine) |
| Get the size in bytes required to pack a scalar parameter record. | |
| static int | sub_requires_packing (int sub_is_default, size_t sub_count) |
| Check whether a sub-parameter of a struct parameter has to be packed. | |
| static size_t | get_struct_record_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine) |
| Get the size in bytes required to pack a struct parameter record. | |
| static size_t | get_list_record_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine) |
| Get the size in bytes required to pack a list parameter record. | |
| size_t | yac_param_get_pack_size (struct yac_param *param, MPI_Comm comm, char const *routine) |
| Public function to get the size in bytes required to pack a parameter record. | |
| static void | pack_param_record (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Pack a parameter record into a buffer. | |
| static void | pack_param_record_scalar (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Pack a scalar parameter record into a buffer. | |
| static void | pack_param_record_struct (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Pack a struct parameter record into a buffer. | |
| static void | pack_param_record_list (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Pack a list parameter record into a buffer. | |
| void | yac_param_pack (struct yac_param *param, void *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Public function to pack a parameter record into a buffer. | |
| static void | unpack_and_apply_param_record (struct yac_param *param, void const *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Unpack a parameter record from a buffer and apply it to the given parameter, including its type, default state, and value. | |
| static void | unpack_and_apply_param_record_scalar (struct yac_param *param, void const *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| static void | unpack_and_apply_param_record_struct (struct yac_param *param, void const *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| Unpack a struct parameter record from a buffer and apply it to the given parameter. | |
| static void | unpack_and_apply_param_record_list (struct yac_param *param, void const *buffer, int buffer_size, int *position, MPI_Comm comm, char const *routine) |
| 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. | |
|
static |
Get the size in bytes required to pack a list parameter record.
Definition at line 186 of file param_utils.c.


|
static |
Get the size in bytes required to pack a given number of elements of a specified MPI datatype using MPI_Pack_size.
Definition at line 20 of file param_utils.c.

|
static |
Get the size in bytes required to pack a parameter record.
Definition at line 216 of file param_utils.c.


|
static |
Get the size in bytes required to pack a scalar parameter record.
Definition at line 75 of file param_utils.c.


|
static |
Get a dynamically allocated copy of the scalar string value of a parameter.
This function attempts to retrieve the scalar string value of the given parameter. It dynamically allocates a buffer to hold the string and resizes it if necessary. The caller is responsible for freeing the returned string.
| param | The parameter from which to retrieve the string value. |
Definition at line 40 of file param_utils.c.


|
static |
Get the size in bytes required to pack a struct parameter record.
Definition at line 129 of file param_utils.c.


|
static |
Pack a parameter record into a buffer.
Definition at line 447 of file param_utils.c.


|
static |
Pack a list parameter record into a buffer.
Definition at line 412 of file param_utils.c.


|
static |
Pack a scalar parameter record into a buffer.
Definition at line 273 of file param_utils.c.


|
static |
Pack a struct parameter record into a buffer.
Definition at line 337 of file param_utils.c.


|
static |
Check whether a sub-parameter of a struct parameter has to be packed.
Non-default sub-parameters always have to be packed. In addition, the single sub-parameter of a one-of parameter has to be packed even if it is at its default state: a one-of parameter is non-default as soon as an alternative other than the default one is selected, and packing the name of the selected alternative (with an empty record) is what allows the receiving side to select it as well.
| 0 | the sub-parameter does not have to be packed |
| 1 | the sub-parameter has to be packed |
Definition at line 121 of file param_utils.c.

|
static |
Unpack a parameter record from a buffer and apply it to the given parameter, including its type, default state, and value.
Definition at line 651 of file param_utils.c.


|
static |
Definition at line 619 of file param_utils.c.


|
static |
Definition at line 508 of file param_utils.c.


|
static |
Unpack a struct parameter record from a buffer and apply it to the given parameter.
Definition at line 581 of file param_utils.c.


| size_t yac_param_get_pack_size | ( | struct yac_param * | param, |
| MPI_Comm | comm, | ||
| char const * | routine ) |
Public function to get the size in bytes required to pack a parameter record.
Get the size in bytes required to pack a given parameter using MPI_Pack_size.
Definition at line 257 of file param_utils.c.


| void yac_param_pack | ( | struct yac_param * | param, |
| void * | buffer, | ||
| int | buffer_size, | ||
| int * | position, | ||
| MPI_Comm | comm, | ||
| char const * | routine ) |
Public function to pack a parameter record into a buffer.
Pack a parameter into an MPI buffer.
Definition at line 493 of file param_utils.c.


| 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.
| param | Pointer to parameter that will receive the unpacked values. |
| buffer | Buffer to unpack from. |
| buffer_size | Size of buffer. |
| position | Position in buffer (as in MPI_Unpack). |
| comm | MPI communicator. |
| routine | Name of the calling routine (for error messages). |
Definition at line 703 of file param_utils.c.

