Skip to content

Commit

Permalink
Changes are done by: run-clang-tidy -header-filter='.' -checks='-,mod…
Browse files Browse the repository at this point in the history
…ernize-use-using' -fix
  • Loading branch information
Heiko Thiel committed Jun 9, 2019
1 parent 575a9b9 commit 5225354
Show file tree
Hide file tree
Showing 84 changed files with 380 additions and 380 deletions.
4 changes: 2 additions & 2 deletions gpu/containers/include/pcl/gpu/containers/device_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace pcl
{
public:
/** \brief Element type. */
typedef T type;
using type = T;

/** \brief Element size. */
enum { elem_size = sizeof(T) };
Expand Down Expand Up @@ -154,7 +154,7 @@ namespace pcl
{
public:
/** \brief Element type. */
typedef T type;
using type = T;

/** \brief Element size. */
enum { elem_size = sizeof(T) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace pcl
{
template<typename T> struct DevPtr
{
typedef T elem_type;
using elem_type = T;
const static size_t elem_size = sizeof(elem_type);

T* data;
Expand Down
4 changes: 2 additions & 2 deletions gpu/containers/src/initialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ namespace
inline int convertSMVer2Cores(int major, int minor)
{
// Defines for GPU Architecture types (using the SM version to determine the # of cores per SM
typedef struct {
struct SMtoCores {
int SM; // 0xMm (hexadecimal notation), M = SM Major version, and m = SM minor version
int Cores;
} SMtoCores;
};

SMtoCores gpuArchCoresPerSM[] = {
{0x10, 8}, {0x11, 8}, {0x12, 8}, {0x13, 8}, {0x20, 32}, {0x21, 48}, {0x30, 192},
Expand Down
4 changes: 2 additions & 2 deletions gpu/features/include/pcl/gpu/features/device/eigen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ namespace pcl
__device__ __host__ __forceinline__ float3& operator[](int i) { return data[i]; }
__device__ __host__ __forceinline__ const float3& operator[](int i) const { return data[i]; }
};
typedef MiniMat<3> Mat33;
typedef MiniMat<4> Mat43;
using Mat33 = MiniMat<3>;
using Mat43 = MiniMat<4>;


static __forceinline__ __device__ float3 unitOrthogonal (const float3& src)
Expand Down
20 changes: 10 additions & 10 deletions gpu/features/include/pcl/gpu/features/features.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ namespace pcl
struct PCL_EXPORTS Feature
{
public:
typedef PointXYZ PointType;
typedef PointXYZ NormalType;
using PointType = PointXYZ;
using NormalType = PointXYZ;

typedef DeviceArray< PointType> PointCloud;
typedef DeviceArray<NormalType> Normals;
typedef DeviceArray<int> Indices;
using PointCloud = DeviceArray<PointType>;
using Normals = DeviceArray<NormalType>;
using Indices = DeviceArray<int>;

Feature();

Expand Down Expand Up @@ -94,7 +94,7 @@ namespace pcl
{
public:
// float x, y, z, curvature; -> sizeof(PointXYZ) = 4 * sizeof(float)
typedef Feature::NormalType NormalType;
using NormalType = Feature::NormalType;

NormalEstimation();
void compute(Normals& normals);
Expand Down Expand Up @@ -127,7 +127,7 @@ namespace pcl
class PCL_EXPORTS PFHRGBEstimation : public FeatureFromNormals
{
public:
typedef PointXYZ PointType; //16 bytes for xyzrgb
using PointType = PointXYZ; //16 bytes for xyzrgb
void compute(const PointCloud& cloud, const Normals& normals, const NeighborIndices& neighb_indices, DeviceArray2D<PFHRGBSignature250>& features);
void compute(DeviceArray2D<PFHRGBSignature250>& features);
private:
Expand Down Expand Up @@ -172,7 +172,7 @@ namespace pcl
{
public:

typedef PointXYZ PointType; //16 bytes for xyzrgb
using PointType = PointXYZ; //16 bytes for xyzrgb
void compute(DeviceArray<PPFRGBSignature>& features);
};

Expand All @@ -182,7 +182,7 @@ namespace pcl
class PCL_EXPORTS PPFRGBRegionEstimation : public FeatureFromNormals
{
public:
typedef PointXYZ PointType; //16 bytes for xyzrgb
using PointType = PointXYZ; //16 bytes for xyzrgb
void compute(DeviceArray<PPFRGBSignature>& features);

private:
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace pcl
class PCL_EXPORTS SpinImageEstimation : public FeatureFromNormals
{
public:
typedef Histogram<153> SpinImage;
using SpinImage = Histogram<153>;

SpinImageEstimation (unsigned int image_width = 8,
double support_angle_cos = 0.0, // when 0, this is bogus, so not applied
Expand Down
22 changes: 11 additions & 11 deletions gpu/features/src/internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ namespace pcl
using pcl::gpu::DeviceArray2D;
using pcl::gpu::NeighborIndices;

typedef float4 PointType;
typedef float4 NormalType;
typedef float4 PointXYZRGB;
using PointType = float4;
using NormalType = float4;
using PointXYZRGB = float4;

typedef DeviceArray< PointType> PointCloud;
typedef DeviceArray<NormalType> Normals;
typedef DeviceArray<int> Indices;
using PointCloud = DeviceArray<PointType>;
using Normals = DeviceArray<NormalType>;
using Indices = DeviceArray<int>;

typedef DeviceArray< PointType> PointXYZRGBCloud;
using PointXYZRGBCloud = DeviceArray<PointType>;

template <int N> struct Histogram
{
float histogram[N];
};

typedef Histogram<125> PFHSignature125;
typedef Histogram<250> PFHRGBSignature250;
typedef Histogram<33> FPFHSignature33;
typedef Histogram<308> VFHSignature308;
using PFHSignature125 = Histogram<125>;
using PFHRGBSignature250 = Histogram<250>;
using FPFHSignature33 = Histogram<33>;
using VFHSignature308 = Histogram<308>;

struct PPFSignature
{
Expand Down
2 changes: 1 addition & 1 deletion gpu/features/src/normal_3d.cu
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace pcl
if (lane == 0)
{
// Extract the eigenvalues and eigenvectors
typedef Eigen33::Mat33 Mat33;
using Mat33 = Eigen33::Mat33;
Eigen33 eigen33(&cov[lane]);

Mat33& tmp = (Mat33&)cov_buffer[1][tid - lane];
Expand Down
6 changes: 3 additions & 3 deletions gpu/features/src/spinimages.cu
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ namespace pcl
void pcl::device::computeSpinImagesOrigigNormal(bool radial, bool angular, float support_angle_cos, const Indices& indices, const PointCloud& input_cloud, const Normals& input_normals,
const PointCloud& surface, const Normals& normals, const NeighborIndices& neighbours, int min_neighb, int image_width, float bin_size, PtrStep<float> output)
{
typedef void (*originNormal)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int , int , float, PtrStep<float>);
using originNormal = void (*)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int , int , float, PtrStep<float>);

const originNormal table[2][2] =
{
Expand All @@ -354,7 +354,7 @@ void pcl::device::computeSpinImagesOrigigNormal(bool radial, bool angular, float
void pcl::device::computeSpinImagesCustomAxes(bool radial, bool angular, float support_angle_cos, const Indices& indices, const PointCloud& input_cloud, const Normals& input_normals,
const PointCloud& surface, const Normals& normals, const NeighborIndices& neighbours, int min_neighb, int image_width, float bin_size, const float3& rotation_axis, PtrStep<float> output)
{
typedef void (*customAxes)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int, int, float, const float3&, PtrStep<float>);
using customAxes = void (*)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int, int, float, const float3&, PtrStep<float>);

const customAxes table[2][2] =
{
Expand All @@ -369,7 +369,7 @@ void pcl::device::computeSpinImagesCustomAxes(bool radial, bool angular, float s
void pcl::device::computeSpinImagesCustomAxesCloud(bool radial, bool angular, float support_angle_cos, const Indices& indices, const PointCloud& input_cloud, const Normals& input_normals,
const PointCloud& surface, const Normals& normals, const NeighborIndices& neighbours, int min_neighb, int image_width, float bin_size, const Normals& rotation_axes_cloud, PtrStep<float> output)
{
typedef void (*customAxesCloud)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int, int, float, const Normals&, PtrStep<float>);
using customAxesCloud = void (*)(float, const Indices&, const PointCloud&, const Normals&, const PointCloud&, const Normals&, const NeighborIndices&, int, int, float, const Normals&, PtrStep<float>);

const customAxesCloud table[2][2] =
{
Expand Down
2 changes: 1 addition & 1 deletion gpu/features/test/test_spinimages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using namespace std;
using namespace pcl;
using namespace pcl::gpu;

typedef pcl::Histogram<153> SpinImage;
using SpinImage = pcl::Histogram<153>;

//TEST(PCL_FeaturesGPU, DISABLED_spinImages_rectangular)
TEST(PCL_FeaturesGPU, spinImages_rectangular)
Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/include/pcl/gpu/kinfu/color_volume.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ namespace pcl
class PCL_EXPORTS ColorVolume
{
public:
typedef PointXYZ PointType;
typedef boost::shared_ptr<ColorVolume> Ptr;
using PointType = PointXYZ;
using Ptr = boost::shared_ptr<ColorVolume>;

/** \brief Constructor
* \param[in] tsdf tsdf volume to get parameters from
Expand Down
18 changes: 9 additions & 9 deletions gpu/kinfu/include/pcl/gpu/kinfu/kinfu.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ namespace pcl
{
public:
/** \brief Pixel type for rendered image. */
typedef pcl::gpu::PixelRGB PixelRGB;
using PixelRGB = pcl::gpu::PixelRGB;

typedef DeviceArray2D<PixelRGB> View;
typedef DeviceArray2D<unsigned short> DepthMap;
using View = DeviceArray2D<PixelRGB>;
using DepthMap = DeviceArray2D<unsigned short>;

typedef pcl::PointXYZ PointType;
typedef pcl::Normal NormalType;
using PointType = pcl::PointXYZ;
using NormalType = pcl::Normal;

/** \brief Constructor
* \param[in] rows height of depth image
Expand Down Expand Up @@ -205,13 +205,13 @@ namespace pcl
enum { LEVELS = 3 };

/** \brief ICP Correspondences map type */
typedef DeviceArray2D<int> CorespMap;
using CorespMap = DeviceArray2D<int>;

/** \brief Vertex or Normal Map type */
typedef DeviceArray2D<float> MapArr;
using MapArr = DeviceArray2D<float>;

typedef Eigen::Matrix<float, 3, 3, Eigen::RowMajor> Matrix3frm;
typedef Eigen::Vector3f Vector3f;
using Matrix3frm = Eigen::Matrix<float, 3, 3, Eigen::RowMajor>;
using Vector3f = Eigen::Vector3f;

/** \brief Height of input depth image. */
int rows_;
Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/include/pcl/gpu/kinfu/marching_cubes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ namespace pcl
};

/** \brief Point type. */
typedef pcl::PointXYZ PointType;
using PointType = pcl::PointXYZ;

/** \brief Smart pointer. */
typedef boost::shared_ptr<MarchingCubes> Ptr;
using Ptr = boost::shared_ptr<MarchingCubes>;

/** \brief Default constructor */
MarchingCubes();
Expand Down
8 changes: 4 additions & 4 deletions gpu/kinfu/include/pcl/gpu/kinfu/raycaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ namespace pcl
struct PCL_EXPORTS RayCaster
{
public:
typedef boost::shared_ptr<RayCaster> Ptr;
typedef DeviceArray2D<float> MapArr;
typedef DeviceArray2D<PixelRGB> View;
typedef DeviceArray2D<unsigned short> Depth;
using Ptr = boost::shared_ptr<RayCaster>;
using MapArr = DeviceArray2D<float>;
using View = DeviceArray2D<PixelRGB>;
using Depth = DeviceArray2D<unsigned short>;

/** \brief Image with height */
const int cols, rows;
Expand Down
6 changes: 3 additions & 3 deletions gpu/kinfu/include/pcl/gpu/kinfu/tsdf_volume.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ namespace pcl
class PCL_EXPORTS TsdfVolume
{
public:
typedef boost::shared_ptr<TsdfVolume> Ptr;
using Ptr = boost::shared_ptr<TsdfVolume>;

/** \brief Supported Point Types */
typedef PointXYZ PointType;
typedef Normal NormalType;
using PointType = PointXYZ;
using NormalType = Normal;

/** \brief Default buffer size for fetching cloud. It limits max number of points that can be extracted */
enum { DEFAULT_CLOUD_BUFFER_SIZE = 10 * 1000 * 1000 };
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu/src/cuda/estimate_combined.cu
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace pcl
{
namespace device
{
typedef double float_type;
using float_type = double;

template<int CTA_SIZE_, typename T>
static __device__ __forceinline__ void reduce(volatile T* buffer)
Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/src/cuda/estimate_tranform.cu
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ pcl::device::estimateTransform (const MapArr& v_dst, const MapArr& n_dst,
DeviceArray2D<float>& gbuf, DeviceArray<float>& mbuf,
float* matrixA_host, float* vectorB_host)
{
typedef TransformEstimator<float> TEst;
typedef TranformReduction<float> TRed;
using TEst = TransformEstimator<float>;
using TRed = TranformReduction<float>;

dim3 block (TEst::CTA_SIZE_X, TEst::CTA_SIZE_Y);
dim3 grid (1, 1, 1);
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu/src/cuda/marching_cubes.cu
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ pcl::device::generateTriangles (const PtrStep<short2>& volume, const DeviceArray

int block_size = prop.major < 2 ? 96 : 256; // please see TrianglesGenerator::CTA_SIZE

typedef TrianglesGenerator Tg;
using Tg = TrianglesGenerator;
Tg tg;

tg.volume = volume;
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu/src/cuda/normals_eigen.cu
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace pcl
cov[5] += d.z * d.z; //cov (2, 2)
}

typedef Eigen33::Mat33 Mat33;
using Mat33 = Eigen33::Mat33;
Eigen33 eigen33 (cov);

Mat33 tmp;
Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/src/cuda/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ namespace pcl
__device__ __host__ __forceinline__ float3& operator[](int i) { return data[i]; }
__device__ __host__ __forceinline__ const float3& operator[](int i) const { return data[i]; }
};
typedef MiniMat<3> Mat33;
typedef MiniMat<4> Mat43;
using Mat33 = MiniMat<3>;
using Mat43 = MiniMat<4>;


static __forceinline__ __device__ float3
Expand Down
8 changes: 4 additions & 4 deletions gpu/kinfu/src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ namespace pcl
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Types
typedef unsigned short ushort;
typedef DeviceArray2D<float> MapArr;
typedef DeviceArray2D<ushort> DepthMap;
typedef float4 PointType;
using ushort = unsigned short;
using MapArr = DeviceArray2D<float>;
using DepthMap = DeviceArray2D<ushort>;
using PointType = float4;

//TSDF fixed point divisor (if old format is enabled)
const int DIVISOR = 32767; // SHRT_MAX;
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu/src/raycaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pcl::gpu::RayCaster::run(const TsdfVolume& volume, const Affine3f& camera_pose)
vertex_map_.create(rows * 3, cols);
normal_map_.create(rows * 3, cols);

typedef Matrix<float, 3, 3, RowMajor> Matrix3f;
using Matrix3f = Matrix<float, 3, 3, RowMajor>;

Matrix3f R = camera_pose_.linear();
Vector3f t = camera_pose_.translation();
Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/tools/evaluation.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
class Evaluation
{
public:
typedef boost::shared_ptr<Evaluation> Ptr;
typedef pcl::gpu::KinfuTracker::PixelRGB RGB;
using Ptr = boost::shared_ptr<Evaluation>;
using RGB = pcl::gpu::KinfuTracker::PixelRGB;

Evaluation(const std::string& folder);

Expand Down
Loading

0 comments on commit 5225354

Please sign in to comment.