Open3D (C++ API)  0.17.0
Data Structures | Namespaces | Macros
Dispatch.h File Reference

(9238339 (Tue Mar 14 18:49:09 2023 -0700))

#include "open3d/core/Dtype.h"
#include "open3d/utility/Logging.h"
#include "open3d/utility/MiniVec.h"

Go to the source code of this file.

Data Structures

struct  open3d::utility::MiniVecHash< T, N >
 
struct  open3d::utility::MiniVecEq< T, N >
 

Namespaces

 open3d
 
 open3d::utility
 

Macros

#define INSTANTIATE_TYPES(DTYPE, DIM)
 
#define DIM_SWITCHER(DTYPE, DIM, ...)
 
#define DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE(DTYPE, DIM, ...)
 

Macro Definition Documentation

◆ DIM_SWITCHER

#define DIM_SWITCHER (   DTYPE,
  DIM,
  ... 
)
Value:
if (DIM == 1) { \
INSTANTIATE_TYPES(DTYPE, 1) \
return __VA_ARGS__(); \
} else if (DIM == 2) { \
INSTANTIATE_TYPES(DTYPE, 2) \
return __VA_ARGS__(); \
} else if (DIM == 3) { \
INSTANTIATE_TYPES(DTYPE, 3) \
return __VA_ARGS__(); \
} else if (DIM == 4) { \
INSTANTIATE_TYPES(DTYPE, 4) \
return __VA_ARGS__(); \
} else if (DIM == 5) { \
INSTANTIATE_TYPES(DTYPE, 5) \
return __VA_ARGS__(); \
} else if (DIM == 6) { \
INSTANTIATE_TYPES(DTYPE, 6) \
return __VA_ARGS__(); \
} else { \
"Unsupported dim {}, please modify {} and compile from " \
"source", \
DIM, __FILE__); \
}
#define LogError(...)
Definition: Logging.h:48

◆ DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE

#define DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE (   DTYPE,
  DIM,
  ... 
)
Value:
[&] { \
if (DTYPE == open3d::core::Int64) { \
DIM_SWITCHER(int64_t, DIM, __VA_ARGS__) \
} else if (DTYPE == open3d::core::Int32) { \
DIM_SWITCHER(int, DIM, __VA_ARGS__) \
} else if (DTYPE == open3d::core::Int16) { \
DIM_SWITCHER(short, DIM, __VA_ARGS__) \
} else { \
"Unsupported dtype {}, please use integer types (Int64, " \
"Int32, Int16).", \
DTYPE.ToString()); \
} \
}()
const Dtype Int64
Definition: Dtype.cpp:47
const Dtype Int32
Definition: Dtype.cpp:46
const Dtype Int16
Definition: Dtype.cpp:45

◆ INSTANTIATE_TYPES

#define INSTANTIATE_TYPES (   DTYPE,
  DIM 
)
Value:
using key_t = utility::MiniVec<DTYPE, DIM>; \
using hash_t = utility::MiniVecHash<DTYPE, DIM>; \
using eq_t = utility::MiniVecEq<DTYPE, DIM>;