Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
Macros | Functions
xt_mpi_ddt_gen.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <mpi.h>
#include "core/ppm_xfuncs.h"
#include "xt/xt_mpi.h"
#include "xt_mpi_internal.h"
#include "xt_mpi_ddt_cache.h"
#include "xt_mpi_stripe_parse_func.h"
Include dependency graph for xt_mpi_ddt_gen.c:

Go to the source code of this file.

Macros

#define COMPACT_DT
 
#define XT_MPI_STRP_PRS_PREFIX
 
#define XT_MPI_STRP_PRS_UNITSTRIDE   1
 
#define XT_MPI_STRP_PRS_AOFS_TYPE   int
 
#define XT_MPI_STRP_PRS_DISP_ADJUST(val)   ((val) * params->old_type_extent)
 
#define XT_MPI_STRP_PRS_BLOCK_VEC_CREATE   Xt_mpi_ddt_cache_acquire_vector
 
#define XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE    Xt_mpi_ddt_cache_acquire_indexed_block
 
#define XT_MPI_STRP_PRS_INDEXED_CREATE   Xt_mpi_ddt_cache_acquire_indexed
 
#define MPI_Type_create_hindexed_block   XtMPI_Type_create_hindexed_block
 
#define XT_MPI_STRP_PRS_PREFIX   a
 
#define XT_MPI_STRP_PRS_UNITSTRIDE   params->old_type_extent
 
#define XT_MPI_STRP_PRS_AOFS_TYPE   MPI_Aint
 
#define XT_MPI_STRP_PRS_DISP_ADJUST(val)   (val)
 
#define XT_MPI_STRP_PRS_BLOCK_VEC_CREATE   Xt_mpi_ddt_cache_acquire_hvector
 
#define XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE    Xt_mpi_ddt_cache_acquire_hindexed_block
 
#define XT_MPI_STRP_PRS_INDEXED_CREATE   Xt_mpi_ddt_cache_acquire_hindexed
 

Functions

static MPI_Datatype xt_mpi_generate_compact_datatype_block (const int *disp, const int *blocklengths, int count, MPI_Datatype old_type, MPI_Comm comm)
 
static MPI_Datatype xt_mpi_generate_compact_datatype (int const *disp, int disp_len, MPI_Datatype old_type, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype_block (const int *displacements, const int *blocklengths, int count, MPI_Datatype old_type, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype (int const *displacements, int count, MPI_Datatype old_type, MPI_Comm comm)
 
static int XtMPI_Type_create_hindexed_block (int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype)
 
MPI_Datatype xt_mpi_ddt_block_gen (int count, const int *disp, const int *blocklengths, struct Xt_mpi_strp_prs_params *params)
 

Detailed Description

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_mpi_ddt_gen.c.

Macro Definition Documentation

◆ COMPACT_DT

#define COMPACT_DT

COMPACT_DT enables the analysis of displacements in order to give a more compact description to the datatype generators of MPI. For strong enough MPI implementations this not required. Then you can undefine COMPACT_DT and save some processing time within yaxt without losing communication performance.

Definition at line 64 of file xt_mpi_ddt_gen.c.

◆ MPI_Type_create_hindexed_block

#define MPI_Type_create_hindexed_block   XtMPI_Type_create_hindexed_block

Definition at line 337 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_AOFS_TYPE [1/2]

#define XT_MPI_STRP_PRS_AOFS_TYPE   int

Definition at line 301 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_AOFS_TYPE [2/2]

#define XT_MPI_STRP_PRS_AOFS_TYPE   MPI_Aint

Definition at line 301 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_BLOCK_VEC_CREATE [1/2]

#define XT_MPI_STRP_PRS_BLOCK_VEC_CREATE   Xt_mpi_ddt_cache_acquire_vector

Definition at line 303 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_BLOCK_VEC_CREATE [2/2]

#define XT_MPI_STRP_PRS_BLOCK_VEC_CREATE   Xt_mpi_ddt_cache_acquire_hvector

Definition at line 303 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_DISP_ADJUST [1/2]

#define XT_MPI_STRP_PRS_DISP_ADJUST ( val)    ((val) * params->old_type_extent)

Definition at line 302 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_DISP_ADJUST [2/2]

#define XT_MPI_STRP_PRS_DISP_ADJUST ( val)    (val)

Definition at line 302 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE [1/2]

#define XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE    Xt_mpi_ddt_cache_acquire_indexed_block

Definition at line 304 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE [2/2]

#define XT_MPI_STRP_PRS_INDEXED_BLOCK_CREATE    Xt_mpi_ddt_cache_acquire_hindexed_block

Definition at line 304 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_INDEXED_CREATE [1/2]

#define XT_MPI_STRP_PRS_INDEXED_CREATE   Xt_mpi_ddt_cache_acquire_indexed

Definition at line 306 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_INDEXED_CREATE [2/2]

#define XT_MPI_STRP_PRS_INDEXED_CREATE   Xt_mpi_ddt_cache_acquire_hindexed

Definition at line 306 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_PREFIX [1/2]

#define XT_MPI_STRP_PRS_PREFIX

Definition at line 299 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_PREFIX [2/2]

#define XT_MPI_STRP_PRS_PREFIX   a

Definition at line 299 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_UNITSTRIDE [1/2]

#define XT_MPI_STRP_PRS_UNITSTRIDE   1

Definition at line 300 of file xt_mpi_ddt_gen.c.

◆ XT_MPI_STRP_PRS_UNITSTRIDE [2/2]

#define XT_MPI_STRP_PRS_UNITSTRIDE   params->old_type_extent

Definition at line 300 of file xt_mpi_ddt_gen.c.

Function Documentation

◆ xt_mpi_ddt_block_gen()

MPI_Datatype xt_mpi_ddt_block_gen ( int count,
const int * disp,
const int * blocklengths,
struct Xt_mpi_strp_prs_params * params )

Definition at line 364 of file xt_mpi_ddt_gen.c.

Here is the caller graph for this function:

◆ xt_mpi_generate_compact_datatype()

MPI_Datatype xt_mpi_generate_compact_datatype ( int const * disp,
int disp_len,
MPI_Datatype old_type,
MPI_Comm comm )
static

Definition at line 386 of file xt_mpi_ddt_gen.c.

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

◆ xt_mpi_generate_compact_datatype_block()

static MPI_Datatype xt_mpi_generate_compact_datatype_block ( const int * disp,
const int * blocklengths,
int count,
MPI_Datatype old_type,
MPI_Comm comm )
static

Definition at line 352 of file xt_mpi_ddt_gen.c.

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

◆ xt_mpi_generate_datatype()

MPI_Datatype xt_mpi_generate_datatype ( int const * displacements,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]displacementsarray of displacements
[in]countnumber of elements
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)

Definition at line 245 of file xt_mpi_ddt_gen.c.

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

◆ xt_mpi_generate_datatype_block()

MPI_Datatype xt_mpi_generate_datatype_block ( const int * displacements,
const int * blocklengths,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]displacementsarray of displacements
[in]blocklengthsarray of block sizes
[in]countnumber of blocks
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)

Definition at line 209 of file xt_mpi_ddt_gen.c.

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

◆ XtMPI_Type_create_hindexed_block()

static int XtMPI_Type_create_hindexed_block ( int count,
int blocklength,
const MPI_Aint array_of_displacements[],
MPI_Datatype oldtype,
MPI_Datatype * newtype )
inlinestatic

Definition at line 318 of file xt_mpi_ddt_gen.c.

Here is the call graph for this function: