Yet Another eXchange Tool
0.9.0
|
index list declaration More...
Go to the source code of this file.
Classes | |
struct | Xt_bounds |
Functions | |
void | xt_idxlist_delete (Xt_idxlist idxlist) |
size_t | xt_idxlist_get_pack_size (Xt_idxlist idxlist, MPI_Comm comm) |
void | xt_idxlist_pack (Xt_idxlist idxlist, void *buffer, int buffer_size, int *position, MPI_Comm comm) |
Xt_idxlist | xt_idxlist_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm) |
Xt_idxlist | xt_idxlist_get_intersection (Xt_idxlist idxlist_src, Xt_idxlist idxlist_dst) |
Xt_idxlist | xt_idxlist_copy (Xt_idxlist idxlist) |
int | xt_idxlist_get_num_indices (Xt_idxlist idxlist) |
void | xt_idxlist_get_indices (Xt_idxlist idxlist, Xt_int *indices) |
const Xt_int * | xt_idxlist_get_indices_const (Xt_idxlist idxlist) |
void | xt_idxlist_get_index_stripes (Xt_idxlist idxlist, struct Xt_stripe **stripes, int *num_stripes) |
int | xt_idxlist_get_index_at_position (Xt_idxlist idxlist, int position, Xt_int *index) |
int | xt_idxlist_get_indices_at_positions (Xt_idxlist idxlist, const int *positions, int num_pos, Xt_int *indices, Xt_int undef_idx) |
int | xt_idxlist_get_position_of_index (Xt_idxlist idxlist, Xt_int index, int *position) |
int | xt_idxlist_get_positions_of_indices (Xt_idxlist idxlist, const Xt_int *indices, int num_indices, int *positions, int single_match_only) |
int | xt_idxlist_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) |
int | xt_idxlist_get_position_of_index_off (Xt_idxlist idxlist, Xt_int index, int *position, int offset) |
int | xt_idxlist_get_positions_of_indices_off (Xt_idxlist idxlist, const Xt_int *indices, int num_indices, int *positions, int *offsets) |
Xt_int | xt_idxlist_get_min_index (Xt_idxlist idxlist) |
Xt_int | xt_idxlist_get_max_index (Xt_idxlist idxlist) |
void | xt_idxlist_get_bounding_box (Xt_idxlist idxlist, unsigned ndim, const Xt_int global_size[ndim], Xt_int global_start_index, struct Xt_bounds bounds[ndim]) |
Xt_uid | xt_idxlist_get_uid (Xt_idxlist idxlist) |
index list declaration
contains declaration for the index list datatype
Definition in file xt_idxlist.h.
Xt_idxlist xt_idxlist_copy | ( | Xt_idxlist | idxlist | ) |
generates a copy of a given index list
[in] | idxlist | index list that is to be copied |
Definition at line 93 of file xt_idxlist.c.
void xt_idxlist_delete | ( | Xt_idxlist | idxlist | ) |
destructor for an index list
[in] | idxlist | index list that is to be destroyed |
Definition at line 74 of file xt_idxlist.c.
void xt_idxlist_get_bounding_box | ( | Xt_idxlist | idxlist, |
unsigned | ndim, | ||
const Xt_int | global_size[ndim], | ||
Xt_int | global_start_index, | ||
struct Xt_bounds | bounds[ndim] | ||
) |
computes an n-dimensional bounding box around the given index list
[in] | idxlist | index list |
[in] | ndim | number of dimension of the bounding box |
[in] | global_size | global size of the n-dimensional index space for which the bounding box is to be computed |
[in] | global_start_index | lowest index of the index space (typically 0 or 1) |
[out] | bounds | bounds of the bounding box |
Definition at line 332 of file xt_idxlist.c.
int xt_idxlist_get_index_at_position | ( | Xt_idxlist | idxlist, |
int | position, | ||
Xt_int * | index | ||
) |
gets the index stored at the specified position in an index list
[in] | idxlist | index list |
[in] | position | position of the index that is to be retrieved |
[out] | index | index stored in the index list at the given position |
Definition at line 158 of file xt_idxlist.c.
void xt_idxlist_get_index_stripes | ( | Xt_idxlist | idxlist, |
struct Xt_stripe ** | stripes, | ||
int * | num_stripes | ||
) |
returns the indices stored in an index list the indices are returned in form of stripes (with stride 1)
[in] | idxlist | index list for which the indices are to be returned |
[out] | stripes | array containing the stripes (user is responsible for freeing the memory associated with the stripes) |
[out] | num_stripes | number of stripes in array "stripes" |
Definition at line 118 of file xt_idxlist.c.
void xt_idxlist_get_indices | ( | Xt_idxlist | idxlist, |
Xt_int * | indices | ||
) |
gets the indices stored in an index list
[in] | idxlist | index list for which the indices are to be returned |
[in,out] | indices | array into which the indices are written |
Definition at line 102 of file xt_idxlist.c.
int xt_idxlist_get_indices_at_positions | ( | Xt_idxlist | idxlist, |
const int * | positions, | ||
int | num_pos, | ||
Xt_int * | indices, | ||
Xt_int | undef_idx | ||
) |
get indices stored at the specified positions in an index list
[in] | idxlist | index list |
[in] | positions | positions of the selected indices |
[in] | num_pos | number of positions |
[out] | indices | selected indices |
[in] | undef_idx | fallback value that is used if a position is invalid |
Definition at line 165 of file xt_idxlist.c.
const Xt_int* xt_idxlist_get_indices_const | ( | Xt_idxlist | idxlist | ) |
gets a pointer of the constant indices stored in an index list
[in] | idxlist | index list for which the indices are to be returned |
Definition at line 108 of file xt_idxlist.c.
Xt_idxlist xt_idxlist_get_intersection | ( | Xt_idxlist | idxlist_src, |
Xt_idxlist | idxlist_dst | ||
) |
computes the intersection between two index lists
[in] | idxlist_src | index list for sender |
[in] | idxlist_dst | index list for receiver |
Definition at line 90 of file xt_idxlist_intersection.c.
Xt_int xt_idxlist_get_max_index | ( | Xt_idxlist | idxlist | ) |
gets the largest index stored in the index list
[in] | idxlist | index list |
Definition at line 312 of file xt_idxlist.c.
Xt_int xt_idxlist_get_min_index | ( | Xt_idxlist | idxlist | ) |
gets the smallest index stored in the index list
[in] | idxlist | index list |
Definition at line 307 of file xt_idxlist.c.
int xt_idxlist_get_num_indices | ( | Xt_idxlist | idxlist | ) |
returns the number of indices stored in the given index list
[in] | idxlist | index list for which the number of indices is required |
Definition at line 98 of file xt_idxlist.c.
size_t xt_idxlist_get_pack_size | ( | Xt_idxlist | idxlist, |
MPI_Comm | comm | ||
) |
computes the buffer size in byte that is required to pack the given index list using MPI_Pack
[in] | idxlist | index list for which the packed size needs to be computed |
[in] | comm | MPI communicator that will be used to send the buffer for which the size is computed |
Definition at line 79 of file xt_idxlist.c.
int xt_idxlist_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 | ||
) |
maps the positions of the first occurrence of the given index stripes in the stored index list
[in] | idxlist | index list in which the given index is to be searched |
[in] | num_stripes | number of stripes in the array stripes |
[in] | stripes | stripes of indices that are to be searched |
[out] | num_ext | number of extents allocated in pos_exts |
[out] | pos_ext | ranges of positions for the first occurrence of the indices from stripes in idxlist the pointee is newly allocated and must be freed by the caller |
[in] | single_match_only | if true then do not consider a previous matching position again in the next index search - this is required on the target side in order to avoid multiple writes to the same memory position |
Definition at line 237 of file xt_idxlist.c.
int xt_idxlist_get_position_of_index | ( | Xt_idxlist | idxlist, |
Xt_int | index, | ||
int * | position | ||
) |
gets the position of the first occurrence of the given index in the stored index list
[in] | idxlist | index list in which the given index is to be searched |
[in] | index | index that is to be searched |
[out] | position | position of the first occurrence of index in idxlist, or -1 if there is no match |
Definition at line 196 of file xt_idxlist.c.
int xt_idxlist_get_position_of_index_off | ( | Xt_idxlist | idxlist, |
Xt_int | index, | ||
int * | position, | ||
int | offset | ||
) |
gets the position of the first occurrence of the given index following the given offset in the stored index list idxlist
[in] | idxlist | index list in which the given index is to be searched |
[in] | index | index that is to be searched |
[out] | position | position of the first occurrence of index in idxlist with a position >= offset |
[in] | offset | offset in the index list from which on the search is to be conducted |
Definition at line 264 of file xt_idxlist.c.
int xt_idxlist_get_positions_of_indices | ( | Xt_idxlist | idxlist, |
const Xt_int * | indices, | ||
int | num_indices, | ||
int * | positions, | ||
int | single_match_only | ||
) |
gets the positions of the first occurrence of the given indices in the stored index list
[in] | idxlist | index list in which the given index is to be searched |
[in] | indices | indices that are to be searched |
[in] | num_indices | number of indices in the array "indices" |
[out] | positions | positions of the first occurrence of the indices in idxlist |
[in] | single_match_only | if true then do not consider a previous matching position again in the next index search - this is required on the target side in order to avoid multiple writes to the same memory position |
Definition at line 203 of file xt_idxlist.c.
int xt_idxlist_get_positions_of_indices_off | ( | Xt_idxlist | idxlist, |
const Xt_int * | indices, | ||
int | num_indices, | ||
int * | positions, | ||
int * | offsets | ||
) |
gets the positions of the first occurrence of the given indices following the given offsets in the stored index list
[in] | idxlist | index list in which the given index is to be searched |
[in] | indices | indices that are to be searched |
[in] | num_indices | number of indices in that array "indices" |
[out] | positions | positions of the first occurrence of the indices[i] in idxlist with positions[i] >= offsets[i] |
[in] | offsets | offsets in the index list from which on the search is to be conducted |
Definition at line 272 of file xt_idxlist.c.
Xt_uid xt_idxlist_get_uid | ( | Xt_idxlist | idxlist | ) |
return unique list id, where unique means no other index list will return the same id within the same task, also all valid UIDs are non-zero
[in] | idxlist | index list of which to query unique id |
Definition at line 425 of file xt_idxlist.c.
void xt_idxlist_pack | ( | Xt_idxlist | idxlist, |
void * | buffer, | ||
int | buffer_size, | ||
int * | position, | ||
MPI_Comm | comm | ||
) |
packs an index list into previously allocated buffer using MPI_Pack
[in] | idxlist | index list, which needs be packed into the buffer |
[in,out] | buffer | previously allocated buffer into which the index list will be packed |
[in] | buffer_size | size of buffer in bytes |
[in,out] | position | position in buffer at which the data of idxlist will be copied (position is automatically updated to the first byte after the packed data) |
[in] | comm | MPI communicator that will be used to send the buffer |
Definition at line 85 of file xt_idxlist.c.
Xt_idxlist xt_idxlist_unpack | ( | void * | buffer, |
int | buffer_size, | ||
int * | position, | ||
MPI_Comm | comm | ||
) |
unpacks an index list from buffer
[in] | buffer | buffer that contains the packed index list |
[in] | buffer_size | size of the buffer in bytes |
[in,out] | position | position in the buffer at which the unpacking should start (will automatically be set to the position after the unpacked data) |
[in] | comm | MPI communicator that was used to receive the buffer |
Definition at line 73 of file xt_idxlist_unpack.c.