ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Dispatch.h File Reference
Include dependency graph for Dispatch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 cloudViewer
 Generic file read and write utility for python interface.
 
 cloudViewer::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:60

Definition at line 20 of file Dispatch.h.

◆ DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE

#define DISPATCH_DTYPE_AND_DIM_TO_TEMPLATE (   DTYPE,
  DIM,
  ... 
)
Value:
[&] { \
if (DTYPE == cloudViewer::core::Int64) { \
DIM_SWITCHER(int64_t, DIM, __VA_ARGS__) \
} else if (DTYPE == cloudViewer::core::Int32) { \
DIM_SWITCHER(int, DIM, __VA_ARGS__) \
} else if (DTYPE == cloudViewer::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 Int16
Definition: Dtype.cpp:45
const Dtype Int32
Definition: Dtype.cpp:46

Definition at line 47 of file Dispatch.h.

◆ 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>;

Definition at line 15 of file Dispatch.h.