|
Open3D (C++ API)
0.11.0
|
Go to the documentation of this file. 49 #define DISPATCH_DTYPE_TO_TEMPLATE(DTYPE, ...) \ 51 if (DTYPE == open3d::core::Dtype::Float32) { \ 52 using scalar_t = float; \ 53 return __VA_ARGS__(); \ 54 } else if (DTYPE == open3d::core::Dtype::Float64) { \ 55 using scalar_t = double; \ 56 return __VA_ARGS__(); \ 57 } else if (DTYPE == open3d::core::Dtype::Int32) { \ 58 using scalar_t = int32_t; \ 59 return __VA_ARGS__(); \ 60 } else if (DTYPE == open3d::core::Dtype::Int64) { \ 61 using scalar_t = int64_t; \ 62 return __VA_ARGS__(); \ 63 } else if (DTYPE == open3d::core::Dtype::UInt8) { \ 64 using scalar_t = uint8_t; \ 65 return __VA_ARGS__(); \ 66 } else if (DTYPE == open3d::core::Dtype::UInt16) { \ 67 using scalar_t = uint16_t; \ 68 return __VA_ARGS__(); \ 70 utility::LogError("Unsupported data type."); \ 74 #define DISPATCH_DTYPE_TO_TEMPLATE_WITH_BOOL(DTYPE, ...) \ 76 if (DTYPE == open3d::core::Dtype::Bool) { \ 77 using scalar_t = bool; \ 78 return __VA_ARGS__(); \ 80 DISPATCH_DTYPE_TO_TEMPLATE(DTYPE, __VA_ARGS__); \