Point Cloud Library (PCL)  1.9.1-dev
Namespaces | Macros | Functions
pcl_macros.h File Reference
#include <cmath>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <iostream>
#include <boost/cstdint.hpp>
#include <Eigen/Core>
#include <pcl/pcl_config.h>

Go to the source code of this file.

Detailed Description

Defines all the PCL and non-PCL macros used.

Definition in file pcl_macros.h.

Namespaces

 pcl
 This file defines compatibility wrappers for low level I/O functions.
 

Macros

#define _USE_MATH_DEFINES
 
#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
 
#define PCL_STDCALL
 
#define PCLAPI(rettype)   PCL_EXTERN_C PCL_EXPORTS rettype PCL_CDECL
 
#define PCL_PRAGMA
 
#define PCL_PRAGMA_WARNING
 
#define __has_extension(x)   0
 
#define GLIBC_MALLOC_ALIGNED   0
 
#define FREEBSD_MALLOC_ALIGNED   0
 
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
 Macro to signal a class requires a custom allocator. More...
 
#define PCL_FALLTHROUGH   ;
 Macro to add a no-op or a fallthrough attribute based on compiler feature. More...
 
#define PCL_NODISCARD
 

Functions

__inline double pcl_round (double number)
 Win32 doesn't seem to have rounding functions. More...
 
__inline float pcl_round (float number)
 
void * aligned_malloc (std::size_t size)
 
void aligned_free (void *ptr)
 

Macro Definition Documentation

◆ __has_extension

#define __has_extension (   x)    0

Definition at line 262 of file pcl_macros.h.

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 59 of file pcl_macros.h.

◆ DEG2RAD

#define DEG2RAD (   x)    ((x)*0.017453293)

Definition at line 124 of file pcl_macros.h.

◆ ERASE_ARRAY

#define ERASE_ARRAY (   var,
  size 
)    memset(var, 0, size*sizeof(*var))

Definition at line 205 of file pcl_macros.h.

Referenced by pcl::RangeImage::doZBuffer().

◆ ERASE_STRUCT

#define ERASE_STRUCT (   var)    memset(&var, 0, sizeof(var))

Definition at line 201 of file pcl_macros.h.

◆ FIXED

#define FIXED (   s)    std::fixed << s << std::resetiosflags(std::ios_base::fixed)

Definition at line 197 of file pcl_macros.h.

◆ FREEBSD_MALLOC_ALIGNED

#define FREEBSD_MALLOC_ALIGNED   0

Definition at line 282 of file pcl_macros.h.

◆ GLIBC_MALLOC_ALIGNED

#define GLIBC_MALLOC_ALIGNED   0

Definition at line 276 of file pcl_macros.h.

◆ PCL_CDECL

#define PCL_CDECL

Definition at line 234 of file pcl_macros.h.

◆ PCL_EXPORTS

#define PCL_EXPORTS

Definition at line 227 of file pcl_macros.h.

Referenced by pcl::concatenate(), pcl::PFHSignature125::descriptorSize(), pcl::PFHRGBSignature250::descriptorSize(), pcl::ShapeContext1980::descriptorSize(), pcl::UniqueShapeContext1960::descriptorSize(), pcl::SHOT352::descriptorSize(), pcl::FPFHSignature33::descriptorSize(), pcl::VFHSignature308::descriptorSize(), pcl::GRSDSignature21::descriptorSize(), pcl::BRISKSignature512::descriptorSize(), pcl::ESFSignature640::descriptorSize(), pcl::GASDSignature512::descriptorSize(), pcl::GASDSignature984::descriptorSize(), pcl::GASDSignature7992::descriptorSize(), pcl::GFPFHSignature16::descriptorSize(), pcl::Narf36::descriptorSize(), pcl::cuda::detail::dist2(), pcl::RangeImage::getAngularResolutionY(), pcl::getFieldSize(), pcl::_ReferenceFrame::getMatrix3fMap(), pcl::RangeImagePlanar::getNew(), pcl::RangeImage::getNew(), pcl::isSamePointType(), pcl::io::loadOBJFile(), pcl::RangeImagePlanar::makeShared(), pcl::RangeImage::makeShared(), pcl::NdCopyPointEigenFunctor< PointInT >::operator()(), pcl::console::parse(), pcl::planeWithPlaneIntersection(), POINT_CLOUD_REGISTER_POINT_STRUCT(), pcl::PointWithViewpoint::PointWithViewpoint(), pcl::PointXYZHSV::PointXYZHSV(), pcl::PointXYZL::PointXYZL(), pcl::PointXYZRGB::PointXYZRGB(), pcl::ReferenceFrame::ReferenceFrame(), pcl::io::savePLYFile(), pcl::segmentation::grabcut::GaussianFitter::setEpsilon(), pcl::RangeImage::setImageOffsets(), pcl::threePlanesIntersection(), and pcl::Correspondence::~Correspondence().

◆ PCL_EXTERN_C

#define PCL_EXTERN_C

Definition at line 216 of file pcl_macros.h.

◆ PCL_LINEAR_VERSION

#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 133 of file pcl_macros.h.

◆ pcl_lrint

#define pcl_lrint (   x)    (static_cast<long int>(pcl_round(x)))

◆ pcl_lrintf

#define pcl_lrintf (   x)    (static_cast<long int>(pcl_round(x)))

◆ PCL_NODISCARD

#define PCL_NODISCARD

Definition at line 371 of file pcl_macros.h.

Referenced by pcl::MaskMap::getData().

◆ PCL_PRAGMA

#define PCL_PRAGMA

Definition at line 248 of file pcl_macros.h.

◆ PCL_PRAGMA_WARNING

#define PCL_PRAGMA_WARNING

Definition at line 257 of file pcl_macros.h.

◆ pcl_sleep

#define pcl_sleep (   x)    sleep(x)

Definition at line 161 of file pcl_macros.h.

◆ PCL_STDCALL

#define PCL_STDCALL

Definition at line 235 of file pcl_macros.h.

◆ PCLAPI

#define PCLAPI (   rettype)    PCL_EXTERN_C PCL_EXPORTS rettype PCL_CDECL

Definition at line 239 of file pcl_macros.h.

◆ PVAR

#define PVAR (   s)    #s << " = " << (s) << std::flush

Definition at line 165 of file pcl_macros.h.

◆ PVARA

#define PVARA (   s)    #s << " = " << RAD2DEG(s) << "deg" << std::flush

Definition at line 181 of file pcl_macros.h.

◆ PVARAC

#define PVARAC (   s)    #s << " = " << RAD2DEG(s) << "deg, " << std::flush

Definition at line 189 of file pcl_macros.h.

◆ PVARAN

#define PVARAN (   s)    #s << " = " << RAD2DEG(s) << "deg\n"

Definition at line 185 of file pcl_macros.h.

◆ PVARAS

#define PVARAS (   s)    #s << " = " << RAD2DEG(s) << "deg " << std::flush

Definition at line 193 of file pcl_macros.h.

◆ PVARC

#define PVARC (   s)    #s << " = " << (s) << ", " << std::flush

Definition at line 173 of file pcl_macros.h.

Referenced by pcl::operator<<().

◆ PVARN

#define PVARN (   s)    #s << " = " << (s) << "\n"

Definition at line 169 of file pcl_macros.h.

Referenced by pcl::operator<<().

◆ PVARS

#define PVARS (   s)    #s << " = " << (s) << " " << std::flush

Definition at line 177 of file pcl_macros.h.

◆ RAD2DEG

#define RAD2DEG (   x)    ((x)*57.29578)

Definition at line 128 of file pcl_macros.h.

Referenced by pcl::operator<<().

◆ SET_ARRAY

#define SET_ARRAY (   var,
  value,
  size 
)    { for (decltype(size) i = 0; i < size; ++i) var[i]=value; }

Definition at line 209 of file pcl_macros.h.

Function Documentation

◆ aligned_free()

void aligned_free ( void *  ptr)
inline

Definition at line 321 of file pcl_macros.h.

Referenced by pcl::EnergyMaps::releaseAll(), and pcl::LinearizedMaps::releaseAll().

◆ aligned_malloc()

void* aligned_malloc ( std::size_t  size)
inline

Definition at line 299 of file pcl_macros.h.

Referenced by pcl::EnergyMaps::initialize(), and pcl::LinearizedMaps::initialize().

◆ pcl_round() [1/2]

__inline double pcl_round ( double  number)

◆ pcl_round() [2/2]

__inline float pcl_round ( float  number)

Definition at line 145 of file pcl_macros.h.