Yet Another eXchange Tool 0.11.4
|
Implements class hiding different bucket generators. More...
#include <stdlib.h>
#include "xt/xt_xmap_dist_dir_bucket_gen.h"
#include "xt_xmap_dist_dir_bucket_gen_internal.h"
#include "core/ppm_xfuncs.h"
Go to the source code of this file.
Functions | |
Xt_xmdd_bucket_gen | xt_xmdd_bucket_gen_new (void) |
void | xt_xmdd_bucket_gen_delete (Xt_xmdd_bucket_gen gen) |
void | xt_xmdd_bucket_gen_define_interface (Xt_xmdd_bucket_gen gen, Xt_xmdd_bucket_gen_init_state init, Xt_xmdd_bucket_gen_destroy_state destroy, Xt_xmdd_bucket_gen_get_intersect_max_num get_intersect_max_num, Xt_xmdd_bucket_gen_next next, size_t gen_state_size, void *init_params) |
Implements class hiding different bucket generators.
Definition in file xt_xmap_dist_dir_bucket_gen.c.
void xt_xmdd_bucket_gen_define_interface | ( | Xt_xmdd_bucket_gen | gen, |
Xt_xmdd_bucket_gen_init_state | init, | ||
Xt_xmdd_bucket_gen_destroy_state | destroy, | ||
Xt_xmdd_bucket_gen_get_intersect_max_num | get_intersect_max_num, | ||
Xt_xmdd_bucket_gen_next | next, | ||
size_t | gen_state_size, | ||
void * | init_params ) |
Define interface of bucket generator
Essentially, the generator needs to be able to enumerate all buckets used to form intersections. Conversely, this also means the generator only needs to produce buckets that actually can intersect and is permitted to skip buckets that won't intersect the requested type of list.
[in,out] | gen | generator interface object |
[in] | init | This function is called to set up the generator state. |
[in] | destroy | The destroy function cleans up the generator state. Can be zero, if no cleaning is needed. |
[in] | next | The next function returns the next bucket and corresponding rank (ranks can be skipped when the intersection will be empty anyway). Any previously returned buckets become invalid. |
[in] | get_intersect_max_num | This function returns, for a given state the maximal number of buckets that will be generated |
gen_state_size | number of bytes to allocate for each generator state | |
init_params | global parameters passed to each invocation of the init function |
Definition at line 71 of file xt_xmap_dist_dir_bucket_gen.c.
void xt_xmdd_bucket_gen_delete | ( | Xt_xmdd_bucket_gen | gen | ) |
Definition at line 65 of file xt_xmap_dist_dir_bucket_gen.c.
Xt_xmdd_bucket_gen xt_xmdd_bucket_gen_new | ( | void | ) |
Creates new, user-definable, bucket generator object
Definition at line 59 of file xt_xmap_dist_dir_bucket_gen.c.