Yet Another eXchange Tool 0.11.2
|
#include <stdbool.h>
#include <stdlib.h>
#include "xt/xt_stripe.h"
#include "core/ppm_visibility.h"
#include "xt_arithmetic_util.h"
Go to the source code of this file.
Classes | |
struct | Xt_minmax |
struct | Xt_stripe_summary |
Macros | |
#define | XT_SORT_FLAGS(ntrans_up, ntrans_dn) |
Enumerations | |
enum | { sort_dsc , sort_uns , sort_asc , sort_idt , sort_mask = 3 } |
Functions | |
static struct Xt_minmax | xt_stripe2minmax (struct Xt_stripe stripe) |
static int | xt_stripes_eq (struct Xt_stripe a, struct Xt_stripe b) |
static int | xt_stripes_overlap (struct Xt_stripe a, struct Xt_stripe b) |
PPM_DSO_INTERNAL size_t | xt_indices_count_stripes (size_t num_indices, const Xt_int indices[num_indices]) |
PPM_DSO_INTERNAL size_t | xt_convert_indices_to_stripes_buf (size_t num_indices, const Xt_int *restrict indices, size_t num_stripes_alloc, struct Xt_stripe *stripes) |
PPM_DSO_INTERNAL void | xt_convert_indices_to_stripes_keep_buf (const Xt_int *restrict indices, int num_indices, struct Xt_stripe **stripes, int *num_stripes) |
PPM_DSO_INTERNAL size_t | xt_stripes_merge_copy (size_t num_stripes, struct Xt_stripe *stripes_dst, const struct Xt_stripe *stripes_src, bool lookback) |
PPM_DSO_INTERNAL struct Xt_stripe_summary | xt_summarize_stripes (size_t num_stripes, const struct Xt_stripe stripes[num_stripes]) |
PPM_DSO_INTERNAL bool | xt_stripes_detect_duplicate (size_t num_stripes, const struct Xt_stripe stripes[num_stripes], struct Xt_minmax index_range) |
Definition in file xt_stripe_util.h.
#define XT_SORT_FLAGS | ( | ntrans_up, | |
ntrans_dn ) |
Definition at line 148 of file xt_stripe_util.h.
anonymous enum |
Enumerator | |
---|---|
sort_dsc | |
sort_uns | |
sort_asc | |
sort_idt | |
sort_mask |
Definition at line 140 of file xt_stripe_util.h.
PPM_DSO_INTERNAL size_t xt_convert_indices_to_stripes_buf | ( | size_t | num_indices, |
const Xt_int *restrict | indices, | ||
size_t | num_stripes_alloc, | ||
struct Xt_stripe * | stripes ) |
Writes stripes to buffer that must be of sufficient size.
Definition at line 126 of file xt_stripe.c.
PPM_DSO_INTERNAL void xt_convert_indices_to_stripes_keep_buf | ( | const Xt_int *restrict | indices, |
int | num_indices, | ||
struct Xt_stripe ** | stripes, | ||
int * | num_stripes ) |
Re-use pre-existing heap buffer and resize as necessary.
Definition at line 106 of file xt_stripe.c.
PPM_DSO_INTERNAL size_t xt_indices_count_stripes | ( | size_t | num_indices, |
const Xt_int | indices[num_indices] ) |
Establish number of stripes needed to represent vector of indices.
Definition at line 77 of file xt_stripe.c.
Definition at line 70 of file xt_stripe_util.h.
PPM_DSO_INTERNAL bool xt_stripes_detect_duplicate | ( | size_t | num_stripes, |
const struct Xt_stripe | stripes[num_stripes], | ||
struct Xt_minmax | index_range ) |
Definition at line 237 of file xt_stripe.c.
PPM_DSO_INTERNAL size_t xt_stripes_merge_copy | ( | size_t | num_stripes, |
struct Xt_stripe * | stripes_dst, | ||
const struct Xt_stripe * | stripes_src, | ||
bool | lookback ) |
copy stripes_src to stripes_dst, fusing trivially adjacent stripes (i.e. having same stride and matching bounds)
num_stripes | number of stripes stored at stripes_src |
stripes_dst | target array able to hold at least num_stripes stripes |
stripes_src | source array containing num_stripes stripes to be copied to stripes_dst |
lookback | if true, inspects also stripes_dst[-1] for possible fusion with stripes_src[0] |
Definition at line 163 of file xt_stripe.c.
PPM_DSO_INTERNAL struct Xt_stripe_summary xt_summarize_stripes | ( | size_t | num_stripes, |
const struct Xt_stripe | stripes[num_stripes] ) |
Definition at line 204 of file xt_stripe.c.