Point Cloud Library (PCL)
1.14.1-dev
|
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <pcl/pcl_config.h>
#include <boost/preprocessor/arithmetic/add.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/stringize.hpp>
Go to the source code of this file.
Defines all the PCL and non-PCL macros used.
Definition in file pcl_macros.h.
Namespaces | |
pcl | |
Macros | |
#define | _USE_MATH_DEFINES |
#define | OPENMP_LEGACY_CONST_DATA_SHARING_RULE 0 |
#define | _PCL_DEPRECATED_IMPL(Message) |
#define | PCL_PRAGMA |
#define | _PCL_DEPRECATED_HEADER_IMPL(Message) |
#define | _PCL_PREPARE_REMOVAL_MESSAGE(Major, Minor, Msg) Msg " (It will be removed in PCL " BOOST_PP_STRINGIZE(Major.Minor) ")" |
A handy way to inform the user of the removal deadline. More... | |
#define | _PCL_COMPAT_MINOR_VERSION(Minor, IfPass, IfFail) |
Tests for Minor < PCL_MINOR_VERSION. More... | |
#define | _PCL_COMPAT_MAJOR_VERSION(Major, IfPass, IfFail) |
Tests for Major == PCL_MAJOR_VERSION. More... | |
#define | PCL_DEPRECATED(Major, Minor, Message) |
macro for compatibility across compilers and help remove old deprecated items for the Major.Minor release More... | |
#define | PCL_DEPRECATED_HEADER(Major, Minor, Message) |
macro for compatibility across compilers and help remove old deprecated headers for the Major.Minor release More... | |
#define | _MATH_DEFINES_DEFINED |
#define | M_E 2.71828182845904523536 |
#define | M_LOG2E 1.44269504088896340736 |
#define | M_LOG10E 0.434294481903251827651 |
#define | M_LN2 0.693147180559945309417 |
#define | M_LN10 2.30258509299404568402 |
#define | M_PI 3.14159265358979323846 |
#define | M_PI_2 1.57079632679489661923 |
#define | M_PI_4 0.785398163397448309616 |
#define | M_1_PI 0.318309886183790671538 |
#define | M_2_PI 0.636619772367581343076 |
#define | M_2_SQRTPI 1.12837916709551257390 |
#define | M_SQRT2 1.41421356237309504880 |
#define | M_SQRT1_2 0.707106781186547524401 |
#define | DEG2RAD(x) ((x)*0.017453293) |
#define | RAD2DEG(x) ((x)*57.29578) |
#define | PCL_LINEAR_VERSION(major, minor, patch) ((major)<<16|(minor)<<8|(patch)) |
Macro that maps version information given by major.minor.patch to a linear integer value to enable easy comparison. More... | |
#define | pcl_lrint(x) (static_cast<long int>(pcl_round(x))) |
#define | pcl_lrintf(x) (static_cast<long int>(pcl_round(x))) |
#define | pcl_sleep(x) sleep(x) |
#define | PVAR(s) #s << " = " << (s) << std::flush |
#define | PVARN(s) #s << " = " << (s) << "\n" |
#define | PVARC(s) #s << " = " << (s) << ", " << std::flush |
#define | PVARS(s) #s << " = " << (s) << " " << std::flush |
#define | PVARA(s) #s << " = " << RAD2DEG(s) << "deg" << std::flush |
#define | PVARAN(s) #s << " = " << RAD2DEG(s) << "deg\n" |
#define | PVARAC(s) #s << " = " << RAD2DEG(s) << "deg, " << std::flush |
#define | PVARAS(s) #s << " = " << RAD2DEG(s) << "deg " << std::flush |
#define | FIXED(s) std::fixed << (s) << std::resetiosflags(std::ios_base::fixed) |
#define | ERASE_STRUCT(var) memset(&(var), 0, sizeof(var)) |
#define | ERASE_ARRAY(var, size) memset(var, 0, (size)*sizeof(*(var))) |
#define | SET_ARRAY(var, value, size) { for (decltype(size) i = 0; i < (size); ++i) (var)[i]=value; } |
#define | PCL_EXTERN_C |
#define | PCL_EXPORTS |
#define | PCL_CDECL __cdecl |
#define | PCL_STDCALL __stdcall |
#define | PCLAPI(rettype) PCL_EXTERN_C PCL_EXPORTS rettype PCL_CDECL |
#define | __has_extension(x) 0 |
#define | GLIBC_MALLOC_ALIGNED 0 |
#define | FREEBSD_MALLOC_ALIGNED 0 |
#define | PCL_FALLTHROUGH |
Macro to add a no-op or a fallthrough attribute based on compiler feature. More... | |
#define | PCL_NODISCARD |
#define | PCL_IF_CONSTEXPR(x) if (x) |
#define | PCL_CONDITION_UNLIKELY(x) (x) |
Tries to inform the compiler to optimize codegen assuming that the condition will probably evaluate to false. More... | |
#define | PCL_IF_UNLIKELY(x) if PCL_CONDITION_UNLIKELY(x) |
#define | PCL_WHILE_UNLIKELY(x) while PCL_CONDITION_UNLIKELY(x) |
Functions | |
__inline double | pcl_round (double number) |
Win32 doesn't seem to have rounding functions. More... | |
__inline float | pcl_round (float number) |
void * | pcl::aligned_malloc (std::size_t size) |
void | pcl::aligned_free (void *ptr) |
#define __has_extension | ( | x | ) | 0 |
Definition at line 349 of file pcl_macros.h.
#define _MATH_DEFINES_DEFINED |
Definition at line 196 of file pcl_macros.h.
#define _PCL_COMPAT_MAJOR_VERSION | ( | Major, | |
IfPass, | |||
IfFail | |||
) |
Tests for Major == PCL_MAJOR_VERSION.
When PCL VERSION is of format 34.99.12
, this macro behaves as if it is already 35.0.0
, and allows for smoother transition for maintainers
Definition at line 142 of file pcl_macros.h.
#define _PCL_COMPAT_MINOR_VERSION | ( | Minor, | |
IfPass, | |||
IfFail | |||
) |
Tests for Minor < PCL_MINOR_VERSION.
When PCL VERSION is of format 34.12.99
, this macro behaves as if it is already 34.13.0
, and allows for smoother transition for maintainers
Definition at line 132 of file pcl_macros.h.
#define _PCL_DEPRECATED_HEADER_IMPL | ( | Message | ) |
Definition at line 116 of file pcl_macros.h.
#define _PCL_DEPRECATED_IMPL | ( | Message | ) |
Definition at line 97 of file pcl_macros.h.
#define _PCL_PREPARE_REMOVAL_MESSAGE | ( | Major, | |
Minor, | |||
Msg | |||
) | Msg " (It will be removed in PCL " BOOST_PP_STRINGIZE(Major.Minor) ")" |
A handy way to inform the user of the removal deadline.
Definition at line 123 of file pcl_macros.h.
#define _USE_MATH_DEFINES |
Definition at line 59 of file pcl_macros.h.
#define DEG2RAD | ( | x | ) | ((x)*0.017453293) |
Definition at line 225 of file pcl_macros.h.
#define ERASE_ARRAY | ( | var, | |
size | |||
) | memset(var, 0, (size)*sizeof(*(var))) |
Definition at line 306 of file pcl_macros.h.
#define ERASE_STRUCT | ( | var | ) | memset(&(var), 0, sizeof(var)) |
Definition at line 302 of file pcl_macros.h.
#define FIXED | ( | s | ) | std::fixed << (s) << std::resetiosflags(std::ios_base::fixed) |
Definition at line 298 of file pcl_macros.h.
#define FREEBSD_MALLOC_ALIGNED 0 |
Definition at line 369 of file pcl_macros.h.
#define GLIBC_MALLOC_ALIGNED 0 |
Definition at line 363 of file pcl_macros.h.
#define M_1_PI 0.318309886183790671538 |
Definition at line 206 of file pcl_macros.h.
#define M_2_PI 0.636619772367581343076 |
Definition at line 207 of file pcl_macros.h.
#define M_2_SQRTPI 1.12837916709551257390 |
Definition at line 208 of file pcl_macros.h.
#define M_E 2.71828182845904523536 |
Definition at line 198 of file pcl_macros.h.
#define M_LN10 2.30258509299404568402 |
Definition at line 202 of file pcl_macros.h.
#define M_LN2 0.693147180559945309417 |
Definition at line 201 of file pcl_macros.h.
#define M_LOG10E 0.434294481903251827651 |
Definition at line 200 of file pcl_macros.h.
#define M_LOG2E 1.44269504088896340736 |
Definition at line 199 of file pcl_macros.h.
#define M_PI 3.14159265358979323846 |
Definition at line 203 of file pcl_macros.h.
#define M_PI_2 1.57079632679489661923 |
Definition at line 204 of file pcl_macros.h.
#define M_PI_4 0.785398163397448309616 |
Definition at line 205 of file pcl_macros.h.
#define M_SQRT1_2 0.707106781186547524401 |
Definition at line 210 of file pcl_macros.h.
#define M_SQRT2 1.41421356237309504880 |
Definition at line 209 of file pcl_macros.h.
#define OPENMP_LEGACY_CONST_DATA_SHARING_RULE 0 |
Definition at line 71 of file pcl_macros.h.
#define PCL_CDECL __cdecl |
Definition at line 336 of file pcl_macros.h.
#define PCL_CONDITION_UNLIKELY | ( | x | ) | (x) |
Tries to inform the compiler to optimize codegen assuming that the condition will probably evaluate to false.
PCL_{IF,WHILE}_UNLIKELY
This tries to help the compiler optimize for the unlikely case. Most compilers assume that the condition would evaluate to true in if and while loops (reference needed) As such the opposite of this macro (PCL_CONDITION_LIKELY) will not result in significant performance improvement
Some sample usage:
Definition at line 483 of file pcl_macros.h.
#define PCL_DEPRECATED | ( | Major, | |
Minor, | |||
Message | |||
) |
macro for compatibility across compilers and help remove old deprecated items for the Major.Minor release
compiler errors of unneeded_deprecation
and major_version_mismatch
are hints to the developer that those items can be safely removed. Behavior of PCL_DEPRECATED(1, 99, "Not needed anymore")
Definition at line 158 of file pcl_macros.h.
#define PCL_DEPRECATED_HEADER | ( | Major, | |
Minor, | |||
Message | |||
) |
macro for compatibility across compilers and help remove old deprecated headers for the Major.Minor release
compiler errors of unneeded_header
and major_version_mismatch
are hints to the developer that those items can be safely removed. Behavior of PCL_DEPRECATED_HEADER(1, 99, "Use file <newfile.h> instead.")
Definition at line 178 of file pcl_macros.h.
#define PCL_EXPORTS |
Definition at line 325 of file pcl_macros.h.
#define PCL_EXTERN_C |
Definition at line 317 of file pcl_macros.h.
#define PCL_IF_CONSTEXPR | ( | x | ) | if (x) |
Definition at line 455 of file pcl_macros.h.
#define PCL_IF_UNLIKELY | ( | x | ) | if PCL_CONDITION_UNLIKELY(x) |
Definition at line 486 of file pcl_macros.h.
#define PCL_LINEAR_VERSION | ( | major, | |
minor, | |||
patch | |||
) | ((major)<<16|(minor)<<8|(patch)) |
Macro that maps version information given by major.minor.patch to a linear integer value to enable easy comparison.
Definition at line 234 of file pcl_macros.h.
#define pcl_lrint | ( | x | ) | (static_cast<long int>(pcl_round(x))) |
Definition at line 255 of file pcl_macros.h.
#define pcl_lrintf | ( | x | ) | (static_cast<long int>(pcl_round(x))) |
Definition at line 256 of file pcl_macros.h.
#define PCL_NODISCARD |
Definition at line 449 of file pcl_macros.h.
#define PCL_PRAGMA |
Definition at line 106 of file pcl_macros.h.
#define pcl_sleep | ( | x | ) | sleep(x) |
Definition at line 262 of file pcl_macros.h.
#define PCL_STDCALL __stdcall |
Definition at line 337 of file pcl_macros.h.
#define PCL_WHILE_UNLIKELY | ( | x | ) | while PCL_CONDITION_UNLIKELY(x) |
Definition at line 487 of file pcl_macros.h.
#define PCLAPI | ( | rettype | ) | PCL_EXTERN_C PCL_EXPORTS rettype PCL_CDECL |
Definition at line 344 of file pcl_macros.h.
#define PVAR | ( | s | ) | #s << " = " << (s) << std::flush |
Definition at line 266 of file pcl_macros.h.
#define PVARA | ( | s | ) | #s << " = " << RAD2DEG(s) << "deg" << std::flush |
Definition at line 282 of file pcl_macros.h.
#define PVARAC | ( | s | ) | #s << " = " << RAD2DEG(s) << "deg, " << std::flush |
Definition at line 290 of file pcl_macros.h.
#define PVARAN | ( | s | ) | #s << " = " << RAD2DEG(s) << "deg\n" |
Definition at line 286 of file pcl_macros.h.
#define PVARAS | ( | s | ) | #s << " = " << RAD2DEG(s) << "deg " << std::flush |
Definition at line 294 of file pcl_macros.h.
#define PVARC | ( | s | ) | #s << " = " << (s) << ", " << std::flush |
Definition at line 274 of file pcl_macros.h.
#define PVARN | ( | s | ) | #s << " = " << (s) << "\n" |
Definition at line 270 of file pcl_macros.h.
#define PVARS | ( | s | ) | #s << " = " << (s) << " " << std::flush |
Definition at line 278 of file pcl_macros.h.
#define RAD2DEG | ( | x | ) | ((x)*57.29578) |
Definition at line 229 of file pcl_macros.h.
#define SET_ARRAY | ( | var, | |
value, | |||
size | |||
) | { for (decltype(size) i = 0; i < (size); ++i) (var)[i]=value; } |
Definition at line 310 of file pcl_macros.h.
__inline double pcl_round | ( | double | number | ) |
Win32 doesn't seem to have rounding functions.
Therefore implement our own versions of these functions here.
Definition at line 241 of file pcl_macros.h.
Referenced by pcl::ESFEstimation< PointInT, PointOutT >::computeESF(), pcl::VFHEstimation< PointInT, PointNT, PointOutT >::computePointSPFHSignature(), pcl::face_detection::FeatureHandlerDepthAverage< FT, DataSet, ExampleIndex >::evaluateFeature(), and pcl::OrganizedNeighborSearch< PointT >::pointPlaneProjection().
__inline float pcl_round | ( | float | number | ) |
Definition at line 246 of file pcl_macros.h.