Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ports/pcl/fix-error-C3052.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/common/src/fft/kiss_fft.c b/common/src/fft/kiss_fft.c
index a996887..37232bd 100644
--- a/common/src/fft/kiss_fft.c
+++ b/common/src/fft/kiss_fft.c
@@ -260,11 +260,13 @@ void kf_work(
#if (defined _OPENMP && (_OPENMP <= 201307)) || (defined __GNUC__ && (__GNUC__ >= 6 && __GNUC__ < 9))
#pragma omp parallel for \
default(none) \
- shared(f, factors, Fout, in_stride)
+ shared(f, factors, Fout, in_stride) \
+ private(k)
#else
#pragma omp parallel for \
default(none) \
- shared(f, factors, Fout, fstride, in_stride, m, p, st)
+ shared(f, factors, Fout, fstride, in_stride, m, p, st) \
+ private(k)
#endif
for (k=0;k<p;++k)
kf_work( Fout +k*m, f+ fstride*in_stride*k,fstride*p,in_stride,factors,st);
130 changes: 130 additions & 0 deletions ports/pcl/fix-namespace-cub.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
diff --git a/gpu/features/src/centroid.cu b/gpu/features/src/centroid.cu
index 045fe6f..3e9ef8b 100644
--- a/gpu/features/src/centroid.cu
+++ b/gpu/features/src/centroid.cu
@@ -44,7 +44,6 @@

#include "pcl/gpu/utils/device/vector_math.hpp"

-using namespace thrust;

namespace pcl
{
@@ -124,9 +123,10 @@ float3 pcl::device::getMaxDistance(const DeviceArray<PointT>& cloud, const float
thrust::counting_iterator<int> ce = cf + cloud.size();

thrust::tuple<float, int> init(0.f, 0);
- thrust::maximum< tuple<float, int> > op;
+ thrust::maximum<thrust::tuple<float, int>> op;

- tuple<float, int> res = transform_reduce(
+ thrust::tuple<float, int> res =
+ transform_reduce(
make_zip_iterator(make_tuple( src_beg, cf )),
make_zip_iterator(make_tuple( src_beg, ce )),
TupleDistCvt(pivot), init, op);
@@ -151,9 +151,9 @@ float3 pcl::device::getMaxDistance(const DeviceArray<PointT>& cloud, const Indic
thrust::counting_iterator<int> ce = cf + indices.size();

thrust::tuple<float, int> init(0.f, 0);
- thrust::maximum< tuple<float, int> > op;
+ thrust::maximum<thrust::tuple<float, int>> op;

- tuple<float, int> res = transform_reduce(
+ thrust::tuple<float, int> res = transform_reduce(
make_zip_iterator(make_tuple( make_permutation_iterator(src_beg, map_beg), cf )),
make_zip_iterator(make_tuple( make_permutation_iterator(src_beg, map_end), ce )),
TupleDistCvt(pivot), init, op);
diff --git a/gpu/octree/src/cuda/bfrs.cu b/gpu/octree/src/cuda/bfrs.cu
index d392f67..0635e1e 100644
--- a/gpu/octree/src/cuda/bfrs.cu
+++ b/gpu/octree/src/cuda/bfrs.cu
@@ -43,7 +43,6 @@

#include "cuda.h"

-using namespace thrust;

namespace pcl
{
@@ -80,11 +79,11 @@ void pcl::device::bruteForceRadiusSearch(const OctreeImpl::PointCloud& cloud, co

InSphere cond(query.x, query.y, query.z, radius);

- device_ptr<const PointType> cloud_ptr((const PointType*)cloud.ptr());
- device_ptr<int> res_ptr(buffer.ptr());
+ thrust::device_ptr<const PointType> cloud_ptr((const PointType*)cloud.ptr());
+ thrust::device_ptr<int> res_ptr(buffer.ptr());

- counting_iterator<int> first(0);
- counting_iterator<int> last = first + cloud.size();
+ thrust::counting_iterator<int> first(0);
+ thrust::counting_iterator<int> last = first + cloud.size();

//main bottle neck is a kernel call overhead/allocs
//work time for 871k points ~0.8ms
diff --git a/gpu/octree/src/cuda/octree_builder.cu b/gpu/octree/src/cuda/octree_builder.cu
index dfd2093..faad764 100644
--- a/gpu/octree/src/cuda/octree_builder.cu
+++ b/gpu/octree/src/cuda/octree_builder.cu
@@ -51,7 +51,6 @@
#include <thrust/device_ptr.h>

using namespace pcl::gpu;
-using namespace thrust;

namespace pcl
{
@@ -316,7 +315,7 @@ void pcl::device::OctreeImpl::build()
// 3 * sizeof(int) => +1 row

const int transaction_size = 128 / sizeof(int);
- int cols = max<int>(points_num, transaction_size * 4);
+ int cols = std::max<int>(points_num, transaction_size * 4);
int rows = 10 + 1; // = 13

storage.create(rows, cols);
@@ -338,8 +337,8 @@ void pcl::device::OctreeImpl::build()
{
//ScopeTimer timer("reduce-morton-sort-permutations");

- device_ptr<PointType> beg(points.ptr());
- device_ptr<PointType> end = beg + points.size();
+ thrust::device_ptr<PointType> beg(points.ptr());
+ thrust::device_ptr<PointType> end = beg + points.size();

{
PointType atmax, atmin;
@@ -355,15 +354,15 @@ void pcl::device::OctreeImpl::build()
octreeGlobal.maxp = make_float3(maxp.x, maxp.y, maxp.z);
}

- device_ptr<int> codes_beg(codes.ptr());
- device_ptr<int> codes_end = codes_beg + codes.size();
+ thrust::device_ptr<int> codes_beg(codes.ptr());
+ thrust::device_ptr<int> codes_end = codes_beg + codes.size();
{
//ScopeTimer timer("morton");
thrust::transform(beg, end, codes_beg, CalcMorton(octreeGlobal.minp, octreeGlobal.maxp));
}

- device_ptr<int> indices_beg(indices.ptr());
- device_ptr<int> indices_end = indices_beg + indices.size();
+ thrust::device_ptr<int> indices_beg(indices.ptr());
+ thrust::device_ptr<int> indices_end = indices_beg + indices.size();
{
//ScopeTimer timer("sort");
thrust::sequence(indices_beg, indices_end);
@@ -378,9 +377,9 @@ void pcl::device::OctreeImpl::build()
}

{
- device_ptr<float> xs(points_sorted.ptr(0));
- device_ptr<float> ys(points_sorted.ptr(1));
- device_ptr<float> zs(points_sorted.ptr(2));
+ thrust::device_ptr<float> xs(points_sorted.ptr(0));
+ thrust::device_ptr<float> ys(points_sorted.ptr(1));
+ thrust::device_ptr<float> zs(points_sorted.ptr(2));
//ScopeTimer timer("perm2");
thrust::transform(make_permutation_iterator(beg, indices_beg),
make_permutation_iterator(end, indices_end),
2 changes: 2 additions & 0 deletions ports/pcl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ vcpkg_from_github(
remove-broken-targets.patch
fix-cmake_find_library_suffixes.patch
fix-pkgconfig.patch # Remove this patch in the next update
fix-namespace-cub.patch # Remove this patch in the next update
fix-error-C3052.patch # Remove this patch in the next update
fix-find-libusb.patch
install-examples.patch
no-absolute.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/pcl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pcl",
"version": "1.12.0",
"port-version": 4,
"port-version": 5,
"description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.",
"homepage": "https://github.com/PointCloudLibrary/pcl",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5250,7 +5250,7 @@
},
"pcl": {
"baseline": "1.12.0",
"port-version": 4
"port-version": 5
},
"pcre": {
"baseline": "8.45",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pcl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5e5ebb57bf0a08e7eab28fe3571ebaa55c3d4ba8",
"version": "1.12.0",
"port-version": 5
},
{
"git-tree": "7e54ab86574dfc901275996e282f8db5c6c9c3fb",
"version": "1.12.0",
Expand Down