11#ifndef CUBBYFLOW_CUDA_POINT_HASH_GRID_SEARCHER3_HPP
12#define CUBBYFLOW_CUDA_POINT_HASH_GRID_SEARCHER3_HPP
14#ifdef CUBBYFLOW_USE_CUDA
19#include <cuda_runtime.h>
38 HashUtils() =
default;
40 inline CUBBYFLOW_CUDA_HOST_DEVICE HashUtils(
float gridSpacing,
43 inline CUBBYFLOW_CUDA_HOST_DEVICE
void GetNearbyKeys(
44 float4 position, uint32_t* nearbyKeys)
const;
46 inline CUBBYFLOW_CUDA_HOST_DEVICE int3
47 GetBucketIndex(float4 position)
const;
49 inline CUBBYFLOW_CUDA_HOST_DEVICE uint32_t
50 GetHashKeyFromBucketIndex(int3 bucketIndex)
const;
52 inline CUBBYFLOW_CUDA_HOST_DEVICE uint32_t
53 GetHashKeyFromPosition(float4 position)
const;
60 template <
typename Callback>
61 class ForEachNearbyPointFunc
64 inline CUBBYFLOW_CUDA_HOST_DEVICE ForEachNearbyPointFunc(
65 float r,
float gridSpacing, uint3 resolution,
const uint32_t* sit,
66 const uint32_t* eit,
const uint32_t* si,
const float4* p,
67 const float4* o, Callback cb);
69 template <
typename Index>
70 inline CUBBYFLOW_CUDA_HOST_DEVICE
void operator()(Index idx);
73 HashUtils m_hashUtils;
75 const uint32_t* m_startIndexTable;
76 const uint32_t* m_endIndexTable;
77 const uint32_t* m_sortedIndices;
78 const float4* m_points;
79 const float4* m_origins;
144 template <
typename Callback>
148 float GridSpacing()
const;
230 static Builder GetBuilder();
233 float m_gridSpacing = 1.0f;
244 std::shared_ptr<CUDAPointHashGridSearcher3>;
250class CUDAPointHashGridSearcher3::Builder
final
254 Builder& WithResolution(
const Vector3UZ& resolution);
257 Builder& WithGridSpacing(
float gridSpacing);
260 CUDAPointHashGridSearcher3 Build()
const;
263 CUDAPointHashGridSearcher3Ptr MakeShared()
const;
266 float m_gridSpacing = 1.0f;
Definition pybind11Utils.hpp:21
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
Vector3< size_t > Vector3UZ
Definition Matrix.hpp:789