Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
xt_ddt_create.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include <mpi.h>
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_mpi.h"
#include "xt_ddt_internal.h"
Include dependency graph for xt_ddt_create.c:

Go to the source code of this file.

Classes

struct  xt_ddt_tree_elem
 

Macros

#define MAX(a, b)
 

Functions

static void * after_displs (struct xt_ddt_tree_elem *elem)
 
static struct xt_ddt_tree_elemmpi_ddt_2_xt_ddt_tree (MPI_Datatype mpi_ddt, int free_mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_named_new (MPI_Aint extent, MPI_Datatype mpi_ddt)
 
static void free_unnamed_mpi_ddt (MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_cont_new (int count, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_hvector_new (MPI_Aint extent, int count, int blocklength, MPI_Aint stride, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_vector_new (MPI_Aint extent, int count, int blocklength, int stride, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_hindexed_new (MPI_Aint extent, int count, int *blocklengths, MPI_Aint *displacements, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_indexed_new (MPI_Aint extent, int count, int *blocklengths, int *displacements, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_hindexed_block_new (MPI_Aint extent, int count, int blocklength, MPI_Aint *displacements, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_indexed_block_new (MPI_Aint extent, int count, int blocklength, int *displacements, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_struct_new (MPI_Aint extent, int count, int *blocklengths, MPI_Aint *displacements, MPI_Datatype *mpi_ddts)
 
static void xt_ddt_tree_elem_subarray_get_displs (MPI_Aint *displs, MPI_Aint dim_displ, size_t ndim, int *sizes, int *sub_sizes, int *starts, int order, MPI_Aint base_extent)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_subarray_new (MPI_Aint extent, int ndim, int *sizes, int *sub_sizes, int *starts, int order, MPI_Datatype mpi_ddt)
 
static struct xt_ddt_tree_elemxt_ddt_tree_elem_resized_new (MPI_Aint extent, MPI_Datatype mpi_ddt)
 
static void xt_ddt_tree_elem_delete (struct xt_ddt_tree_elem *elem)
 
static void xt_ddt_tree_delete (struct xt_ddt_tree_elem *tree)
 
static size_t mpi_ddt_to_data_idx (MPI_Datatype mpi_ddt)
 
static void xt_ddt_tree_elem_get_data_sizes (struct xt_ddt_tree_elem *elem, MPI_Datatype *prev_dtype, size_t *prev_data_idx, struct xt_ddt_data *data)
 
static void xt_ddt_tree_get_data_sizes (struct xt_ddt_tree_elem *tree, struct xt_ddt_data *data)
 
static void xt_ddt_tree_elem_to_data (struct xt_ddt_tree_elem *elem, struct xt_ddt_data *data, MPI_Aint displ, MPI_Datatype *prev_dtype, size_t *prev_data_idx)
 
static void xt_ddt_tree_to_data (struct xt_ddt_tree_elem *tree, struct xt_ddt_data *data)
 
static int compare_kernels (const void *a, const void *b)
 
static Xt_ddt xt_ddt_new (MPI_Datatype mpi_ddt)
 
void xt_ddt_inc_ref_count (Xt_ddt ddt)
 
void xt_ddt_delete (Xt_ddt ddt)
 
static int xt_ddt_internal_keyval_copy (MPI_Datatype XT_UNUSED(dtype), int XT_UNUSED(dtype_keyval), void *XT_UNUSED(extra_state), void *attribute_val_in, void *attribute_val_out, int *flag)
 
static int xt_ddt_internal_keyval_delete (MPI_Datatype XT_UNUSED(dtype), int XT_UNUSED(dtype_keyval), void *attribute_val, void *XT_UNUSED(extra_state))
 
static int xt_ddt_cleanup_internal_keyval_delete (MPI_Comm comm, int XT_UNUSED(dtype_keyval), void *XT_UNUSED(attribute_val), void *XT_UNUSED(extra_state))
 
Xt_ddt xt_ddt_from_mpi_ddt (MPI_Datatype mpi_ddt)
 

Variables

static const char filename [] = "xt_ddt_create.c"
 
static int xt_ddt_internal_keyval = MPI_KEYVAL_INVALID
 
static int xt_ddt_cleanup_internal_keyval = MPI_KEYVAL_INVALID
 

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

Macro Definition Documentation

◆ MAX

#define MAX ( a,
b )
Value:
((a) >= (b) ? (a) : (b))

Definition at line 78 of file xt_ddt_create.c.

Function Documentation

◆ after_displs()

static void * after_displs ( struct xt_ddt_tree_elem * elem)
inlinestatic

Definition at line 80 of file xt_ddt_create.c.

Here is the caller graph for this function:

◆ compare_kernels()

static int compare_kernels ( const void * a,
const void * b )
static

Definition at line 908 of file xt_ddt_create.c.

Here is the caller graph for this function:

◆ free_unnamed_mpi_ddt()

static void free_unnamed_mpi_ddt ( MPI_Datatype mpi_ddt)
static

Definition at line 101 of file xt_ddt_create.c.

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

◆ mpi_ddt_2_xt_ddt_tree()

static struct xt_ddt_tree_elem * mpi_ddt_2_xt_ddt_tree ( MPI_Datatype mpi_ddt,
int free_mpi_ddt )
static

Definition at line 482 of file xt_ddt_create.c.

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

◆ mpi_ddt_to_data_idx()

static size_t mpi_ddt_to_data_idx ( MPI_Datatype mpi_ddt)
inlinestatic

Definition at line 749 of file xt_ddt_create.c.

Here is the caller graph for this function:

◆ xt_ddt_cleanup_internal_keyval_delete()

static int xt_ddt_cleanup_internal_keyval_delete ( MPI_Comm comm,
int XT_UNUSEDdtype_keyval,
void * XT_UNUSEDattribute_val,
void * XT_UNUSEDextra_state )
static

Definition at line 1045 of file xt_ddt_create.c.

Here is the caller graph for this function:

◆ xt_ddt_delete()

void xt_ddt_delete ( Xt_ddt ddt)

deletes a xt_ddt object

Parameters
[in]ddtxt_ddt object

Definition at line 999 of file xt_ddt_create.c.

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

◆ xt_ddt_from_mpi_ddt()

Xt_ddt xt_ddt_from_mpi_ddt ( MPI_Datatype mpi_ddt)

Returns a xt_ddt object for the provided MPI datatype. The routine will first check whether there is already a xt_ddt for this MPI datatype and will retrieve it, if available. Otherwise a new xt_ddt will be generated and cached in the MPI datatype.

Parameters
[in]mpi_ddtMPI datatype
Returns
xt_ddt object
Remarks
the returned xt_ddt object is only valid as long as the mpi_ddt is not freed
no xt_ddt_delete needs to be called for the xt_ddt object returned by this routine

Definition at line 1063 of file xt_ddt_create.c.

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

◆ xt_ddt_inc_ref_count()

void xt_ddt_inc_ref_count ( Xt_ddt ddt)

increases the internal reference counter for the given xt_ddt object

Parameters
[in]ddtxt_ddt object
Remarks
for each reference of a xt_ddt object xt_ddt_delete has to be called

Definition at line 994 of file xt_ddt_create.c.

Here is the caller graph for this function:

◆ xt_ddt_internal_keyval_copy()

static int xt_ddt_internal_keyval_copy ( MPI_Datatype XT_UNUSEDdtype,
int XT_UNUSEDdtype_keyval,
void * XT_UNUSEDextra_state,
void * attribute_val_in,
void * attribute_val_out,
int * flag )
static

Definition at line 1026 of file xt_ddt_create.c.

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

◆ xt_ddt_internal_keyval_delete()

static int xt_ddt_internal_keyval_delete ( MPI_Datatype XT_UNUSEDdtype,
int XT_UNUSEDdtype_keyval,
void * attribute_val,
void * XT_UNUSEDextra_state )
static

Definition at line 1037 of file xt_ddt_create.c.

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

◆ xt_ddt_new()

static Xt_ddt xt_ddt_new ( MPI_Datatype mpi_ddt)
static

Definition at line 920 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_delete()

static void xt_ddt_tree_delete ( struct xt_ddt_tree_elem * tree)
static

Definition at line 744 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_cont_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_cont_new ( int count,
MPI_Datatype mpi_ddt )
static

Definition at line 115 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_delete()

static void xt_ddt_tree_elem_delete ( struct xt_ddt_tree_elem * elem)
static

Definition at line 717 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_get_data_sizes()

static void xt_ddt_tree_elem_get_data_sizes ( struct xt_ddt_tree_elem * elem,
MPI_Datatype * prev_dtype,
size_t * prev_data_idx,
struct xt_ddt_data * data )
static

Definition at line 778 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_hindexed_block_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_hindexed_block_new ( MPI_Aint extent,
int count,
int blocklength,
MPI_Aint * displacements,
MPI_Datatype mpi_ddt )
static

Definition at line 279 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_hindexed_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_hindexed_new ( MPI_Aint extent,
int count,
int * blocklengths,
MPI_Aint * displacements,
MPI_Datatype mpi_ddt )
static

Definition at line 215 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_hvector_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_hvector_new ( MPI_Aint extent,
int count,
int blocklength,
MPI_Aint stride,
MPI_Datatype mpi_ddt )
static

Definition at line 164 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_indexed_block_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_indexed_block_new ( MPI_Aint extent,
int count,
int blocklength,
int * displacements,
MPI_Datatype mpi_ddt )
static

Definition at line 311 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_indexed_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_indexed_new ( MPI_Aint extent,
int count,
int * blocklengths,
int * displacements,
MPI_Datatype mpi_ddt )
static

Definition at line 258 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_named_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_named_new ( MPI_Aint extent,
MPI_Datatype mpi_ddt )
static

Definition at line 89 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_resized_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_resized_new ( MPI_Aint extent,
MPI_Datatype mpi_ddt )
static

Definition at line 471 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_struct_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_struct_new ( MPI_Aint extent,
int count,
int * blocklengths,
MPI_Aint * displacements,
MPI_Datatype * mpi_ddts )
static

Definition at line 333 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_subarray_get_displs()

static void xt_ddt_tree_elem_subarray_get_displs ( MPI_Aint * displs,
MPI_Aint dim_displ,
size_t ndim,
int * sizes,
int * sub_sizes,
int * starts,
int order,
MPI_Aint base_extent )
static

Definition at line 392 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_subarray_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_subarray_new ( MPI_Aint extent,
int ndim,
int * sizes,
int * sub_sizes,
int * starts,
int order,
MPI_Datatype mpi_ddt )
static

Definition at line 441 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_to_data()

static void xt_ddt_tree_elem_to_data ( struct xt_ddt_tree_elem * elem,
struct xt_ddt_data * data,
MPI_Aint displ,
MPI_Datatype * prev_dtype,
size_t * prev_data_idx )
static

Definition at line 838 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_elem_vector_new()

static struct xt_ddt_tree_elem * xt_ddt_tree_elem_vector_new ( MPI_Aint extent,
int count,
int blocklength,
int stride,
MPI_Datatype mpi_ddt )
static

Definition at line 199 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_get_data_sizes()

static void xt_ddt_tree_get_data_sizes ( struct xt_ddt_tree_elem * tree,
struct xt_ddt_data * data )
static

Definition at line 827 of file xt_ddt_create.c.

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

◆ xt_ddt_tree_to_data()

static void xt_ddt_tree_to_data ( struct xt_ddt_tree_elem * tree,
struct xt_ddt_data * data )
static

Definition at line 896 of file xt_ddt_create.c.

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

Variable Documentation

◆ filename

const char filename[] = "xt_ddt_create.c"
static

Definition at line 61 of file xt_ddt_create.c.

◆ xt_ddt_cleanup_internal_keyval

int xt_ddt_cleanup_internal_keyval = MPI_KEYVAL_INVALID
static

Definition at line 1024 of file xt_ddt_create.c.

◆ xt_ddt_internal_keyval

int xt_ddt_internal_keyval = MPI_KEYVAL_INVALID
static

Definition at line 1020 of file xt_ddt_create.c.