Yet Another eXchange Tool 0.11.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
xt_stripe.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "xt/xt_core.h"
#include "xt/xt_stripe.h"
#include "xt_stripe_util.h"
#include "core/ppm_xfuncs.h"
#include "instr.h"
#include "ensure_array_size.h"
Include dependency graph for xt_stripe.c:

Go to the source code of this file.

Macros

#define MIN(X, Y)
 

Functions

void xt_convert_indices_to_stripes (const Xt_int *restrict indices, int num_indices, struct Xt_stripe **stripes, int *num_stripes)
 
size_t xt_indices_count_stripes (size_t num_indices, const Xt_int indices[num_indices])
 
void xt_convert_indices_to_stripes_keep_buf (const Xt_int *restrict indices, int num_indices, struct Xt_stripe **stripes, int *num_stripes)
 
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)
 
size_t xt_stripes_merge_copy (size_t num_stripes, struct Xt_stripe *stripes_dst, const struct Xt_stripe *stripes_src, bool lookback)
 
struct Xt_stripe_summary xt_summarize_stripes (size_t num_stripes, const struct Xt_stripe stripes[num_stripes])
 
bool xt_stripes_detect_duplicate (size_t num_stripes, const struct Xt_stripe stripes[num_stripes], struct Xt_minmax index_range)
 

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

Macro Definition Documentation

◆ MIN

#define MIN ( X,
Y )
Value:
((X) < (Y) ? (X) : (Y))

Definition at line 234 of file xt_stripe.c.

Function Documentation

◆ xt_convert_indices_to_stripes()

void xt_convert_indices_to_stripes ( const Xt_int *restrict indices,
int num_indices,
struct Xt_stripe ** stripes,
int * num_stripes )

Definition at line 65 of file xt_stripe.c.

Here is the call graph for this function:

◆ xt_convert_indices_to_stripes_buf()

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.

Here is the caller graph for this function:

◆ xt_convert_indices_to_stripes_keep_buf()

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.

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

◆ xt_indices_count_stripes()

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.

Here is the caller graph for this function:

◆ xt_stripes_detect_duplicate()

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.

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

◆ xt_stripes_merge_copy()

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)

Parameters
num_stripesnumber of stripes stored at stripes_src
stripes_dsttarget array able to hold at least num_stripes stripes
stripes_srcsource array containing num_stripes stripes to be copied to stripes_dst
lookbackif true, inspects also stripes_dst[-1] for possible fusion with stripes_src[0]
Returns
number of stripes written to stripes_dst

Definition at line 163 of file xt_stripe.c.

Here is the caller graph for this function:

◆ xt_summarize_stripes()

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.

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