Fermat
|
This module defines functions to generate binary Radix Trees on top of sorted integer sequences
Classes | |
struct | cugar::cuda::Radixtree_context |
Functions | |
template<typename Tree_writer , typename Integer > | |
void | cugar::cuda::generate_radix_tree (const uint32 n_codes, const Integer *codes, const uint32 bits, const uint32 max_leaf_size, const bool keep_singletons, const bool middle_splits, Tree_writer &tree) |
template<typename Tree_writer , typename Integer > | |
void | cugar::cuda::generate_radix_tree (Radixtree_context &context, const uint32 n_codes, const Integer *codes, const uint32 bits, const uint32 max_leaf_size, const bool keep_singletons, const bool middle_splits, Tree_writer &tree) |
template<typename Tree_writer , typename Integer > | |
void | cugar::generate_radix_tree (const uint32 n_codes, const Integer *codes, const uint32 bits, const uint32 max_leaf_size, const bool keep_singletons, const bool middle_splits, Tree_writer &tree) |
void cugar::generate_radix_tree | ( | const uint32 | n_codes, |
const Integer * | codes, | ||
const uint32 | bits, | ||
const uint32 | max_leaf_size, | ||
const bool | keep_singletons, | ||
const bool | middle_splits, | ||
Tree_writer & | tree | ||
) |
Generate a binary radix tree from a set of sorted integers, splitting the set top-down at each occurrence of a bit set to 1. In practice, if the integers are seen as Morton codes, this algorithm generates a middle-split k-d tree.
n_codes | number of entries in the input set of codes |
codes | input set of codes |
bits | number of bits per code |
max_leaf_size | maximum target number of entries per leaf |
keep_singletons | mark whether to keep or suppress singleton nodes in the output tree |
middle_splits | mark whether to allow pure middle splits once a group of integers are all equal. NOTE that if this flag is set to false, the maximum leaf size cannot be guaranteed |
tree | output tree |
Generate a binary radix tree from a set of sorted integers, splitting the set top-down at each occurrence of a bit set to 1. In practice, if the integers are seen as Morton codes, this algorithm generates a middle-split k-d tree.
context | the generation context |
n_codes | number of entries in the input set of codes |
codes | input set of codes |
bits | number of bits per code |
max_leaf_size | maximum target number of entries per leaf |
keep_singletons | mark whether to keep or suppress singleton nodes in the output tree |
tree | output tree |
The Tree_writer template parameter has to provide the following interface:
The following code snippet shows how to use this builder:
void cugar::cuda::generate_radix_tree | ( | const uint32 | n_codes, |
const Integer * | codes, | ||
const uint32 | bits, | ||
const uint32 | max_leaf_size, | ||
const bool | keep_singletons, | ||
const bool | middle_splits, | ||
Tree_writer & | tree | ||
) |
Generate a binary radix tree from a set of sorted integers, splitting the set top-down at each occurrence of a bit set to 1. In practice, if the integers are seen as Morton codes, this algorithm generates a middle-split k-d tree.
context | the generation context |
n_codes | number of entries in the input set of codes |
codes | input set of codes |
bits | number of bits per code |
max_leaf_size | maximum target number of entries per leaf |
keep_singletons | mark whether to keep or suppress singleton nodes in the output tree |
tree | output tree |
The Tree_writer template parameter has to provide the following interface:
The following code snippet shows how to use this builder:
void cugar::cuda::generate_radix_tree | ( | Radixtree_context & | context, |
const uint32 | n_codes, | ||
const Integer * | codes, | ||
const uint32 | bits, | ||
const uint32 | max_leaf_size, | ||
const bool | keep_singletons, | ||
const bool | middle_splits, | ||
Tree_writer & | tree | ||
) |
Generate a binary tree from a set of sorted integers, splitting the set top-down at each occurrence of a bit set to 1. In practice, if the integers are seen as Morton codes, this algorithm generates a middle-split k-d tree.
context | the generation context |
n_codes | number of entries in the input set of codes |
codes | input set of codes |
bits | number of bits per code |
max_leaf_size | maximum target number of entries per leaf |
keep_singletons | mark whether to keep or suppress singleton nodes in the output tree |
middle_splits | mark whether to allow pure middle splits once a group of integers are all equal. NOTE that if this flag is set to false, the maximum leaf size cannot be guaranteed |
tree | output tree |