Yet Another eXchange Tool 0.11.3
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <mpi.h>
#include "xt/xt_idxlist.h"
#include "xt_idxlist_internal.h"
#include "xt/xt_idxvec.h"
#include "xt/xt_xmap.h"
#include "xt_xmap_internal.h"
#include "xt/xt_mpi.h"
#include "xt_mpi_internal.h"
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_xmap_intersection.h"
#include "xt_xmap_intersection_common.h"
#include "ensure_array_size.h"
#include "xt_arithmetic_util.h"
#include "xt_config_internal.h"
Go to the source code of this file.
Classes | |
struct | Xt_xmap_iter_intersection_ |
struct | exchange_data |
struct | Xt_xmap_intersection_ |
struct | tpd_result |
struct | pos_count_max |
struct | a2abuf |
struct | spread_state |
Typedefs | |
typedef struct Xt_xmap_iter_intersection_ * | Xt_xmap_iter_intersection |
typedef struct Xt_xmap_intersection_ * | Xt_xmap_intersection |
typedef int(* | Xt_pos_copy) (size_t num_pos, int *pos, const int *orig_pos, const void *state) |
Enumerations | |
enum | { bitsPerCoverageElement = sizeof (unsigned long) * CHAR_BIT } |
Functions | |
static MPI_Comm | xmap_intersection_get_communicator (Xt_xmap xmap) |
static int | xmap_intersection_get_num_destinations (Xt_xmap xmap) |
static int | xmap_intersection_get_num_sources (Xt_xmap xmap) |
static void | xmap_intersection_get_destination_ranks (Xt_xmap xmap, int *ranks) |
static void | xmap_intersection_get_source_ranks (Xt_xmap xmap, int *ranks) |
static Xt_xmap_iter | xmap_intersection_get_in_iterator (Xt_xmap xmap) |
static Xt_xmap_iter | xmap_intersection_get_out_iterator (Xt_xmap xmap) |
static Xt_xmap | xmap_intersection_copy (Xt_xmap xmap) |
static void | xmap_intersection_delete (Xt_xmap xmap) |
static int | xmap_intersection_iterator_next (Xt_xmap_iter iter) |
static int | xmap_intersection_iterator_get_rank (Xt_xmap_iter iter) |
static int const * | xmap_intersection_iterator_get_transfer_pos (Xt_xmap_iter iter) |
static int | xmap_intersection_iterator_get_num_transfer_pos (Xt_xmap_iter iter) |
static const struct Xt_pos_ext * | xmap_intersection_iterator_get_transfer_pos_ext (Xt_xmap_iter iter) |
static int | xmap_intersection_iterator_get_num_transfer_pos_ext (Xt_xmap_iter iter) |
static void | xmap_intersection_iterator_delete (Xt_xmap_iter iter) |
static int | xmap_intersection_get_max_src_pos (Xt_xmap xmap) |
static int | xmap_intersection_get_max_dst_pos (Xt_xmap xmap) |
static Xt_xmap | xmap_intersection_reorder (Xt_xmap xmap, enum xt_reorder_type type, Xt_config config) |
static Xt_xmap | xmap_intersection_update_positions (Xt_xmap xmap, const int *src_positions, const int *dst_positions) |
static Xt_xmap | xmap_intersection_spread (Xt_xmap xmap, int num_repetitions, const int src_displacements[num_repetitions], const int dst_displacements[num_repetitions]) |
static Xt_xmap_iter_intersection | xmii (void *iter) |
static Xt_xmap_intersection | xmi (void *xmap) |
static struct tpd_result | generate_dir_transfer_pos_dst (int num_intersections, const struct Xt_com_list intersections[num_intersections], Xt_idxlist mypart_idxlist, struct exchange_data *restrict resSets, int *restrict num_indices_to_remove_per_intersection) |
static struct pos_count_max | generate_dir_transfer_pos_src (int num_intersections, const struct Xt_com_list intersections[num_intersections], Xt_idxlist mypart_idxlist, struct exchange_data *restrict resSets, const Xt_int *indices_to_remove, const int *num_indices_to_remove_per_intersection) |
static Xt_int * | exchange_points_to_remove (int num_src_intersections, const struct Xt_com_list src_com[num_src_intersections], int num_dst_intersections, const struct Xt_com_list dst_com[num_dst_intersections], int *restrict num_src_indices_to_remove_per_intersection, Xt_int *dst_indices_to_remove, const int *restrict num_dst_indices_to_remove_per_intersection, int tag_offset, MPI_Comm comm) |
static int | generate_transfer_pos (struct Xt_xmap_intersection_ *xmap, int num_src_intersections, const struct Xt_com_list src_com[num_src_intersections], int num_dst_intersections, const struct Xt_com_list dst_com[num_dst_intersections], Xt_idxlist src_idxlist_local, Xt_idxlist dst_idxlist_local, MPI_Comm comm) |
Xt_xmap | xt_xmap_intersection_new (int num_src_intersections, const struct Xt_com_list src_com[num_src_intersections], int num_dst_intersections, const struct Xt_com_list dst_com[num_dst_intersections], Xt_idxlist src_idxlist, Xt_idxlist dst_idxlist, MPI_Comm comm) |
Xt_xmap | xt_xmap_intersection_custom_new (int num_src_intersections, const struct Xt_com_list src_com[num_src_intersections], int num_dst_intersections, const struct Xt_com_list dst_com[num_dst_intersections], Xt_idxlist src_idxlist, Xt_idxlist dst_idxlist, MPI_Comm comm, Xt_config XT_UNUSED(config)) |
static int | pos_copy_verbatim (size_t num_pos, int *pos, const int *orig_pos, const void *state) |
static void | xmap_intersection_msg_copy (size_t nmsg, const struct exchange_data *restrict msg, int *nmsg_copy, struct exchange_data *restrict msg_copy, int *max_pos_, int num_repetitions, Xt_pos_copy pos_copy, const void *pos_copy_state) |
static Xt_xmap | xmap_intersection_copy_ (Xt_xmap xmap, int num_repetitions, Xt_pos_copy pos_copy_in, const void *pci_state, Xt_pos_copy pos_copy_out, const void *pco_state) |
static void | xmap_intersection_msg_delete (int nmsg, struct exchange_data *msg) |
static struct a2abuf | setup_buffer (int comm_size, int n, const struct exchange_data *msgs) |
static void | reorder_transfer_pos (int n_out, int n_in, struct exchange_data *out_msg, struct exchange_data *in_msg, MPI_Comm comm, Xt_config config) |
static int | subst_positions (size_t num_pos, int *restrict pos, const int *restrict orig_pos, const void *new_pos_) |
static int | pos_copy_spread (size_t num_pos, int *restrict pos, const int *restrict orig_pos, const void *state) |
static struct pos_run | copy_get_pos_run_len (size_t num_pos, const int *restrict pos, int *restrict pos_copy) |
static struct pos_count_max | max_count_pos_ext_and_copy (int max_pos, size_t num_pos, const int *restrict pos, int *restrict pos_copy) |
static void | init_exchange_data_from_com_pos (int count, struct exchange_data *restrict msgs, const struct Xt_com_pos *restrict com, int *max_pos) |
Xt_xmap | xt_xmap_intersection_pos_new (int num_src_msg, const struct Xt_com_pos src_com[num_src_msg], int num_dst_msg, const struct Xt_com_pos dst_com[num_dst_msg], MPI_Comm comm) |
Variables | |
static const char | filename [] = "xt_xmap_intersection.c" |
static const struct Xt_xmap_iter_vtable | xmap_iterator_intersection_vtable |
static const struct Xt_xmap_vtable | xmap_intersection_vtable |
Definition in file xt_xmap_intersection.c.
typedef int(* Xt_pos_copy) (size_t num_pos, int *pos, const int *orig_pos, const void *state) |
Definition at line 681 of file xt_xmap_intersection.c.
typedef struct Xt_xmap_intersection_* Xt_xmap_intersection |
Definition at line 190 of file xt_xmap_intersection.c.
typedef struct Xt_xmap_iter_intersection_* Xt_xmap_iter_intersection |
Definition at line 133 of file xt_xmap_intersection.c.
anonymous enum |
Enumerator | |
---|---|
bitsPerCoverageElement |
Definition at line 238 of file xt_xmap_intersection.c.
|
inlinestatic |
Definition at line 1015 of file xt_xmap_intersection.c.
|
static |
|
static |
Definition at line 250 of file xt_xmap_intersection.c.
|
static |
Definition at line 362 of file xt_xmap_intersection.c.
|
static |
Definition at line 547 of file xt_xmap_intersection.c.
|
static |
Definition at line 1052 of file xt_xmap_intersection.c.
|
static |
Definition at line 1038 of file xt_xmap_intersection.c.
|
static |
|
static |
|
static |
Definition at line 852 of file xt_xmap_intersection.c.
|
inlinestatic |
Definition at line 829 of file xt_xmap_intersection.c.
|
static |
Definition at line 765 of file xt_xmap_intersection.c.
|
static |
Definition at line 729 of file xt_xmap_intersection.c.
|
static |
Definition at line 780 of file xt_xmap_intersection.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1154 of file xt_xmap_intersection.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 695 of file xt_xmap_intersection.c.
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
Xt_xmap xt_xmap_intersection_custom_new | ( | int | num_src_intersections, |
const struct Xt_com_list | src_com[num_src_intersections], | ||
int | num_dst_intersections, | ||
const struct Xt_com_list | dst_com[num_dst_intersections], | ||
Xt_idxlist | src_idxlist, | ||
Xt_idxlist | dst_idxlist, | ||
MPI_Comm | comm, | ||
Xt_config | XT_UNUSEDconfig ) |
Definition at line 611 of file xt_xmap_intersection.c.
Xt_xmap xt_xmap_intersection_new | ( | int | num_src_intersections, |
const struct Xt_com_list | src_com[num_src_intersections], | ||
int | num_dst_intersections, | ||
const struct Xt_com_list | dst_com[num_dst_intersections], | ||
Xt_idxlist | src_idxlist, | ||
Xt_idxlist | dst_idxlist, | ||
MPI_Comm | comm ) |
constructor for an exchange map
this operation is collective over all processes in comm
it uses the provided intersection information to generate the exchange map
[in] | num_src_intersections | number of source intersections |
[in] | src_com | array containing the source intersections with the other processes and their rank |
[in] | num_dst_intersections | number of destination intersections |
[in] | dst_com | array containing the destination intersections with the other processes and their rank |
[in] | src_idxlist | source index list |
[in] | dst_idxlist | destination index list |
[in] | comm | MPI communicator that contains all processes that part in the exchange |
Definition at line 595 of file xt_xmap_intersection.c.
Xt_xmap xt_xmap_intersection_pos_new | ( | int | num_src_msg, |
const struct Xt_com_pos | src_com[num_src_msg], | ||
int | num_dst_msg, | ||
const struct Xt_com_pos | dst_com[num_dst_msg], | ||
MPI_Comm | comm ) |
constructor for an exchange map
this operation is collective over all processes in comm
it uses the provided intersection information to generate the exchange map
[in] | num_src_msg | number of source messages |
[in] | src_com | array containing relative positions for all source messages and the destination rank |
[in] | num_dst_msg | number of destination messages |
[in] | dst_com | array containing relative positions for all destination messages and the source rank |
[in] | comm | MPI communicator that contains all processes that part in the exchange |
Definition at line 1075 of file xt_xmap_intersection.c.
|
static |
Definition at line 75 of file xt_xmap_intersection.c.
|
static |
Definition at line 150 of file xt_xmap_intersection.c.
|
static |
Definition at line 123 of file xt_xmap_intersection.c.