Skip to content

Commit 3b75493

Browse files
authored
Merge pull request #6231 from mvieth/misc16
Small fixes
2 parents 460d9fc + f67880d commit 3b75493

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

benchmarks/search/radius_search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ BM_OrganizedNeighborSearch(benchmark::State& state, const std::string& file)
2626
int searchIdx = indices[radiusSearchIdx++ % indices.size()];
2727
double searchRadius = 0.1; // or any fixed radius like 0.05
2828

29-
std::vector<int> k_indices;
29+
pcl::Indices k_indices;
3030
std::vector<float> k_sqr_distances;
3131

3232
auto start_time = std::chrono::high_resolution_clock::now();

common/include/pcl/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#include <type_traits> // for std::enable_if_t, std::false_type, std::true_type
5353
#include <utility> // for std::forward
5454

55-
#if !defined(PCL_SILENCE_MALLOC_WARNING)
55+
#if !defined(PCL_SILENCE_MALLOC_WARNING) && !defined(__NVCC__)
5656
#if PCL_USES_EIGEN_HANDMADE_ALIGNED_MALLOC
5757
// EIGEN_DEFAULT_ALIGN_BYTES and EIGEN_MALLOC_ALREADY_ALIGNED will be set after including Eigen/Core
5858
// this condition is the same as in the function aligned_malloc in Memory.h in the Eigen code

cuda/common/include/pcl/cuda/cutil_math.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,10 +1001,13 @@ inline __host__ __device__ uint4 max(uint4 a, uint4 b)
10011001
// - linear interpolation between a and b, based on value t in [0, 1] range
10021002
////////////////////////////////////////////////////////////////////////////////
10031003

1004+
#if !defined(__cplusplus) || (__cplusplus < 202002L)
1005+
// C++20 and higher provides std::lerp
10041006
inline __device__ __host__ float lerp(float a, float b, float t)
10051007
{
10061008
return a + t*(b-a);
10071009
}
1010+
#endif
10081011
inline __device__ __host__ float2 lerp(float2 a, float2 b, float t)
10091012
{
10101013
return a + t*(b-a);

gpu/utils/include/pcl/gpu/utils/device/functional.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ namespace pcl
4646
{
4747
// Function Objects
4848

49-
using thrust::unary_function;
5049
using thrust::binary_function;
5150

5251
// Arithmetic Operations
@@ -79,8 +78,10 @@ namespace pcl
7978
using thrust::bit_or;
8079
using thrust::bit_xor;
8180

82-
template <typename T> struct bit_not : unary_function<T, T>
81+
template <typename T> struct bit_not
8382
{
83+
typedef T argument_type;
84+
typedef T result_type;
8485
__forceinline__ __device__ T operator ()(const T& v) const {return ~v;}
8586
};
8687

0 commit comments

Comments
 (0)