46#ifndef XT_STRIPE_UTIL_H
47#define XT_STRIPE_UTIL_H
73 Xt_int stride = stripe.stride;
74 int nstrides = stripe.nstrides;
79 return (
struct Xt_minmax){ .min =
min, .max =
max};
93 return (mma.
max >= mmb.min) & (mma.
min <= mmb.max);
101 const Xt_int indices[num_indices]);
108 const Xt_int *restrict indices,
109 size_t num_stripes_alloc,
148#define XT_SORT_FLAGS(ntrans_up, ntrans_dn) \
149 (unsigned)((!(ntrans_dn) && !(ntrans_up)) ? sort_idt \
150 : ((!(ntrans_dn)) ? sort_asc \
151 : ((!(ntrans_up)) ? sort_dsc : sort_uns)))
160 const struct
Xt_stripe stripes[num_stripes]);
164 const struct Xt_stripe stripes[num_stripes],
static Xt_int Xt_isign_mask(Xt_int x)
struct Xt_stripe_summary xt_summarize_stripes(size_t num_stripes, const struct Xt_stripe stripes[num_stripes])
static struct Xt_minmax xt_stripe2minmax(struct Xt_stripe stripe)
static int xt_stripes_overlap(struct Xt_stripe a, struct Xt_stripe b)
PPM_DSO_INTERNAL bool xt_stripes_detect_duplicate(size_t num_stripes, const struct Xt_stripe stripes[num_stripes], struct Xt_minmax index_range)
static int xt_stripes_eq(struct Xt_stripe a, struct Xt_stripe b)
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 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)