24 const Tensor& points_row_splits,
25 const Tensor& hash_table_splits,
27 Tensor& hash_table_cell_splits) {
33 hash_table_cell_splits.
GetShape()[0],
38 template <
class T,
class TIndex>
42 const Tensor& points_row_splits,
43 const Tensor& queries_row_splits,
44 const Tensor& hash_table_splits,
45 const Tensor& hash_table_index,
46 const Tensor& hash_table_cell_splits,
48 const bool ignore_query_point,
49 const bool return_distances,
52 Tensor& neighbors_row_splits,
53 Tensor& neighbors_distance) {
57 impl::FixedRadiusSearchCPU<T, TIndex>(
65 hash_table_cell_splits.
GetShape()[0],
67 hash_table_index.
GetDataPtr<uint32_t>(), metric, ignore_query_point,
68 return_distances, output_allocator);
74 template <
class T,
class TIndex>
79 const Tensor& points_row_splits,
80 const Tensor& queries_row_splits,
81 const Tensor& hash_table_splits,
82 const Tensor& hash_table_index,
83 const Tensor& hash_table_cell_splits,
87 Tensor& neighbors_distance) {
91 #define INSTANTIATE_BUILD(T) \
92 template void BuildSpatialHashTableCPU<T>( \
93 const Tensor& points, double radius, \
94 const Tensor& points_row_splits, const Tensor& hash_table_splits, \
95 Tensor& hash_table_index, Tensor& hash_table_cell_splits);
97 #define INSTANTIATE_RADIUS(T, TIndex) \
98 template void FixedRadiusSearchCPU<T, TIndex>( \
99 const Tensor& points, const Tensor& queries, double radius, \
100 const Tensor& points_row_splits, const Tensor& queries_row_splits, \
101 const Tensor& hash_table_splits, const Tensor& hash_table_index, \
102 const Tensor& hash_table_cell_splits, const Metric metric, \
103 const bool ignore_query_point, const bool return_distances, \
104 const bool sort, Tensor& neighbors_index, \
105 Tensor& neighbors_row_splits, Tensor& neighbors_distance);
107 #define INSTANTIATE_HYBRID(T, TIndex) \
108 template void HybridSearchCPU<T, TIndex>( \
109 const Tensor& points, const Tensor& queries, double radius, \
110 int max_knn, const Tensor& points_row_splits, \
111 const Tensor& queries_row_splits, const Tensor& hash_table_splits, \
112 const Tensor& hash_table_index, \
113 const Tensor& hash_table_cell_splits, const Metric metric, \
114 Tensor& neighbors_index, Tensor& neighbors_count, \
115 Tensor& neighbors_distance);
#define INSTANTIATE_RADIUS(T, TIndex)
#define INSTANTIATE_HYBRID(T, TIndex)
#define INSTANTIATE_BUILD(T)
SizeVector GetShape() const
const Tensor & NeighborsDistance() const
const Tensor & NeighborsIndex() const
void HybridSearchCPU(const Tensor &points, const Tensor &queries, double radius, int max_knn, const Tensor &points_row_splits, const Tensor &queries_row_splits, const Tensor &hash_table_splits, const Tensor &hash_table_index, const Tensor &hash_table_cell_splits, const Metric metric, Tensor &neighbors_index, Tensor &neighbors_count, Tensor &neighbors_distance)
void FixedRadiusSearchCPU(const Tensor &points, const Tensor &queries, double radius, const Tensor &points_row_splits, const Tensor &queries_row_splits, const Tensor &hash_table_splits, const Tensor &hash_table_index, const Tensor &hash_table_cell_splits, const Metric metric, const bool ignore_query_point, const bool return_distances, const bool sort, Tensor &neighbors_index, Tensor &neighbors_row_splits, Tensor &neighbors_distance)
void BuildSpatialHashTableCPU(const Tensor &points, double radius, const Tensor &points_row_splits, const Tensor &hash_table_splits, Tensor &hash_table_index, Tensor &hash_table_cell_splits)
Generic file read and write utility for python interface.