Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
xt_idxstripes.c File Reference
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "xt/xt_core.h"
#include "xt_arithmetic_util.h"
#include "xt_arithmetic_long.h"
#include "xt/xt_idxlist.h"
#include "xt_idxlist_internal.h"
#include "xt/xt_idxempty.h"
#include "xt/xt_idxvec.h"
#include "xt_idxvec_internal.h"
#include "xt/xt_idxstripes.h"
#include "xt_idxstripes_internal.h"
#include "xt_stripe_util.h"
#include "xt/xt_mpi.h"
#include "xt_idxlist_unpack.h"
#include "xt_cover.h"
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "ensure_array_size.h"
#include "instr.h"
#include "xt_config_internal.h"
#include "xt_mergesort_base.h"
#include "xt_idxstripes_pos_ext_map.h"
#include "xt_heapsort_base.h"
Include dependency graph for xt_idxstripes.c:

Go to the source code of this file.

Classes

struct  Xt_stripes_sort
 
struct  Xt_idxstripes_
 
struct  extended_gcd
 
struct  Xt_stripes_lookup
 
struct  int_vec
 
struct  unmatched_tail
 

Macros

#define MIN(a, b)   (((a)<(b))?(a):(b))
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 
#define SORT_TYPE   struct Xt_stripes_sort
 
#define SORT_TYPE_SUFFIX   stripes_sort
 
#define XT_SORTFUNC_DECL   static
 
#define SORT_TYPE_CMP_LT(a, b, ...)   ((a).range.min < (b).range.min)
 
#define SORT_TYPE_CMP_LE(a, b, ...)   ((a).range.min <= (b).range.min)
 
#define SORT_TYPE_CMP_EQ(a, b, ...)   ((a).range.min == (b).range.min)
 
#define XT_IDXSTRIPES_POS_EXT_MAP_COUNT
 
#define SORT_TYPE   int
 
#define SORT_TYPE_SUFFIX   stripe_by_min
 
#define SORT_TYPE_CMP_LT(u, v, i, j)
 
#define XT_SORT_EXTRA_ARGS_DECL
 
#define XT_SORT_EXTRA_ARGS_PASS   , pfx_removed, stripes
 
#define XT_SORTFUNC_DECL   static
 

Typedefs

typedef struct Xt_idxstripes_Xt_idxstripes
 

Enumerations

enum  idxstripes_flag_bits { stripes_sort_bit = 0 , stripes_do_overlap_bit = 2 , stripes_some_have_zero_stride_bit , stripes_intersect_bit }
 
enum  idxstripes_flag_mask { stripes_do_overlap_mask = 1 << stripes_do_overlap_bit , stripes_some_have_zero_stride_mask = 1 << stripes_some_have_zero_stride_bit , stripes_intersect_mask = 1 << stripes_intersect_bit }
 

Functions

static void idxstripes_delete (Xt_idxlist data)
 
static size_t idxstripes_get_pack_size (Xt_idxlist data, MPI_Comm comm)
 
static void idxstripes_pack (Xt_idxlist data, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static Xt_idxlist idxstripes_copy (Xt_idxlist idxlist)
 
static Xt_idxlist idxstripes_sorted_copy (Xt_idxlist idxlist, Xt_config config)
 
static void idxstripes_get_indices (Xt_idxlist idxlist, Xt_int *indices)
 
static const Xt_intidxstripes_get_indices_const (Xt_idxlist idxlist)
 
static int idxstripes_get_num_index_stripes (Xt_idxlist idxlist)
 
static void idxstripes_get_index_stripes (Xt_idxlist idxlist, struct Xt_stripe *restrict stripes, size_t num_stripes_alloc)
 
static int idxstripes_get_index_at_position (Xt_idxlist idxlist, int position, Xt_int *index)
 
static int idxstripes_get_indices_at_positions (Xt_idxlist idxlist, const int *positions, int num, Xt_int *index, Xt_int undef_idx)
 
static int idxstripes_get_pos_exts_of_index_stripes (Xt_idxlist idxlist, int num_stripes, const struct Xt_stripe stripes[num_stripes], int *num_ext, struct Xt_pos_ext **pos_ext, int single_match_only, Xt_config config)
 
static int idxstripes_get_position_of_index (Xt_idxlist idxlist, Xt_int index, int *position)
 
static int idxstripes_get_position_of_index_off (Xt_idxlist idxlist, Xt_int index, int *position, int offset)
 
static Xt_int idxstripes_get_min_index (Xt_idxlist idxlist)
 
static Xt_int idxstripes_get_max_index (Xt_idxlist idxlist)
 
static int idxstripes_get_sorting (Xt_idxlist idxlist)
 
void xt_idxstripes_initialize (void)
 
void xt_idxstripes_finalize (void)
 
static Xt_idxlist idxstripes_aggregate (Xt_idxstripes idxstripes, const char *caller)
 
Xt_idxlist xt_idxstripes_congeal (struct Xt_stripes_alloc stripes_alloc)
 
static struct Xt_stripes_alloc idxstripes_alloc (size_t num_stripes)
 
struct Xt_stripes_alloc xt_idxstripes_alloc (size_t num_stripes)
 
Xt_idxlist xt_idxstripes_new (struct Xt_stripe const *stripes, int num_stripes)
 
Xt_idxlist xt_idxstripes_from_idxlist_new (Xt_idxlist idxlist_src)
 
Xt_idxlist xt_idxstripes_prealloc_new (const struct Xt_stripe *stripes, int num_stripes)
 
Xt_idxlist xt_idxstripes_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static Xt_idxlist compute_intersection_fallback (Xt_idxstripes idxstripes_src, Xt_idxstripes idxstripes_dst, Xt_config config)
 
static struct extended_gcd extended_gcd (Xt_int a, Xt_int b)
 
static struct Xt_stripe get_stripe_intersection (struct Xt_stripe stripe_a, struct Xt_stripe stripe_b)
 
static Xt_idxlist idxstripes_compute_intersection (Xt_idxstripes idxstripes_src, Xt_idxstripes idxstripes_dst)
 
Xt_idxlist xt_idxstripes_get_intersection (Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst, Xt_config config)
 
static bool stripe_contains_index (struct Xt_stripe stripe, Xt_int idx)
 
PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_get_idxvec_intersection (Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst, Xt_config XT_UNUSED(config))
 
static Xt_int stripe_min (struct Xt_stripe stripe, int pfx_remove)
 
static int stripe_min_cmp_lt (const struct Xt_stripe a, const struct Xt_stripe b, const int pfx_remove_a, const int pfx_remove_b)
 
static Xt_int retrieve_min (size_t num_src_stripes, const struct Xt_stripe *src_stripes, int *src_permutation, int *pfx_removed)
 
Xt_idxlist xt_idxstripes_sort_new (size_t num_src_stripes, const struct Xt_stripe src_stripes[], Xt_config config)
 
static Xt_idxlist idxstripes_order_invert (Xt_idxlist idxlist)
 
const struct Xt_stripext_idxstripes_get_index_stripes_const (Xt_idxlist idxlist)
 
size_t xt_idxstripes_get_num_index_stripes (Xt_idxlist idxlist)
 
static void append_ext (struct Xt_pos_ext pos_ext, struct Xt_pos_ext_vec *restrict result)
 
static void create_stripes_lookup (struct Xt_stripes_lookup *restrict db, Xt_idxstripes idxstripes)
 
static void destroy_stripes_lookup (struct Xt_stripes_lookup *restrict db)
 
static size_t bsearch_stripes_sort (size_t n, const struct Xt_stripes_sort a[n], Xt_int min_key)
 
static void find_candidates (struct Xt_stripe query, const struct Xt_stripes_lookup *restrict db, struct int_vec *candidates, bool single_match_only, struct Xt_pos_ext_vec *restrict cover, Xt_config config)
 
static struct Xt_idxstripes_expand_zero_stripes (size_t num_stripes, const struct Xt_stripe *restrict stripes)
 
static size_t idxstripes_get_pos_exts_of_index_stripe (struct Xt_stripe query, const struct Xt_stripes_lookup *restrict db, struct Xt_pos_ext_vec *restrict result, struct Xt_pos_ext_vec *restrict cover, bool single_match_only, size_t num_candidates, int *restrict candidates)
 
static size_t conditional_pos_ext_insert (struct Xt_stripe query, struct Xt_pos_ext pos_ext2add, const struct Xt_stripes_lookup *restrict db, struct Xt_pos_ext_vec *restrict result, struct Xt_pos_ext_vec *restrict cover, size_t num_candidates, int *restrict candidates)
 
static struct unmatched_tail idxstripes_complex_get_pos_exts_of_index_stripe (struct Xt_stripe query, const struct Xt_stripes_lookup *restrict stripes_lookup, struct Xt_pos_ext_vec *restrict result, struct Xt_pos_ext_vec *restrict cover, bool single_match_only, size_t num_candidates, int *restrict candidates)
 
static size_t pos_ext_insert (struct Xt_stripe query, struct Xt_pos_ext pos_ext2add, const struct Xt_stripes_lookup *stripes_lookup, struct Xt_pos_ext_vec *restrict result, struct Xt_pos_ext_vec *restrict cover, bool single_match_only, size_t num_candidates, int *restrict candidates)
 

Variables

static const struct xt_idxlist_vtable idxstripes_vtable
 
static MPI_Datatype stripe_dt
 

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

Macro Definition Documentation

◆ MAX

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

Definition at line 78 of file xt_idxstripes.c.

◆ MIN

#define MIN (   a,
 
)    (((a)<(b))?(a):(b))

Definition at line 77 of file xt_idxstripes.c.

◆ SORT_TYPE [1/2]

#define SORT_TYPE   struct Xt_stripes_sort

Definition at line 258 of file xt_idxstripes.c.

◆ SORT_TYPE [2/2]

#define SORT_TYPE   int

Definition at line 258 of file xt_idxstripes.c.

◆ SORT_TYPE_CMP_EQ

#define SORT_TYPE_CMP_EQ (   a,
  b,
  ... 
)    ((a).range.min == (b).range.min)

Definition at line 263 of file xt_idxstripes.c.

◆ SORT_TYPE_CMP_LE

#define SORT_TYPE_CMP_LE (   a,
  b,
  ... 
)    ((a).range.min <= (b).range.min)

Definition at line 262 of file xt_idxstripes.c.

◆ SORT_TYPE_CMP_LT [1/2]

#define SORT_TYPE_CMP_LT (   a,
  b,
  ... 
)    ((a).range.min < (b).range.min)

Definition at line 261 of file xt_idxstripes.c.

◆ SORT_TYPE_CMP_LT [2/2]

#define SORT_TYPE_CMP_LT (   u,
  v,
  i,
 
)
Value:
(stripe_min_cmp_lt(stripes[(u)], stripes[(v)], \
pfx_removed[(u)], pfx_removed[(v)]))
static int stripe_min_cmp_lt(const struct Xt_stripe a, const struct Xt_stripe b, const int pfx_remove_a, const int pfx_remove_b)

Definition at line 261 of file xt_idxstripes.c.

◆ SORT_TYPE_SUFFIX [1/2]

#define SORT_TYPE_SUFFIX   stripes_sort

Definition at line 259 of file xt_idxstripes.c.

◆ SORT_TYPE_SUFFIX [2/2]

#define SORT_TYPE_SUFFIX   stripe_by_min

Definition at line 259 of file xt_idxstripes.c.

◆ XT_IDXSTRIPES_POS_EXT_MAP_COUNT

#define XT_IDXSTRIPES_POS_EXT_MAP_COUNT

Definition at line 526 of file xt_idxstripes.c.

◆ XT_SORT_EXTRA_ARGS_DECL

#define XT_SORT_EXTRA_ARGS_DECL
Value:
, int *restrict pfx_removed, \
const struct Xt_stripe stripes[]

Definition at line 1077 of file xt_idxstripes.c.

◆ XT_SORT_EXTRA_ARGS_PASS

#define XT_SORT_EXTRA_ARGS_PASS   , pfx_removed, stripes

Definition at line 1079 of file xt_idxstripes.c.

◆ XT_SORTFUNC_DECL [1/2]

#define XT_SORTFUNC_DECL   static

Definition at line 260 of file xt_idxstripes.c.

◆ XT_SORTFUNC_DECL [2/2]

#define XT_SORTFUNC_DECL   static

Definition at line 260 of file xt_idxstripes.c.

Typedef Documentation

◆ Xt_idxstripes

typedef struct Xt_idxstripes_* Xt_idxstripes

Definition at line 209 of file xt_idxstripes.c.

Enumeration Type Documentation

◆ idxstripes_flag_bits

structure of flags:

  • bits 0-1 bits encode sorting
  • bit 2 is set iff any stripes overlap each other, i.e. xt_stripes_overlap(stripes[i], stripes[j]) is true for some stripes i and j which does not necessarily imply they also share indices
  • bit 3 is set iff at least one stripe has stride 0
  • bit 4 is set iff any index is part of the stripes more than once
Enumerator
stripes_sort_bit 
stripes_do_overlap_bit 
stripes_some_have_zero_stride_bit 
stripes_intersect_bit 

Definition at line 230 of file xt_idxstripes.c.

◆ idxstripes_flag_mask

Enumerator
stripes_do_overlap_mask 
stripes_some_have_zero_stride_mask 
stripes_intersect_mask 

Definition at line 239 of file xt_idxstripes.c.

Function Documentation

◆ append_ext()

static void append_ext ( struct Xt_pos_ext  pos_ext,
struct Xt_pos_ext_vec *restrict  result 
)
inlinestatic

Definition at line 1426 of file xt_idxstripes.c.

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

◆ bsearch_stripes_sort()

static size_t bsearch_stripes_sort ( size_t  n,
const struct Xt_stripes_sort  a[n],
Xt_int  min_key 
)
inlinestatic

Definition at line 1510 of file xt_idxstripes.c.

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

◆ compute_intersection_fallback()

static Xt_idxlist compute_intersection_fallback ( Xt_idxstripes  idxstripes_src,
Xt_idxstripes  idxstripes_dst,
Xt_config  config 
)
static

Definition at line 532 of file xt_idxstripes.c.

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

◆ conditional_pos_ext_insert()

static size_t conditional_pos_ext_insert ( struct Xt_stripe  query,
struct Xt_pos_ext  pos_ext2add,
const struct Xt_stripes_lookup *restrict  db,
struct Xt_pos_ext_vec *restrict  result,
struct Xt_pos_ext_vec *restrict  cover,
size_t  num_candidates,
int *restrict  candidates 
)
static

Definition at line 1974 of file xt_idxstripes.c.

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

◆ create_stripes_lookup()

static void create_stripes_lookup ( struct Xt_stripes_lookup *restrict  db,
Xt_idxstripes  idxstripes 
)
inlinestatic

Definition at line 1462 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ destroy_stripes_lookup()

static void destroy_stripes_lookup ( struct Xt_stripes_lookup *restrict  db)
inlinestatic

Definition at line 1496 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ expand_zero_stripes()

static struct Xt_idxstripes_ * expand_zero_stripes ( size_t  num_stripes,
const struct Xt_stripe *restrict  stripes 
)
static

Definition at line 1721 of file xt_idxstripes.c.

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

◆ extended_gcd()

static struct extended_gcd extended_gcd ( Xt_int  a,
Xt_int  b 
)
inlinestatic

Definition at line 585 of file xt_idxstripes.c.

◆ find_candidates()

static void find_candidates ( struct Xt_stripe  query,
const struct Xt_stripes_lookup *restrict  db,
struct int_vec candidates,
bool  single_match_only,
struct Xt_pos_ext_vec *restrict  cover,
Xt_config  config 
)
static

Definition at line 1535 of file xt_idxstripes.c.

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

◆ get_stripe_intersection()

static struct Xt_stripe get_stripe_intersection ( struct Xt_stripe  stripe_a,
struct Xt_stripe  stripe_b 
)
static

Definition at line 609 of file xt_idxstripes.c.

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

◆ idxstripes_aggregate()

static Xt_idxlist idxstripes_aggregate ( Xt_idxstripes  idxstripes,
const char *  caller 
)
static

Definition at line 284 of file xt_idxstripes.c.

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

◆ idxstripes_alloc()

static struct Xt_stripes_alloc idxstripes_alloc ( size_t  num_stripes)
static

Definition at line 373 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ idxstripes_complex_get_pos_exts_of_index_stripe()

static struct unmatched_tail idxstripes_complex_get_pos_exts_of_index_stripe ( struct Xt_stripe  query,
const struct Xt_stripes_lookup *restrict  stripes_lookup,
struct Xt_pos_ext_vec *restrict  result,
struct Xt_pos_ext_vec *restrict  cover,
bool  single_match_only,
size_t  num_candidates,
int *restrict  candidates 
)
static

Definition at line 2102 of file xt_idxstripes.c.

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

◆ idxstripes_compute_intersection()

static Xt_idxlist idxstripes_compute_intersection ( Xt_idxstripes  idxstripes_src,
Xt_idxstripes  idxstripes_dst 
)
static

Definition at line 860 of file xt_idxstripes.c.

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

◆ idxstripes_copy()

static Xt_idxlist idxstripes_copy ( Xt_idxlist  idxlist)
static

Definition at line 1037 of file xt_idxstripes.c.

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

◆ idxstripes_delete()

static void idxstripes_delete ( Xt_idxlist  data)
static

Definition at line 459 of file xt_idxstripes.c.

◆ idxstripes_get_index_at_position()

static int idxstripes_get_index_at_position ( Xt_idxlist  idxlist,
int  position,
Xt_int index 
)
static

Definition at line 1276 of file xt_idxstripes.c.

◆ idxstripes_get_index_stripes()

static void idxstripes_get_index_stripes ( Xt_idxlist  idxlist,
struct Xt_stripe *restrict  stripes,
size_t  num_stripes_alloc 
)
static

Definition at line 1236 of file xt_idxstripes.c.

◆ idxstripes_get_indices()

static void idxstripes_get_indices ( Xt_idxlist  idxlist,
Xt_int indices 
)
static

Definition at line 1206 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ idxstripes_get_indices_at_positions()

static int idxstripes_get_indices_at_positions ( Xt_idxlist  idxlist,
const int *  positions,
int  num,
Xt_int index,
Xt_int  undef_idx 
)
static

Definition at line 1305 of file xt_idxstripes.c.

◆ idxstripes_get_indices_const()

static Xt_int const * idxstripes_get_indices_const ( Xt_idxlist  idxlist)
static

Definition at line 1222 of file xt_idxstripes.c.

Here is the call graph for this function:

◆ idxstripes_get_max_index()

static Xt_int idxstripes_get_max_index ( Xt_idxlist  idxlist)
static

Definition at line 2082 of file xt_idxstripes.c.

◆ idxstripes_get_min_index()

static Xt_int idxstripes_get_min_index ( Xt_idxlist  idxlist)
static

Definition at line 2076 of file xt_idxstripes.c.

◆ idxstripes_get_num_index_stripes()

static int idxstripes_get_num_index_stripes ( Xt_idxlist  idxlist)
static

Definition at line 1261 of file xt_idxstripes.c.

◆ idxstripes_get_pack_size()

static size_t idxstripes_get_pack_size ( Xt_idxlist  data,
MPI_Comm  comm 
)
static

Definition at line 470 of file xt_idxstripes.c.

◆ idxstripes_get_pos_exts_of_index_stripe()

size_t idxstripes_get_pos_exts_of_index_stripe ( struct Xt_stripe  query,
const struct Xt_stripes_lookup *restrict  db,
struct Xt_pos_ext_vec *restrict  result,
struct Xt_pos_ext_vec *restrict  cover,
bool  single_match_only,
size_t  num_candidates,
int *restrict  candidates 
)
static

Definition at line 1875 of file xt_idxstripes.c.

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

◆ idxstripes_get_pos_exts_of_index_stripes()

int idxstripes_get_pos_exts_of_index_stripes ( Xt_idxlist  idxlist,
int  num_stripes,
const struct Xt_stripe  stripes[num_stripes],
int *  num_ext,
struct Xt_pos_ext **  pos_ext,
int  single_match_only,
Xt_config  config 
)
static

Definition at line 1761 of file xt_idxstripes.c.

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

◆ idxstripes_get_position_of_index()

static int idxstripes_get_position_of_index ( Xt_idxlist  idxlist,
Xt_int  index,
int *  position 
)
static

Definition at line 1363 of file xt_idxstripes.c.

Here is the call graph for this function:

◆ idxstripes_get_position_of_index_off()

static int idxstripes_get_position_of_index_off ( Xt_idxlist  idxlist,
Xt_int  index,
int *  position,
int  offset 
)
static

Definition at line 1370 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ idxstripes_get_sorting()

static int idxstripes_get_sorting ( Xt_idxlist  idxlist)
static

Definition at line 2088 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ idxstripes_order_invert()

static Xt_idxlist idxstripes_order_invert ( Xt_idxlist  idxlist)
static

Definition at line 1167 of file xt_idxstripes.c.

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

◆ idxstripes_pack()

static void idxstripes_pack ( Xt_idxlist  data,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Comm  comm 
)
static

Definition at line 485 of file xt_idxstripes.c.

◆ idxstripes_sorted_copy()

static Xt_idxlist idxstripes_sorted_copy ( Xt_idxlist  idxlist,
Xt_config  config 
)
static

Definition at line 1189 of file xt_idxstripes.c.

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

◆ pos_ext_insert()

static size_t pos_ext_insert ( struct Xt_stripe  query,
struct Xt_pos_ext  pos_ext2add,
const struct Xt_stripes_lookup stripes_lookup,
struct Xt_pos_ext_vec *restrict  result,
struct Xt_pos_ext_vec *restrict  cover,
bool  single_match_only,
size_t  num_candidates,
int *restrict  candidates 
)
static

Definition at line 1853 of file xt_idxstripes.c.

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

◆ retrieve_min()

static Xt_int retrieve_min ( size_t  num_src_stripes,
const struct Xt_stripe src_stripes,
int *  src_permutation,
int *  pfx_removed 
)
static

Definition at line 1085 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ stripe_contains_index()

static bool stripe_contains_index ( struct Xt_stripe  stripe,
Xt_int  idx 
)
inlinestatic

Definition at line 976 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ stripe_min()

static Xt_int stripe_min ( struct Xt_stripe  stripe,
int  pfx_remove 
)
inlinestatic

Definition at line 1045 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ stripe_min_cmp_lt()

static int stripe_min_cmp_lt ( const struct Xt_stripe  a,
const struct Xt_stripe  b,
const int  pfx_remove_a,
const int  pfx_remove_b 
)
static

Definition at line 1055 of file xt_idxstripes.c.

Here is the call graph for this function:

◆ xt_idxstripes_alloc()

struct Xt_stripes_alloc xt_idxstripes_alloc ( size_t  num_stripes)

Definition at line 367 of file xt_idxstripes.c.

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

◆ xt_idxstripes_congeal()

Xt_idxlist xt_idxstripes_congeal ( struct Xt_stripes_alloc  stripes_alloc)

Definition at line 277 of file xt_idxstripes.c.

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

◆ xt_idxstripes_finalize()

void xt_idxstripes_finalize ( void  )

Definition at line 204 of file xt_idxstripes.c.

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

◆ xt_idxstripes_from_idxlist_new()

Xt_idxlist xt_idxstripes_from_idxlist_new ( Xt_idxlist  idxlist_src)

Creates an index list that is built up of stripes of indices by converting another index list into stripes.

Parameters
[in]idxlist_srclist to convert into stripes

Definition at line 417 of file xt_idxstripes.c.

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

◆ xt_idxstripes_get_idxvec_intersection()

PPM_DSO_INTERNAL Xt_idxlist xt_idxstripes_get_idxvec_intersection ( Xt_idxlist  idxlist_src,
Xt_idxlist  idxlist_dst,
Xt_config   XT_UNUSEDconfig 
)

Definition at line 991 of file xt_idxstripes.c.

Here is the call graph for this function:

◆ xt_idxstripes_get_index_stripes_const()

const struct Xt_stripe * xt_idxstripes_get_index_stripes_const ( Xt_idxlist  idxlist)

Definition at line 1253 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ xt_idxstripes_get_intersection()

Xt_idxlist xt_idxstripes_get_intersection ( Xt_idxlist  idxlist_src,
Xt_idxlist  idxlist_dst,
Xt_config  config 
)

Definition at line 960 of file xt_idxstripes.c.

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

◆ xt_idxstripes_get_num_index_stripes()

size_t xt_idxstripes_get_num_index_stripes ( Xt_idxlist  idxlist)

Definition at line 1268 of file xt_idxstripes.c.

Here is the caller graph for this function:

◆ xt_idxstripes_initialize()

void xt_idxstripes_initialize ( void  )

Definition at line 175 of file xt_idxstripes.c.

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

◆ xt_idxstripes_new()

Xt_idxlist xt_idxstripes_new ( struct Xt_stripe const *  stripes,
int  num_stripes 
)

Generates an index list that is built up of stripes of indices.

Parameters
[in]stripesarray defining the stripes
[in]num_stripesnumber of stripes

Definition at line 394 of file xt_idxstripes.c.

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

◆ xt_idxstripes_prealloc_new()

Xt_idxlist xt_idxstripes_prealloc_new ( const struct Xt_stripe stripes,
int  num_stripes 
)

Generates an index list that is built up of stripes of indices. Does not copy the stripes. Ownership of the stripes remains with the caller and the underlying object must not be free'd before calling the destructor for the returned index list object.

Parameters
[in]stripesarray defining the stripes
[in]num_stripesnumber of stripes
Returns
index list composed of the stripes passed in

Definition at line 436 of file xt_idxstripes.c.

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

◆ xt_idxstripes_sort_new()

Xt_idxlist xt_idxstripes_sort_new ( size_t  num_stripes,
const struct Xt_stripe  stripes[],
Xt_config  config 
)

Generates an index list that is built up of stripes of indices. Copies and sorts the stripes and their contained indices, i.e. the indices in the resulting list are sorted by value.

Parameters
[in]num_stripesnumber of stripes
[in]stripesarray defining the stripes
Returns
index list composed of the stripes passed in

Definition at line 1108 of file xt_idxstripes.c.

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

◆ xt_idxstripes_unpack()

Xt_idxlist xt_idxstripes_unpack ( void *  buffer,
int  buffer_size,
int *  position,
MPI_Comm  comm 
)

Definition at line 503 of file xt_idxstripes.c.

Here is the call graph for this function:

Variable Documentation

◆ idxstripes_vtable

const struct xt_idxlist_vtable idxstripes_vtable
static
Initial value:
= {
.delete = idxstripes_delete,
.get_pack_size = idxstripes_get_pack_size,
.pack = idxstripes_pack,
.copy = idxstripes_copy,
.sorted_copy = idxstripes_sorted_copy,
.get_indices = idxstripes_get_indices,
.get_indices_const = idxstripes_get_indices_const,
.get_num_index_stripes = idxstripes_get_num_index_stripes,
.get_index_stripes = idxstripes_get_index_stripes,
.get_index_at_position = idxstripes_get_index_at_position,
.get_indices_at_positions = idxstripes_get_indices_at_positions,
.get_position_of_index = idxstripes_get_position_of_index,
.get_positions_of_indices = NULL,
.get_pos_exts_of_index_stripes = idxstripes_get_pos_exts_of_index_stripes,
.get_position_of_index_off = idxstripes_get_position_of_index_off,
.get_positions_of_indices_off = NULL,
.get_min_index = idxstripes_get_min_index,
.get_max_index = idxstripes_get_max_index,
.get_sorting = idxstripes_get_sorting,
.get_bounding_box = NULL,
.idxlist_pack_code = STRIPES,
}
@ STRIPES
static int idxstripes_get_indices_at_positions(Xt_idxlist idxlist, const int *positions, int num, Xt_int *index, Xt_int undef_idx)
static int idxstripes_get_sorting(Xt_idxlist idxlist)
static void idxstripes_delete(Xt_idxlist data)
static int idxstripes_get_num_index_stripes(Xt_idxlist idxlist)
static int idxstripes_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index, int *position, int offset)
static void idxstripes_get_indices(Xt_idxlist idxlist, Xt_int *indices)
static int idxstripes_get_position_of_index(Xt_idxlist idxlist, Xt_int index, int *position)
static void idxstripes_get_index_stripes(Xt_idxlist idxlist, struct Xt_stripe *restrict stripes, size_t num_stripes_alloc)
static void idxstripes_pack(Xt_idxlist data, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static Xt_idxlist idxstripes_sorted_copy(Xt_idxlist idxlist, Xt_config config)
static int idxstripes_get_pos_exts_of_index_stripes(Xt_idxlist idxlist, int num_stripes, const struct Xt_stripe stripes[num_stripes], int *num_ext, struct Xt_pos_ext **pos_ext, int single_match_only, Xt_config config)
static int idxstripes_get_index_at_position(Xt_idxlist idxlist, int position, Xt_int *index)
static const Xt_int * idxstripes_get_indices_const(Xt_idxlist idxlist)
static Xt_idxlist idxstripes_copy(Xt_idxlist idxlist)
static size_t idxstripes_get_pack_size(Xt_idxlist data, MPI_Comm comm)
static Xt_int idxstripes_get_max_index(Xt_idxlist idxlist)
static Xt_int idxstripes_get_min_index(Xt_idxlist idxlist)

Definition at line 143 of file xt_idxstripes.c.

◆ stripe_dt

MPI_Datatype stripe_dt
static

Definition at line 167 of file xt_idxstripes.c.