93 size_t num_stripes_alloc);
108 int * position,
int offset);
112 size_t num_indices,
int *positions,
113 int single_match_only);
121 int single_match_only,
126 int num_indices,
int * positions,
158 .get_bounding_box = NULL,
159 .idxlist_pack_code =
EMPTY,
191 xt_mpi_call(MPI_Pack_size(1, MPI_INT, comm, &size_int_type), comm);
193 return (
size_t)size_int_type;
201 static const int type =
EMPTY;
203 xt_mpi_call(MPI_Pack(CAST_MPI_SEND_BUF(&type), 1, MPI_INT, buffer,
204 buffer_size, position, comm), comm);
249 size_t num_stripes_alloc) {
251 (void)num_stripes_alloc;
268 assert(num_pos >= 0);
270 for (
int i = 0; i < num_pos; ++i)
271 index[i] = undef_idx;
294 size_t num_selection,
298 return num_selection;
312 unsigned num_idx = 0;
314 for (
size_t i = 0; i < (size_t)num_stripes; ++i)
315 num_idx += (
unsigned)stripes[i].
nstrides;
332 die(
"idxempty_get_min_index: empty index list");
341 die(
"idxempty_get_max_index: empty index list");
add versions of standard API functions not returning on error
struct Xt_idxlist_ parent
struct Xt_config_ * Xt_config
base definitions header file
struct Xt_idxlist_ * Xt_idxlist
static int idxempty_get_sorting(Xt_idxlist idxlist)
static void idxempty_get_index_stripes(Xt_idxlist idxlist, struct Xt_stripe *stripes, size_t num_stripes_alloc)
static Xt_int const * idxempty_get_indices_const(Xt_idxlist idxlist)
static Xt_int idxempty_get_max_index(Xt_idxlist idxlist)
static size_t idxempty_get_positions_of_indices(Xt_idxlist idxlist, Xt_int const *indices, size_t num_indices, int *positions, int single_match_only)
static void idxempty_delete(Xt_idxlist data)
static int idxempty_get_pos_exts_of_index_stripes(Xt_idxlist idxlist, int num_stripes, const struct Xt_stripe *stripes, int *num_ext, struct Xt_pos_ext **pos_ext, int single_match_only, Xt_config config)
static int idxempty_get_position_of_index(Xt_idxlist idxlist, Xt_int index, int *position)
static int idxempty_get_position_of_index_off(Xt_idxlist idxlist, Xt_int index, int *position, int offset)
static size_t idxempty_get_pack_size(Xt_idxlist data, MPI_Comm comm)
static Xt_idxlist idxempty_sorted_copy(Xt_idxlist idxlist, Xt_config config)
static int idxempty_get_indices_at_positions(Xt_idxlist idxlist, const int *positions, int num, Xt_int *index, Xt_int undef_idx)
Xt_idxlist xt_idxempty_new(void)
void xt_idxempty_finalize(void)
static const struct xt_idxlist_vtable idxempty_vtable
Xt_idxlist xt_idxempty_unpack(void *XT_UNUSED(buffer), int XT_UNUSED(buffer_size), int *XT_UNUSED(position), MPI_Comm XT_UNUSED(comm))
void xt_idxempty_init(void)
static Xt_int idxempty_get_min_index(Xt_idxlist idxlist)
static void idxempty_pack(Xt_idxlist data, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static int idxempty_get_num_index_stripes(Xt_idxlist idxlist)
static Xt_idxlist idxempty_copy(Xt_idxlist idxlist)
static int idxempty_get_positions_of_indices_off(Xt_idxlist idxlist, Xt_int const *indices, int num_indices, int *positions, int *offsets)
static int idxempty_get_index_at_position(Xt_idxlist idxlist, int position, Xt_int *index)
static void idxempty_get_indices(Xt_idxlist idxlist, Xt_int *indices)
static struct xt_idxempty idxempty
Provide non-public declarations common to all index lists.
static void Xt_idxlist_init(Xt_idxlist idxlist, const struct xt_idxlist_vtable *vtable, int num_indices)
#define xt_mpi_call(call, comm)