Yet Another eXchange Tool  0.9.0
Enumerations | Functions | Variables
xt_config.c File Reference

implementation of configuration object More...

#include <string.h>
#include <mpi.h>
#include <xt/xt_config.h>
#include "xt_config_internal.h"
#include "xt_exchanger_irecv_send.h"
#include "xt_exchanger_irecv_isend.h"
#include "xt_exchanger_mix_isend_irecv.h"
#include "xt_exchanger_irecv_isend_packed.h"
#include "xt_exchanger_neigh_alltoall.h"
#include "core/core.h"
#include "core/ppm_xfuncs.h"
Include dependency graph for xt_config.c:

Go to the source code of this file.

Enumerations

enum  { num_exchanger = sizeof (exchanger_table) / sizeof (exchanger_table[0]) }
 

Functions

Xt_config xt_config_new (void)
 
void xt_config_delete (Xt_config config)
 
int xt_exchanger_id_by_name (const char *name)
 
int xt_config_get_exchange_method (Xt_config config)
 
void xt_config_set_exchange_method (Xt_config config, int method)
 
void xt_config_defaults_init (void)
 

Variables

struct Xt_config_ xt_default_config
 
struct {
   char   name [20]
 
   Xt_exchanger_new   f
 
   int   code
 
exchanger_table []
 

Detailed Description

implementation of configuration object

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_config.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
num_exchanger 

Definition at line 98 of file xt_config.c.

Function Documentation

◆ xt_config_defaults_init()

void xt_config_defaults_init ( void  )

Definition at line 140 of file xt_config.c.

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

◆ xt_config_delete()

void xt_config_delete ( Xt_config  config)

destructor of configuration objects

Parameters
[in,out]configconfiguration object to destroy

Definition at line 76 of file xt_config.c.

◆ xt_config_get_exchange_method()

int xt_config_get_exchange_method ( Xt_config  config)

get exchanger used when the config object is passed to constructors

Parameters
[in]configconfiguration object to modify
Returns
an entry from Xt_exchangers representing the method of data transfer used

Definition at line 111 of file xt_config.c.

◆ xt_config_new()

Xt_config xt_config_new ( void  )

constructor for configuration object

Returns
returns a configuration object where every setting is set to the corresponding default.

Definition at line 69 of file xt_config.c.

◆ xt_config_set_exchange_method()

void xt_config_set_exchange_method ( Xt_config  config,
int  method 
)

set exchanger to use when the config object is passed to constructors

Parameters
[in,out]configconfiguration object to modify
methodan entry from enum Xt_exchangers to signify the desired exchanger for data transfers

Definition at line 125 of file xt_config.c.

Here is the caller graph for this function:

◆ xt_exchanger_id_by_name()

int xt_exchanger_id_by_name ( const char *  name)

map exchanger name string to method id from Xt_exchangers

Parameters
[in]namestring that is supposed to match the part of the corresponding enum after xt_exchanger_
Returns
for the string "irecv_send", the value of xt_exchanger_irecv_send will be returned, for strings matching no known exchanger, -1 will be returned

Definition at line 103 of file xt_config.c.

Here is the caller graph for this function:

Variable Documentation

◆ code

int code

Definition at line 84 of file xt_config.c.

◆ 

const { ... } exchanger_table[]
Initial value:
= {
{ "irecv_send",
{ "irecv_isend",
{ "irecv_isend_packed",
{ "mix_irecv_isend",
{ "neigh_alltoall",
}
@ xt_exchanger_irecv_isend
Definition: xt_config.h:75
@ xt_exchanger_irecv_send
Definition: xt_config.h:74
@ xt_exchanger_irecv_isend_packed
Definition: xt_config.h:76
@ xt_exchanger_neigh_alltoall
Definition: xt_config.h:78
@ xt_exchanger_mix_isend_irecv
Definition: xt_config.h:77
Xt_exchanger xt_exchanger_irecv_isend_new(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset)
Xt_exchanger xt_exchanger_irecv_isend_packed_new(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset)
Xt_exchanger xt_exchanger_irecv_send_new(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset)
Xt_exchanger xt_exchanger_mix_isend_irecv_new(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset)
Xt_exchanger xt_exchanger_neigh_alltoall_new(int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset)
Examples
test_exchanger_parallel.c.

◆ f

Definition at line 83 of file xt_config.c.

◆ name

char name[20]

Definition at line 82 of file xt_config.c.

◆ xt_default_config

struct Xt_config_ xt_default_config
Initial value:
= {
}

Definition at line 1 of file xt_config.c.