TUV-x
|
Utility for mapping among arrays. More...
Data Types | |
interface | map_t |
Map between arrays. More... | |
interface | pair_t |
Matched pair. More... | |
Functions/Subroutines | |
type(map_t) function | constructor (config, from_labels, to_labels) |
Constructs a map_t object. More... | |
subroutine | apply (this, from, to) |
Transfers data from source to destination array based on map. More... | |
integer function | pack_size (this, comm) |
Returns the size of a binary buffer required to pack the map. More... | |
subroutine | mpi_pack (this, buffer, position, comm) |
Packs the map onto a character buffer. More... | |
subroutine | mpi_unpack (this, buffer, position, comm) |
Unpacks a map from a character buffer. More... | |
subroutine | print_map (this, from_labels, to_labels, out_unit) |
Prints the map details to a specified output unit. More... | |
subroutine | add_default_matches (this, from_labels, to_labels, always) |
Adds default matches by name to the map. More... | |
subroutine | validate (this, config, from_labels, to_labels) |
Validates the map based on user-selected options. More... | |
type(pair_t) function | pair_constructor (config, from_labels, to_labels) |
Constructor of pair_t objects. More... | |
integer function | pair_pack_size (this, comm) |
Returns the size of a binary buffer required to pack the pair. More... | |
subroutine | pair_mpi_pack (this, buffer, position, comm) |
Packs the pair onto a character buffer. More... | |
subroutine | pair_mpi_unpack (this, buffer, position, comm) |
Unpacks a pair from a character buffer. More... | |
Utility for mapping among arrays.
subroutine musica_map::add_default_matches | ( | class(map_t), intent(inout) | this, |
type(string_t), dimension(:), intent(in) | from_labels, | ||
type(string_t), dimension(:), intent(in) | to_labels, | ||
logical, intent(in) | always | ||
) |
Adds default matches by name to the map.
If the always
option is set to false
, only unmatched source elements are included in the default matching
[in,out] | this | Map |
[in] | from_labels | Source array element labels |
[in] | to_labels | Destination array element labels |
[in] | always | Flag indicating whether to always add default matches, or only do so for unmatched source elements |
subroutine musica_map::apply | ( | class(map_t), intent(in) | this, |
real(kind=dk), dimension(:), intent(in) | from, | ||
real(kind=dk), dimension(:), intent(out) | to | ||
) |
Transfers data from source to destination array based on map.
[in] | this | Map |
[in] | from | Source array |
[out] | to | Destination array |
|
private |
Constructs a map_t object.
[in,out] | config | Map configuration |
[in] | from_labels | Source array element labels |
[in] | to_labels | Destination array element labels |
subroutine musica_map::mpi_pack | ( | class(map_t), intent(in) | this, |
character, dimension(:), intent(inout) | buffer, | ||
integer, intent(inout) | position, | ||
integer, intent(in) | comm | ||
) |
Packs the map onto a character buffer.
[in] | this | Map to pack |
[in,out] | buffer | Memory buffer |
[in,out] | position | Current buffer position |
[in] | comm | MPI communicator |
subroutine musica_map::mpi_unpack | ( | class(map_t), intent(out) | this, |
character, dimension(:), intent(inout) | buffer, | ||
integer, intent(inout) | position, | ||
integer, intent(in) | comm | ||
) |
Unpacks a map from a character buffer.
[out] | this | Map to unpack |
[in,out] | buffer | Memory buffer |
[in,out] | position | Current buffer position |
[in] | comm | MPI communicator |
integer function musica_map::pack_size | ( | class(map_t), intent(in) | this, |
integer, intent(in) | comm | ||
) |
Returns the size of a binary buffer required to pack the map.
[in] | this | Map to pack |
[in] | comm | MPI communicator |
type(pair_t) function musica_map::pair_constructor | ( | type(config_t), intent(inout) | config, |
type(string_t), dimension(:), intent(in) | from_labels, | ||
type(string_t), dimension(:), intent(in) | to_labels | ||
) |
Constructor of pair_t objects.
[in,out] | config | Matched pair configuration |
[in] | from_labels | Source array element labels |
[in] | to_labels | Destination array element labels |
subroutine musica_map::pair_mpi_pack | ( | class(pair_t), intent(in) | this, |
character, dimension(:), intent(inout) | buffer, | ||
integer, intent(inout) | position, | ||
integer, intent(in) | comm | ||
) |
Packs the pair onto a character buffer.
[in] | this | Pair to pack |
[in,out] | buffer | Memory buffer |
[in,out] | position | Current buffer position |
[in] | comm | MPI communicator |
subroutine musica_map::pair_mpi_unpack | ( | class(pair_t), intent(out) | this, |
character, dimension(:), intent(inout) | buffer, | ||
integer, intent(inout) | position, | ||
integer, intent(in) | comm | ||
) |
Unpacks a pair from a character buffer.
[out] | this | Pair to unpack |
[in,out] | buffer | Memory buffer |
[in,out] | position | Current buffer position |
[in] | comm | MPI communicator |
integer function musica_map::pair_pack_size | ( | class(pair_t), intent(in) | this, |
integer, intent(in) | comm | ||
) |
Returns the size of a binary buffer required to pack the pair.
[in] | this | Pair to pack |
[in] | comm | MPI communicator |
subroutine musica_map::print_map | ( | class(map_t), intent(in) | this, |
type(string_t), dimension(:), intent(in) | from_labels, | ||
type(string_t), dimension(:), intent(in) | to_labels, | ||
integer, intent(in) | out_unit | ||
) |
Prints the map details to a specified output unit.
[in] | this | Map |
[in] | from_labels | Source array element labels |
[in] | to_labels | Destination array element labels |
[in] | out_unit | Output unit |
subroutine musica_map::validate | ( | class(map_t), intent(in) | this, |
type(config_t), intent(inout) | config, | ||
type(string_t), dimension(:), intent(in) | from_labels, | ||
type(string_t), dimension(:), intent(in) | to_labels | ||
) |
Validates the map based on user-selected options.
[in] | this | Map |
[in,out] | config | Map configuration |
[in] | from_labels | Source array element labels |
[in] | to_labels | Destination array element labels |