From 13d437bf04ccc4716545582a1c191eb8161a2b0a Mon Sep 17 00:00:00 2001 From: Lars Glud Date: Thu, 22 Aug 2024 11:13:58 +0200 Subject: [PATCH] Remove global includes and use target include for GPU/CUDA (#6010) * Change to use target_include_directories. Rearranged files between gpu_utils and gpu_containers, to break cyclic includes. * Remove unncessary .cpp file. * Revert moving of files. * Copy error function to safe_call. Added deprecated headers for notice to users. * Revert include paths. * Add missing include * Added empty cu file. * Add include to gpu people. --- cuda/apps/CMakeLists.txt | 1 - cuda/common/CMakeLists.txt | 1 - cuda/features/CMakeLists.txt | 1 - cuda/io/CMakeLists.txt | 1 - cuda/sample_consensus/CMakeLists.txt | 1 - cuda/segmentation/CMakeLists.txt | 1 - gpu/containers/CMakeLists.txt | 9 +- .../pcl/gpu/containers/impl/repacks.hpp | 154 ++++++++++++++++++ .../gpu/containers/impl/texture_binder.hpp | 93 +++++++++++ gpu/{utils => containers}/src/repacks.cu | 6 +- gpu/features/CMakeLists.txt | 1 - gpu/features/test/CMakeLists.txt | 20 +-- gpu/kinfu/CMakeLists.txt | 6 +- gpu/kinfu/tools/CMakeLists.txt | 3 - gpu/kinfu_large_scale/CMakeLists.txt | 4 +- gpu/kinfu_large_scale/tools/CMakeLists.txt | 3 - gpu/octree/CMakeLists.txt | 2 +- gpu/octree/src/cuda/octree_host.cu | 4 +- gpu/octree/src/octree.cpp | 1 + gpu/people/CMakeLists.txt | 15 +- gpu/people/src/cuda/elec.cu | 2 +- gpu/people/src/cuda/multi_tree.cu | 2 +- gpu/people/src/cuda/prob.cu | 2 +- gpu/people/src/cuda/utils.cu | 3 +- gpu/people/tools/CMakeLists.txt | 3 - gpu/segmentation/CMakeLists.txt | 1 - gpu/surface/CMakeLists.txt | 4 +- gpu/surface/test/CMakeLists.txt | 12 -- gpu/tracking/CMakeLists.txt | 4 +- gpu/utils/CMakeLists.txt | 5 +- gpu/utils/include/pcl/gpu/utils/repacks.hpp | 92 +---------- gpu/utils/include/pcl/gpu/utils/safe_call.hpp | 45 +++-- .../include/pcl/gpu/utils/texture_binder.hpp | 55 +------ gpu/utils/src/empty.cu | 1 + gpu/utils/src/internal.hpp | 7 +- gpu/utils/src/repacks.cpp | 41 ----- 36 files changed, 318 insertions(+), 288 deletions(-) create mode 100644 gpu/containers/include/pcl/gpu/containers/impl/repacks.hpp create mode 100644 gpu/containers/include/pcl/gpu/containers/impl/texture_binder.hpp rename gpu/{utils => containers}/src/repacks.cu (98%) create mode 100644 gpu/utils/src/empty.cu delete mode 100644 gpu/utils/src/repacks.cpp diff --git a/cuda/apps/CMakeLists.txt b/cuda/apps/CMakeLists.txt index a8190839eb6..f15ad276572 100644 --- a/cuda/apps/CMakeLists.txt +++ b/cuda/apps/CMakeLists.txt @@ -10,7 +10,6 @@ if(NOT VTK_FOUND) else() set(DEFAULT TRUE) set(REASON) - include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") endif() PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}") diff --git a/cuda/common/CMakeLists.txt b/cuda/common/CMakeLists.txt index 164c3a8ef13..186f5b7212f 100644 --- a/cuda/common/CMakeLists.txt +++ b/cuda/common/CMakeLists.txt @@ -27,7 +27,6 @@ set(common_incs include/pcl/cuda/common/point_type_rgb.h ) -include_directories(./include) set(LIB_NAME "pcl_${SUBSYS_NAME}") set(EXT_DEPS CUDA) PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC "${SUBSYS_DESC}" diff --git a/cuda/features/CMakeLists.txt b/cuda/features/CMakeLists.txt index a40975d2a99..018a3058024 100644 --- a/cuda/features/CMakeLists.txt +++ b/cuda/features/CMakeLists.txt @@ -23,7 +23,6 @@ set(incs ) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) target_link_libraries(${LIB_NAME} pcl_common) diff --git a/cuda/io/CMakeLists.txt b/cuda/io/CMakeLists.txt index 5ddfc90b1b4..3c25360ac2c 100644 --- a/cuda/io/CMakeLists.txt +++ b/cuda/io/CMakeLists.txt @@ -34,7 +34,6 @@ set(incs ) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) target_link_libraries(${LIB_NAME} pcl_common) diff --git a/cuda/sample_consensus/CMakeLists.txt b/cuda/sample_consensus/CMakeLists.txt index 537c10efae2..59455e4228f 100644 --- a/cuda/sample_consensus/CMakeLists.txt +++ b/cuda/sample_consensus/CMakeLists.txt @@ -32,7 +32,6 @@ set(incs ) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) target_link_libraries("${LIB_NAME}" pcl_cuda_features) diff --git a/cuda/segmentation/CMakeLists.txt b/cuda/segmentation/CMakeLists.txt index ce73fb8260f..5354513e040 100644 --- a/cuda/segmentation/CMakeLists.txt +++ b/cuda/segmentation/CMakeLists.txt @@ -24,7 +24,6 @@ set(srcs ) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) target_link_libraries(${LIB_NAME} pcl_common) diff --git a/gpu/containers/CMakeLists.txt b/gpu/containers/CMakeLists.txt index f81db10a309..a07418e0fd4 100644 --- a/gpu/containers/CMakeLists.txt +++ b/gpu/containers/CMakeLists.txt @@ -1,7 +1,7 @@ set(SUBSYS_NAME gpu_containers) set(SUBSYS_PATH gpu/containers) set(SUBSYS_DESC "Containers with reference counting for GPU memory. This module can be compiled without Cuda Toolkit.") -set(SUBSYS_DEPS common) +set(SUBSYS_DEPS common gpu_utils) PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS}) @@ -12,19 +12,16 @@ if(NOT build) return() endif() -file(GLOB srcs src/*.cpp src/*.hpp) +file(GLOB srcs src/*.cpp src/*.cu src/*.hpp) file(GLOB incs include/pcl/gpu/containers/*.h) file(GLOB incs_impl include/pcl/gpu/containers/impl/*.hpp) source_group("Header Files\\impl" FILES ${incs_impl}) list(APPEND incs ${incs_impl}) -get_filename_component(UTILS_INC "${CMAKE_CURRENT_SOURCE_DIR}/../utils/include" REALPATH) - set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" ${UTILS_INC}) PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) -target_link_libraries(${LIB_NAME} pcl_common) +target_link_libraries(${LIB_NAME} pcl_common pcl_gpu_utils) #Ensures that CUDA is added and the project can compile as it uses cuda calls. set_source_files_properties(src/device_memory.cpp PROPERTIES LANGUAGE CUDA) diff --git a/gpu/containers/include/pcl/gpu/containers/impl/repacks.hpp b/gpu/containers/include/pcl/gpu/containers/impl/repacks.hpp new file mode 100644 index 00000000000..db9c7f29356 --- /dev/null +++ b/gpu/containers/include/pcl/gpu/containers/impl/repacks.hpp @@ -0,0 +1,154 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) + */ + +#ifndef __PCL_GPU_UTILS_REPACKS_HPP__ +#define __PCL_GPU_UTILS_REPACKS_HPP__ + +#include +#include +#include + +namespace pcl { +namespace gpu { +/////////////////////////////////////// +/// This is an experimental code /// +/////////////////////////////////////// + +const int NoCP = 0xFFFFFFFF; + +/** \brief Returns field copy operation code. */ +inline int +cp(int from, int to) +{ + return ((to & 0xF) << 4) + (from & 0xF); +} + +/* Combines several field copy operations to one int (called rule) */ +inline int +rule(int cp1, int cp2 = NoCP, int cp3 = NoCP, int cp4 = NoCP) +{ + return (cp1 & 0xFF) + ((cp2 & 0xFF) << 8) + ((cp3 & 0xFF) << 16) + + ((cp4 & 0xFF) << 24); +} + +/* Combines performs all field copy operations in given rule array (can be 0, 1, or 16 + * copies) */ +void +copyFieldsImpl( + int in_size, int out_size, int rules[4], int size, const void* input, void* output); + +template +void +copyFieldsEx(const DeviceArray& src, + DeviceArray& dst, + int rule1, + int rule2 = NoCP, + int rule3 = NoCP, + int rule4 = NoCP) +{ + int rules[4] = {rule1, rule2, rule3, rule4}; + dst.create(src.size()); + copyFieldsImpl(sizeof(PointIn) / sizeof(int), + sizeof(PointOut) / sizeof(int), + rules, + (int)src.size(), + src.ptr(), + dst.ptr()); +} + +void +copyFields(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZ.x (0) -> PointNormal.x (0) + // PointXYZ.y (1) -> PointNormal.y (1) + // PointXYZ.z (2) -> PointNormal.z (2) + copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); +}; + +void +copyFields(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZ.normal_x (0) -> PointNormal.normal_x (4) + // PointXYZ.normal_y (1) -> PointNormal.normal_y (5) + // PointXYZ.normal_z (2) -> PointNormal.normal_z (6) + // PointXYZ.curvature (4) -> PointNormal.curvature (8) + copyFieldsEx(src, dst, rule(cp(0, 4), cp(1, 5), cp(2, 6), cp(4, 8))); +}; + +void +copyFields(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZRGBL.x (0) -> PointXYZ.x (0) + // PointXYZRGBL.y (1) -> PointXYZ.y (1) + // PointXYZRGBL.z (2) -> PointXYZ.z (2) + copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); +}; + +void +copyFields(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZRGB.x (0) -> PointXYZ.x (0) + // PointXYZRGB.y (1) -> PointXYZ.y (1) + // PointXYZRGB.z (2) -> PointXYZ.z (2) + copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); +}; + +void +copyFields(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZRGBA.x (0) -> PointXYZ.x (0) + // PointXYZRGBA.y (1) -> PointXYZ.y (1) + // PointXYZRGBA.z (2) -> PointXYZ.z (2) + copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); +}; + +void +copyFieldsZ(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZRGBL.z (2) -> float (1) + copyFieldsEx(src, dst, rule(cp(2, 0))); +}; + +void +copyFieldsZ(const DeviceArray& src, DeviceArray& dst) +{ + // PointXYZRGBL.z (2) -> float (1) + copyFieldsEx(src, dst, rule(cp(2, 0))); +}; +} // namespace gpu +} // namespace pcl + +#endif /* __PCL_GPU_UTILS_REPACKS_HPP__ */ diff --git a/gpu/containers/include/pcl/gpu/containers/impl/texture_binder.hpp b/gpu/containers/include/pcl/gpu/containers/impl/texture_binder.hpp new file mode 100644 index 00000000000..16dede926cb --- /dev/null +++ b/gpu/containers/include/pcl/gpu/containers/impl/texture_binder.hpp @@ -0,0 +1,93 @@ +/* + * Software License Agreement (BSD License) + * + * Copyright (c) 2011, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) + */ + +#ifndef PCL_GPU_UTILS_TEXTURE_BINDER_HPP_ +#define PCL_GPU_UTILS_TEXTURE_BINDER_HPP_ + +#include +#include + +namespace pcl { +namespace gpu { +class TextureBinder { +public: + template + TextureBinder(const DeviceArray2D& arr, const struct texture& tex) + : texref(&tex) + { + cudaChannelFormatDesc desc = cudaCreateChannelDesc(); + cudaSafeCall( + cudaBindTexture2D(0, tex, arr.ptr(), desc, arr.cols(), arr.rows(), arr.step())); + } + + template + TextureBinder(const DeviceArray& arr, const struct texture& tex) + : texref(&tex) + { + cudaChannelFormatDesc desc = cudaCreateChannelDesc(); + cudaSafeCall(cudaBindTexture(0, tex, arr.ptr(), desc, arr.sizeBytes())); + } + + template + TextureBinder(const PtrStepSz& arr, const struct texture& tex) + : texref(&tex) + { + cudaChannelFormatDesc desc = cudaCreateChannelDesc(); + cudaSafeCall( + cudaBindTexture2D(0, tex, arr.data, desc, arr.cols, arr.rows, arr.step)); + } + + template + TextureBinder(const PtrSz& arr, const struct texture& tex) + : texref(&tex) + { + cudaChannelFormatDesc desc = cudaCreateChannelDesc(); + cudaSafeCall(cudaBindTexture(0, tex, arr.data, desc, arr.size * arr.elemSize())); + } + + ~TextureBinder() { cudaSafeCall(cudaUnbindTexture(texref)); } + +private: + const struct textureReference* texref; +}; +} // namespace gpu + +namespace device { +using pcl::gpu::TextureBinder; +} +} // namespace pcl + +#endif /* PCL_GPU_UTILS_TEXTURE_BINDER_HPP_*/ \ No newline at end of file diff --git a/gpu/utils/src/repacks.cu b/gpu/containers/src/repacks.cu similarity index 98% rename from gpu/utils/src/repacks.cu rename to gpu/containers/src/repacks.cu index 2467bf9b9d8..e99956a7500 100644 --- a/gpu/utils/src/repacks.cu +++ b/gpu/containers/src/repacks.cu @@ -1,7 +1,7 @@ -#include "internal.hpp" +#include +#include + #include -#include "pcl/gpu/utils/safe_call.hpp" -#include "pcl/pcl_exports.h" namespace pcl { diff --git a/gpu/features/CMakeLists.txt b/gpu/features/CMakeLists.txt index ebc1a6cd829..4eecde02fc0 100644 --- a/gpu/features/CMakeLists.txt +++ b/gpu/features/CMakeLists.txt @@ -24,7 +24,6 @@ file(GLOB srcs_utils src/utils/*.hpp) source_group("Source Files\\utils" FILES ${srcs_utils}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${cuda} ${srcs_utils} ${dev_incs}) target_link_libraries("${LIB_NAME}" pcl_gpu_utils pcl_gpu_containers pcl_gpu_octree) diff --git a/gpu/features/test/CMakeLists.txt b/gpu/features/test/CMakeLists.txt index 7d81b67e799..3ae9e04f104 100644 --- a/gpu/features/test/CMakeLists.txt +++ b/gpu/features/test/CMakeLists.txt @@ -2,26 +2,8 @@ if(NOT BUILD_TESTS) return() endif() -include_directories( - "${PCL_SOURCE_DIR}/test/gtest-1.6.0/include" - "${PCL_SOURCE_DIR}/test/gtest-1.6.0" -) - -set(pcl_gtest_sources "${PCL_SOURCE_DIR}/test/gtest-1.6.0/src/gtest-all.cc") - set(the_test_target test_gpu_features) -get_filename_component(DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -get_filename_component(INC1 "${DIR}/../../../io/include" REALPATH) -get_filename_component(INC2 "${DIR}/../../../features/include" REALPATH) -get_filename_component(INC3 "${DIR}/../../../kdtree/include" REALPATH) -get_filename_component(INC4 "${DIR}/../../../visualization/include" REALPATH) -get_filename_component(INC5 "${DIR}/../../../common/include" REALPATH) -get_filename_component(INC6 "${DIR}/../../../search/include" REALPATH) -get_filename_component(INC7 "${DIR}/../../../octree/include" REALPATH) - - file(GLOB test_src *.cpp *.hpp) list(APPEND test_src ${pcl_gtest_sources}) -include_directories("${INC1}" "${INC2}" "${INC3}" "${INC4}" "${INC5}" "${INC6}" "${INC7}") -include_directories(SYSTEM ${VTK_INCLUDE_DIRS}) + diff --git a/gpu/kinfu/CMakeLists.txt b/gpu/kinfu/CMakeLists.txt index 723604a7557..2ba88e0c1d8 100644 --- a/gpu/kinfu/CMakeLists.txt +++ b/gpu/kinfu/CMakeLists.txt @@ -1,7 +1,7 @@ set(SUBSYS_NAME gpu_kinfu) set(SUBSYS_PATH gpu/kinfu) set(SUBSYS_DESC "Kinect Fusion implementation") -set(SUBSYS_DEPS common io gpu_containers geometry search) +set(SUBSYS_DEPS common io gpu_utils gpu_containers geometry search) if(${CUDA_VERSION_STRING} VERSION_GREATER_EQUAL "12.0") set(DEFAULT FALSE) set(REASON "Kinfu uses textures which was removed in CUDA 12") @@ -26,10 +26,10 @@ source_group("Source Files\\cuda" FILES ${cuda}) source_group("Source Files" FILES ${srcs}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${cuda}) -target_link_libraries(${LIB_NAME} pcl_gpu_containers) +target_link_libraries(${LIB_NAME} pcl_gpu_utils pcl_gpu_containers) +target_include_directories(${LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) target_compile_options(${LIB_NAME} PRIVATE $<$:--ftz=true;--prec-div=false;--prec-sqrt=false>) diff --git a/gpu/kinfu/tools/CMakeLists.txt b/gpu/kinfu/tools/CMakeLists.txt index 2477f8669bf..4a52d7833a1 100644 --- a/gpu/kinfu/tools/CMakeLists.txt +++ b/gpu/kinfu/tools/CMakeLists.txt @@ -13,10 +13,7 @@ if(NOT build) return() endif() -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") - file(GLOB hdrs "*.h*") -include_directories(SYSTEM ${OPENNI_INCLUDE_DIRS}) ## KINECT FUSION set(the_target pcl_kinfu_app) diff --git a/gpu/kinfu_large_scale/CMakeLists.txt b/gpu/kinfu_large_scale/CMakeLists.txt index a84950dc7fc..da956a2770e 100644 --- a/gpu/kinfu_large_scale/CMakeLists.txt +++ b/gpu/kinfu_large_scale/CMakeLists.txt @@ -29,11 +29,9 @@ source_group("Source Files\\cuda" FILES ${cuda}) source_group("Source Files" FILES ${srcs}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src") - PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs} ${cuda}) - target_link_libraries(${LIB_NAME} pcl_common pcl_io pcl_gpu_utils pcl_gpu_containers pcl_gpu_octree pcl_octree pcl_filters) +target_include_directories(${LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) target_compile_options(${LIB_NAME} PRIVATE $<$:--ftz=true;--prec-div=false;--prec-sqrt=false>) diff --git a/gpu/kinfu_large_scale/tools/CMakeLists.txt b/gpu/kinfu_large_scale/tools/CMakeLists.txt index 017a1907f54..30fbebe248d 100644 --- a/gpu/kinfu_large_scale/tools/CMakeLists.txt +++ b/gpu/kinfu_large_scale/tools/CMakeLists.txt @@ -13,10 +13,7 @@ if(NOT build) return() endif() -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") - file(GLOB hdrs "*.h*") -include_directories(SYSTEM ${VTK_INCLUDE_DIRS}) ## STANDALONE TEXTURE MAPPING set(the_target pcl_kinfu_largeScale_texture_output) diff --git a/gpu/octree/CMakeLists.txt b/gpu/octree/CMakeLists.txt index ddc043276bb..2c2f67e9813 100644 --- a/gpu/octree/CMakeLists.txt +++ b/gpu/octree/CMakeLists.txt @@ -25,9 +25,9 @@ source_group("Source Files\\cuda" FILES ${cuda}) list(APPEND srcs ${utils} ${cuda}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/src/utils") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) target_link_libraries("${LIB_NAME}" pcl_gpu_containers) +target_include_directories(${LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) set(EXT_DEPS "") #set(EXT_DEPS CUDA) diff --git a/gpu/octree/src/cuda/octree_host.cu b/gpu/octree/src/cuda/octree_host.cu index 2230ab3e2e2..8e8782c34f9 100644 --- a/gpu/octree/src/cuda/octree_host.cu +++ b/gpu/octree/src/cuda/octree_host.cu @@ -34,8 +34,8 @@ * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) */ -#include "pcl/gpu/utils/timers_cuda.hpp" -#include "pcl/gpu/utils/safe_call.hpp" +#include +#include #include "internal.hpp" #include "utils/approx_nearest_utils.hpp" diff --git a/gpu/octree/src/octree.cpp b/gpu/octree/src/octree.cpp index 63a7e738360..e5b06391aab 100644 --- a/gpu/octree/src/octree.cpp +++ b/gpu/octree/src/octree.cpp @@ -34,6 +34,7 @@ * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) */ +#include #include #include #include diff --git a/gpu/people/CMakeLists.txt b/gpu/people/CMakeLists.txt index dcc2040f4eb..6c9c3abad16 100644 --- a/gpu/people/CMakeLists.txt +++ b/gpu/people/CMakeLists.txt @@ -46,17 +46,18 @@ file(GLOB hdrs_cuda src/cuda/nvidia/*.h*) source_group("Source files\\cuda" FILES ${srcs_cuda}) source_group("Source files" FILES ${srcs}) -include_directories( - "${CMAKE_CURRENT_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/src" - "${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" - "${CMAKE_CURRENT_SOURCE_DIR}/src/cuda/nvidia" -) - set(LIB_NAME "pcl_${SUBSYS_NAME}") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${hdrs} ${srcs_cuda}) target_link_libraries(${LIB_NAME} pcl_common pcl_search pcl_surface pcl_segmentation pcl_features pcl_sample_consensus pcl_gpu_utils pcl_gpu_containers ${CUDA_CUDART_LIBRARY} ${CUDA_npp_LIBRARY}) +target_include_directories( + ${LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_SOURCE_DIR}/src/cuda + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/src/cuda/nvidia +) if(UNIX OR APPLE) target_compile_options(${LIB_NAME} INTERFACE $<$:"-Xcompiler=-fPIC">) diff --git a/gpu/people/src/cuda/elec.cu b/gpu/people/src/cuda/elec.cu index 0cacdf9f0e1..2b3cd85a60b 100644 --- a/gpu/people/src/cuda/elec.cu +++ b/gpu/people/src/cuda/elec.cu @@ -1,6 +1,6 @@ #include "internal.h" -#include +#include #include #include diff --git a/gpu/people/src/cuda/multi_tree.cu b/gpu/people/src/cuda/multi_tree.cu index 5abc443d580..df256264b1a 100644 --- a/gpu/people/src/cuda/multi_tree.cu +++ b/gpu/people/src/cuda/multi_tree.cu @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/gpu/people/src/cuda/prob.cu b/gpu/people/src/cuda/prob.cu index b9cf5524dfc..52c89a5e62e 100644 --- a/gpu/people/src/cuda/prob.cu +++ b/gpu/people/src/cuda/prob.cu @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/gpu/people/src/cuda/utils.cu b/gpu/people/src/cuda/utils.cu index 834de9283d9..5f29d5c61af 100644 --- a/gpu/people/src/cuda/utils.cu +++ b/gpu/people/src/cuda/utils.cu @@ -2,7 +2,8 @@ #include "internal.h" #include -#include +#include +#include #include "npp.h" #include diff --git a/gpu/people/tools/CMakeLists.txt b/gpu/people/tools/CMakeLists.txt index 6cd7e7f9931..68e9b6e3ffe 100644 --- a/gpu/people/tools/CMakeLists.txt +++ b/gpu/people/tools/CMakeLists.txt @@ -6,13 +6,10 @@ if(NOT VTK_FOUND) else() set(DEFAULT TRUE) set(REASON) - include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") endif() set(the_target people_tracking) -include_directories(SYSTEM ${VTK_INCLUDE_DIRS}) - #PCL_ADD_EXECUTABLE(${the_target} "${SUBSYS_NAME}" people_tracking.cpp) #target_link_libraries("${the_target}" pcl_common pcl_kdtree pcl_gpu_people pcl_io pcl_visualization) diff --git a/gpu/segmentation/CMakeLists.txt b/gpu/segmentation/CMakeLists.txt index 42cb57850cc..8bc3992c298 100644 --- a/gpu/segmentation/CMakeLists.txt +++ b/gpu/segmentation/CMakeLists.txt @@ -31,7 +31,6 @@ set(impl_incs ) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs}) target_link_libraries("${LIB_NAME}" pcl_common pcl_gpu_octree pcl_gpu_utils pcl_gpu_containers) PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS}) diff --git a/gpu/surface/CMakeLists.txt b/gpu/surface/CMakeLists.txt index 64eea2ae17e..22a84d72a98 100644 --- a/gpu/surface/CMakeLists.txt +++ b/gpu/surface/CMakeLists.txt @@ -25,9 +25,9 @@ source_group("Source Files\\cuda" FILES ${cuda}) list(APPEND srcs ${utils} ${cuda}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/src/cuda") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) -target_link_libraries("${LIB_NAME}" pcl_gpu_containers) +target_link_libraries(${LIB_NAME} pcl_gpu_containers) +target_include_directories(${LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) set(EXT_DEPS "") #set(EXT_DEPS CUDA) diff --git a/gpu/surface/test/CMakeLists.txt b/gpu/surface/test/CMakeLists.txt index 83f912d9310..96f6600d247 100644 --- a/gpu/surface/test/CMakeLists.txt +++ b/gpu/surface/test/CMakeLists.txt @@ -4,18 +4,6 @@ endif() set(the_test_target test_gpu_surface) -get_filename_component(DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -get_filename_component(INC_SURF "${DIR}/../../surface/include" REALPATH) -get_filename_component(INC_IO "${DIR}/../../../io/include" REALPATH) -get_filename_component(INC_VIZ "${DIR}/../../../visualization/include" REALPATH) -get_filename_component(INC_GEO "${DIR}/../../../geometry/include" REALPATH) -get_filename_component(INC_SURF_CPU "${DIR}/../../../surface/include" REALPATH) -get_filename_component(INC_SEA "${DIR}/../../../search/include" REALPATH) -get_filename_component(INC_KD "${DIR}/../../../kdtree/include" REALPATH) -get_filename_component(INC_OCT "${DIR}/../../../octree/include" REALPATH) -include_directories("${INC_SURF}" "${INC_IO}" "${INC_VIZ}" "${INC_GEO}" "${INC_SURF_CPU}" "${INC_SEA}" "${INC_KD}" "${INC_OCT}") -include_directories(SYSTEM ${VTK_INCLUDE_DIRS}) - file(GLOB test_src *.cpp *.hpp) #PCL_ADD_TEST(a_gpu_surface_test ${the_test_target} FILES ${test_src} LINK_WITH pcl_io pcl_gpu_containers pcl_gpu_surface pcl_visualization pcl_surface pcl_octree pcl_kdtree pcl_search) #add_dependencies(${the_test_target} pcl_io pcl_gpu_containes pcl_gpu_surface pcl_visualization) diff --git a/gpu/tracking/CMakeLists.txt b/gpu/tracking/CMakeLists.txt index 3b8221208dd..651c1718d9c 100644 --- a/gpu/tracking/CMakeLists.txt +++ b/gpu/tracking/CMakeLists.txt @@ -25,9 +25,9 @@ source_group("Source Files\\cuda" FILES ${cuda}) list(APPEND srcs ${utils} ${cuda}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/src/cuda") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs}) -target_link_libraries("${LIB_NAME}" pcl_gpu_containers) +target_link_libraries(${LIB_NAME} pcl_gpu_containers) +target_include_directories(${LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) set(EXT_DEPS "") #set(EXT_DEPS CUDA) diff --git a/gpu/utils/CMakeLists.txt b/gpu/utils/CMakeLists.txt index 6f0aac6a22a..e0f4ccfb020 100644 --- a/gpu/utils/CMakeLists.txt +++ b/gpu/utils/CMakeLists.txt @@ -1,7 +1,7 @@ set(SUBSYS_NAME gpu_utils) set(SUBSYS_PATH gpu/utils) set(SUBSYS_DESC "Device layer functions.") -set(SUBSYS_DEPS common gpu_containers) +set(SUBSYS_DEPS common) PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS}) @@ -19,9 +19,8 @@ source_group("Header Files\\device" FILES ${dev_incs}) source_group("Source Files" FILES ${srcs}) set(LIB_NAME "pcl_${SUBSYS_NAME}") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${dev_incs} ${incs} ${srcs}) -target_link_libraries("${LIB_NAME}" pcl_gpu_containers) +target_link_libraries("${LIB_NAME}" pcl_common) set(EXT_DEPS "") #set(EXT_DEPS CUDA) diff --git a/gpu/utils/include/pcl/gpu/utils/repacks.hpp b/gpu/utils/include/pcl/gpu/utils/repacks.hpp index ce1e2d221dd..217fa321db8 100644 --- a/gpu/utils/include/pcl/gpu/utils/repacks.hpp +++ b/gpu/utils/include/pcl/gpu/utils/repacks.hpp @@ -37,97 +37,7 @@ #ifndef __PCL_GPU_UTILS_REPACKS_HPP__ #define __PCL_GPU_UTILS_REPACKS_HPP__ -#include -#include +PCL_DEPRECATED_HEADER(1, 17, "This has been deprecated, please include it from pcl/gpu/containers.") -#include - -namespace pcl -{ - namespace gpu - { - /////////////////////////////////////// - /// This is an experimental code /// - /////////////////////////////////////// - - const int NoCP = 0xFFFFFFFF; - - /** \brief Returns field copy operation code. */ - inline int cp(int from, int to) - { - return ((to & 0xF) << 4) + (from & 0xF); - } - - /* Combines several field copy operations to one int (called rule) */ - inline int rule(int cp1, int cp2 = NoCP, int cp3 = NoCP, int cp4 = NoCP) - { - return (cp1 & 0xFF) + ((cp2 & 0xFF) << 8) + ((cp3 & 0xFF) << 16) + ((cp4 & 0xFF) << 24); - } - - /* Combines performs all field copy operations in given rule array (can be 0, 1, or 16 copies) */ - void copyFieldsImpl(int in_size, int out_size, int rules[4], int size, const void* input, void* output); - - template - void copyFieldsEx(const DeviceArray& src, DeviceArray& dst, int rule1, int rule2 = NoCP, int rule3 = NoCP, int rule4 = NoCP) - { - int rules[4] = { rule1, rule2, rule3, rule4 }; - dst.create(src.size()); - copyFieldsImpl(sizeof(PointIn)/sizeof(int), sizeof(PointOut)/sizeof(int), rules, (int)src.size(), src.ptr(), dst.ptr()); - } - - void copyFields(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZ.x (0) -> PointNormal.x (0) - //PointXYZ.y (1) -> PointNormal.y (1) - //PointXYZ.z (2) -> PointNormal.z (2) - copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); - }; - - void copyFields(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZ.normal_x (0) -> PointNormal.normal_x (4) - //PointXYZ.normal_y (1) -> PointNormal.normal_y (5) - //PointXYZ.normal_z (2) -> PointNormal.normal_z (6) - //PointXYZ.curvature (4) -> PointNormal.curvature (8) - copyFieldsEx(src, dst, rule(cp(0, 4), cp(1, 5), cp(2, 6), cp(4,8))); - }; - - void copyFields(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZRGBL.x (0) -> PointXYZ.x (0) - //PointXYZRGBL.y (1) -> PointXYZ.y (1) - //PointXYZRGBL.z (2) -> PointXYZ.z (2) - copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); - }; - - void copyFields(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZRGB.x (0) -> PointXYZ.x (0) - //PointXYZRGB.y (1) -> PointXYZ.y (1) - //PointXYZRGB.z (2) -> PointXYZ.z (2) - copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); - }; - - void copyFields(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZRGBA.x (0) -> PointXYZ.x (0) - //PointXYZRGBA.y (1) -> PointXYZ.y (1) - //PointXYZRGBA.z (2) -> PointXYZ.z (2) - copyFieldsEx(src, dst, rule(cp(0, 0), cp(1, 1), cp(2, 2))); - }; - - void copyFieldsZ(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZRGBL.z (2) -> float (1) - copyFieldsEx(src, dst, rule(cp(2, 0))); - }; - - void copyFieldsZ(const DeviceArray& src, DeviceArray& dst) - { - //PointXYZRGBL.z (2) -> float (1) - copyFieldsEx(src, dst, rule(cp(2, 0))); - }; - } -} #endif /* __PCL_GPU_UTILS_REPACKS_HPP__ */ diff --git a/gpu/utils/include/pcl/gpu/utils/safe_call.hpp b/gpu/utils/include/pcl/gpu/utils/safe_call.hpp index 2a2e844d72e..0c0b8373956 100644 --- a/gpu/utils/include/pcl/gpu/utils/safe_call.hpp +++ b/gpu/utils/include/pcl/gpu/utils/safe_call.hpp @@ -38,32 +38,41 @@ #define __PCL_CUDA_SAFE_CALL_HPP__ #include -#include + +#include #if defined(__GNUC__) - #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__, __func__) +#define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__, __func__) #else /* defined(__CUDACC__) || defined(__MSVC__) */ - #define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__) +#define cudaSafeCall(expr) pcl::gpu::___cudaSafeCall(expr, __FILE__, __LINE__) #endif -namespace pcl -{ - namespace gpu - { - static inline void ___cudaSafeCall(cudaError_t err, const char *file, const int line, const char *func = "") - { - if (cudaSuccess != err) - error(cudaGetErrorString(err), file, line, func); - } +namespace pcl { +namespace gpu { - static inline int divUp(int total, int grain) { return (total + grain - 1) / grain; } - } +static inline void +___cudaSafeCall(cudaError_t err, + const char* file, + const int line, + const char* func = "") +{ + if (cudaSuccess != err) { + std::cout << "Error: " << cudaGetErrorString(err) << "\t" << file << ":" << line + << ":" << func << std::endl; + exit(EXIT_FAILURE); + } +} - namespace device - { - using pcl::gpu::divUp; - } +static inline int +divUp(int total, int grain) +{ + return (total + grain - 1) / grain; } +} // namespace gpu +namespace device { +using pcl::gpu::divUp; +} +} // namespace pcl #endif /* __PCL_CUDA_SAFE_CALL_HPP__ */ diff --git a/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp b/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp index 772392e042b..a52799fe3ab 100644 --- a/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp +++ b/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp @@ -37,57 +37,6 @@ #ifndef PCL_GPU_UTILS_TEXTURE_BINDER_HPP_ #define PCL_GPU_UTILS_TEXTURE_BINDER_HPP_ -#include -#include +PCL_DEPRECATED_HEADER(1, 17, "This has been deprecated, please include it from pcl/gpu/containers.") -namespace pcl -{ - namespace gpu - { - class TextureBinder - { - public: - template - TextureBinder(const DeviceArray2D& arr, const struct texture& tex) : texref(&tex) - { - cudaChannelFormatDesc desc = cudaCreateChannelDesc(); - cudaSafeCall( cudaBindTexture2D(0, tex, arr.ptr(), desc, arr.cols(), arr.rows(), arr.step()) ); - } - - template - TextureBinder(const DeviceArray& arr, const struct texture &tex) : texref(&tex) - { - cudaChannelFormatDesc desc = cudaCreateChannelDesc(); - cudaSafeCall( cudaBindTexture(0, tex, arr.ptr(), desc, arr.sizeBytes()) ); - } - - template - TextureBinder(const PtrStepSz& arr, const struct texture& tex) : texref(&tex) - { - cudaChannelFormatDesc desc = cudaCreateChannelDesc(); - cudaSafeCall( cudaBindTexture2D(0, tex, arr.data, desc, arr.cols, arr.rows, arr.step) ); - } - - template - TextureBinder(const PtrSz& arr, const struct texture &tex) : texref(&tex) - { - cudaChannelFormatDesc desc = cudaCreateChannelDesc(); - cudaSafeCall( cudaBindTexture(0, tex, arr.data, desc, arr.size * arr.elemSize()) ); - } - - ~TextureBinder() - { - cudaSafeCall( cudaUnbindTexture(texref) ); - } - private: - const struct textureReference *texref; - }; - } - - namespace device - { - using pcl::gpu::TextureBinder; - } -} - -#endif /* PCL_GPU_UTILS_TEXTURE_BINDER_HPP_*/ \ No newline at end of file +#endif /* PCL_GPU_UTILS_TEXTURE_BINDER_HPP_*/ diff --git a/gpu/utils/src/empty.cu b/gpu/utils/src/empty.cu new file mode 100644 index 00000000000..1de32816f93 --- /dev/null +++ b/gpu/utils/src/empty.cu @@ -0,0 +1 @@ +// added empty file for Cmake to determine link language. diff --git a/gpu/utils/src/internal.hpp b/gpu/utils/src/internal.hpp index 52245ca7f46..f1c2fbb6326 100644 --- a/gpu/utils/src/internal.hpp +++ b/gpu/utils/src/internal.hpp @@ -37,6 +37,11 @@ #ifndef PCL_GPU_UTILS_INTERNAL_HPP_ #define PCL_GPU_UTILS_INTERNAL_HPP_ +#include + +PCL_DEPRECATED_HEADER(1, 17, "This has been deprecated and will be removed.") + + namespace pcl { namespace device @@ -45,4 +50,4 @@ namespace pcl } } -#endif \ No newline at end of file +#endif diff --git a/gpu/utils/src/repacks.cpp b/gpu/utils/src/repacks.cpp deleted file mode 100644 index eae8e6081b5..00000000000 --- a/gpu/utils/src/repacks.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Software License Agreement (BSD License) - * - * Copyright (c) 2011, Willow Garage, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Willow Garage, Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) - */ - -#include - -#include -#include "internal.hpp" -