12 #include <type_traits>
22 typename metadata_storage_t,
27 template <
typename vector_output_t>
28 using raw_output_type = std::conditional_t<!std::is_same_v<vector_output_t, std::nullptr_t>,
29 std::remove_pointer_t<vector_output_t>,
38 : nodes_{forest_nodes},
39 root_node_indexes_{forest_root_indexes},
40 node_id_mapping_{node_id_mapping},
42 num_trees_{num_trees},
50 return nodes_ + root_node_indexes_[tree_index];
#define DEVICE
Definition: gpu_support.hpp:24
#define HOST
Definition: gpu_support.hpp:23
tree_layout
Definition: tree_layout.hpp:8
uint32_t index_type
Definition: index_type.hpp:9
Definition: dbscan.hpp:18
Definition: forest.hpp:24
HOST DEVICE auto num_outputs() const
Definition: forest.hpp:65
HOST DEVICE auto * get_tree_root(index_type tree_index) const
Definition: forest.hpp:48
threshold_t io_type
Definition: forest.hpp:26
std::conditional_t<!std::is_same_v< vector_output_t, std::nullptr_t >, std::remove_pointer_t< vector_output_t >, typename node_type::threshold_type > raw_output_type
Definition: forest.hpp:30
HOST DEVICE const auto * get_node_id_mapping() const
Definition: forest.hpp:55
HOST DEVICE auto tree_count() const
Definition: forest.hpp:61
HOST DEVICE const auto * bias() const
Definition: forest.hpp:58
node< layout_v, threshold_t, index_t, metadata_storage_t, offset_t > node_type
Definition: forest.hpp:25
HOST DEVICE forest(node_type *forest_nodes, index_type *forest_root_indexes, index_type *node_id_mapping, io_type *bias, index_type num_trees, index_type num_outputs)
Definition: forest.hpp:32
threshold_t threshold_type
Definition: node.hpp:85