33 #define DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE(DTYPE, DIM, ...) \ 35 if (DTYPE == open3d::core::Dtype::Int32) { \ 37 using key_t = Block<int, 1>; \ 38 using hash_t = BlockHash<int, 1>; \ 39 return __VA_ARGS__(); \ 40 } else if (DIM == 2) { \ 41 using key_t = Block<int, 2>; \ 42 using hash_t = BlockHash<int, 2>; \ 43 return __VA_ARGS__(); \ 44 } else if (DIM == 3) { \ 45 using key_t = Block<int, 3>; \ 46 using hash_t = BlockHash<int, 3>; \ 47 return __VA_ARGS__(); \ 49 } else if (DTYPE == open3d::core::Dtype::Int64) { \ 51 using key_t = Block<int64_t, 1>; \ 52 using hash_t = BlockHash<int64_t, 1>; \ 53 return __VA_ARGS__(); \ 54 } else if (DIM == 2) { \ 55 using key_t = Block<int64_t, 2>; \ 56 using hash_t = BlockHash<int64_t, 2>; \ 57 return __VA_ARGS__(); \ 58 } else if (DIM == 3) { \ 59 using key_t = Block<int64_t, 3>; \ 60 using hash_t = BlockHash<int64_t, 3>; \ 61 return __VA_ARGS__(); \ 64 utility::LogError("Unsupported dtype {} and dim {} combination", \ 65 DTYPE.ToString(), DIM); \ 71 template <
typename T,
size_t N>
77 #if defined(__CUDA_ARCH__) 80 for (
size_t i = 0; i < N; ++i) {
81 data_[i] = other.data_[i];
86 #if defined(__CUDA_ARCH__) 89 for (
size_t i = 0; i < N; ++i) {
90 data_[i] = other.data_[i];
98 #if defined(__CUDA_ARCH__) 101 for (
size_t i = 0; i < N; ++i) {
102 is_eq = is_eq && (data_[i] == other.data_[i]);
114 template <
typename T,
size_t N>
118 uint64_t hash = UINT64_C(14695981039346656037);
119 #if defined(__CUDA_ARCH__) 122 for (
size_t i = 0; i < N; ++i) {
124 hash *= UINT64_C(1099511628211);
OPEN3D_HOST_DEVICE Block< T, N > & operator=(const Block< T, N > &other)
Definition: Dispatch.h:85
OPEN3D_HOST_DEVICE T Get(size_t i) const
Definition: Dispatch.h:107
Definition: Dispatch.h:115
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample uint64_t
Definition: K4aPlugin.cpp:352
#define OPEN3D_HOST_DEVICE
Definition: CUDAUtils.h:56
Definition: Dispatch.h:72
OPEN3D_HOST_DEVICE void Set(size_t i, const T &value)
Definition: Dispatch.h:108
OPEN3D_HOST_DEVICE bool operator==(const Block< T, N > &other) const
Definition: Dispatch.h:96
OPEN3D_HOST_DEVICE uint64_t operator()(const Block< T, N > &key) const
Definition: Dispatch.h:117
Definition: PinholeCameraIntrinsic.cpp:35
OPEN3D_HOST_DEVICE Block(const Block< T, N > &other)
Definition: Dispatch.h:76