From c67436ff57e154b4708aa679ae61e5c376d81645 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Mon, 8 Sep 2025 11:57:03 -0700 Subject: [PATCH] Run trailing-whitespace and end-of-file-fixer pre-commit hooks [7/N] --- projects/rocthrust/.clang-format | 2 +- projects/rocthrust/.githooks/install | 2 +- projects/rocthrust/.github/CODEOWNERS | 2 +- projects/rocthrust/.gitlab/run_benchmarks.py | 2 +- projects/rocthrust/CHANGELOG.md | 4 ++-- projects/rocthrust/CMakeLists.txt | 14 +++++------ projects/rocthrust/NOTICES.txt | 18 +++++++------- projects/rocthrust/README.md | 2 +- projects/rocthrust/cmake/Dependencies.cmake | 2 +- projects/rocthrust/cmake/FindROCMCmake.cmake | 1 - projects/rocthrust/cmake/Summary.cmake | 2 +- projects/rocthrust/custom.properties | 2 +- projects/rocthrust/doc/CHANGELOG.md | 1 - projects/rocthrust/docs/bitwise-repro.rst | 4 ++-- projects/rocthrust/docs/data-type-support.rst | 1 - .../rocthrust/docs/hip-execution-policies.rst | 2 +- projects/rocthrust/docs/hipgraph-support.rst | 2 +- .../docs/how-to/rocThrust-build-backends.rst | 20 ++++++++-------- .../run-rocThrust-tests-on-multiple-gpus.rst | 16 ++++--------- .../how-to/use-rocThrust-in-a-project.rst | 3 +-- projects/rocthrust/docs/index.rst | 2 +- .../install/rocThrust-install-overview.rst | 6 ++--- .../docs/install/rocThrust-install-script.rst | 5 ++-- .../install/rocThrust-install-with-cmake.rst | 10 ++++---- .../docs/install/rocThrust-prerequisites.rst | 2 +- .../docs/install/rocThrust-rmake-install.rst | 6 ++--- .../docs/reference/rocThrust-hipstdpar.rst | 4 ++-- projects/rocthrust/docs/sphinx/_toc.yml.in | 2 +- .../rocthrust/examples/cpp_integration/README | 3 +-- projects/rocthrust/rmake.py | 14 +++++------ projects/rocthrust/rtest.py | 24 +++++++++---------- projects/rocthrust/test/CMakeLists.txt | 2 +- .../rocthrust/test/hipstdpar/CMakeLists.txt | 2 +- projects/rocthrust/testing/cuda/merge_sort.cu | 4 ++-- .../detail/allocator/malloc_allocator.inl | 1 - .../detail/allocator/tagged_allocator.inl | 1 - projects/rocthrust/thrust/detail/reduce.inl | 1 - projects/rocthrust/thrust/detail/remove.inl | 1 - projects/rocthrust/thrust/detail/replace.inl | 1 - projects/rocthrust/thrust/detail/reverse.inl | 1 - projects/rocthrust/thrust/detail/scan.inl | 1 - projects/rocthrust/thrust/detail/scatter.inl | 1 - projects/rocthrust/thrust/detail/sequence.inl | 1 - .../thrust/detail/set_operations.inl | 1 - projects/rocthrust/thrust/detail/shuffle.inl | 1 - projects/rocthrust/thrust/detail/sort.inl | 1 - .../rocthrust/thrust/detail/swap_ranges.inl | 1 - projects/rocthrust/thrust/detail/tabulate.inl | 1 - .../rocthrust/thrust/detail/transform.inl | 1 - .../thrust/detail/transform_reduce.inl | 1 - .../thrust/detail/uninitialized_copy.inl | 2 -- .../thrust/detail/uninitialized_fill.inl | 1 - projects/rocthrust/thrust/detail/unique.inl | 1 - .../thrust/iterator/detail/zip_iterator.inl | 1 - .../random/detail/discard_block_engine.inl | 1 - .../detail/linear_congruential_engine.inl | 1 - .../detail/linear_feedback_shift_engine.inl | 1 - .../detail/subtract_with_carry_engine.inl | 1 - .../detail/uniform_int_distribution.inl | 1 - .../detail/uniform_real_distribution.inl | 1 - .../random/detail/xor_combine_engine.inl | 1 - .../thrust/system/cpp/detail/memory.inl | 1 - .../thrust/system/cuda/detail/error.inl | 1 - .../thrust/system/cuda/detail/memory.inl | 1 - .../detail/generic/adjacent_difference.inl | 1 - .../thrust/system/detail/generic/advance.inl | 1 - .../thrust/system/detail/generic/distance.inl | 1 - .../system/detail/generic/inner_product.inl | 1 - .../thrust/system/detail/generic/memory.inl | 1 - .../thrust/system/detail/generic/merge.inl | 1 - .../system/detail/generic/partition.inl | 1 - .../thrust/system/detail/generic/reduce.inl | 1 - .../thrust/system/detail/generic/remove.inl | 1 - .../thrust/system/detail/generic/reverse.inl | 2 -- .../system/detail/generic/set_operations.inl | 1 - .../thrust/system/detail/generic/sort.inl | 1 - .../thrust/system/detail/generic/tabulate.inl | 2 -- .../system/detail/generic/transform.inl | 1 - .../detail/generic/transform_reduce.inl | 1 - .../thrust/system/detail/generic/unique.inl | 5 ++-- .../system/detail/generic/unique_by_key.inl | 1 - .../thrust/system/detail/sequential/copy.inl | 1 - .../thrust/system/detail/sequential/merge.inl | 1 - .../thrust/system/detail/system_error.inl | 1 - .../thrust/system/omp/detail/copy.inl | 1 - .../thrust/system/omp/detail/copy_if.inl | 1 - .../omp/detail/default_decomposition.inl | 1 - .../thrust/system/omp/detail/for_each.inl | 1 - .../thrust/system/omp/detail/memory.inl | 1 - .../thrust/system/omp/detail/partition.inl | 1 - .../thrust/system/omp/detail/reduce.inl | 1 - .../system/omp/detail/reduce_by_key.inl | 1 - .../system/omp/detail/reduce_intervals.inl | 1 - .../thrust/system/omp/detail/remove.inl | 1 - .../thrust/system/omp/detail/sort.inl | 1 - .../thrust/system/omp/detail/unique.inl | 3 +-- .../system/omp/detail/unique_by_key.inl | 5 ++-- .../thrust/system/tbb/detail/copy.inl | 1 - .../thrust/system/tbb/detail/copy_if.inl | 9 ++++--- .../thrust/system/tbb/detail/for_each.inl | 1 - .../thrust/system/tbb/detail/memory.inl | 1 - .../thrust/system/tbb/detail/merge.inl | 1 - .../thrust/system/tbb/detail/partition.inl | 1 - .../system/tbb/detail/reduce_by_key.inl | 2 +- .../thrust/system/tbb/detail/remove.inl | 1 - .../thrust/system/tbb/detail/scan.inl | 2 +- .../thrust/system/tbb/detail/unique.inl | 3 +-- .../system/tbb/detail/unique_by_key.inl | 5 ++-- 108 files changed, 101 insertions(+), 190 deletions(-) diff --git a/projects/rocthrust/.clang-format b/projects/rocthrust/.clang-format index 0d02506ba193..ec5070f136c5 100644 --- a/projects/rocthrust/.clang-format +++ b/projects/rocthrust/.clang-format @@ -226,4 +226,4 @@ StatementMacros: [ '_LIBCUDACXX_END_NAMESPACE_VIEWS', ] TabWidth: 2 -UseTab: Never \ No newline at end of file +UseTab: Never diff --git a/projects/rocthrust/.githooks/install b/projects/rocthrust/.githooks/install index a98d897d58cf..31506e6806ce 100755 --- a/projects/rocthrust/.githooks/install +++ b/projects/rocthrust/.githooks/install @@ -3,6 +3,6 @@ cd "$(git rev-parse --git-dir)" cd hooks -echo "Installing hooks..." +echo "Installing hooks..." ln -s ../../.githooks/pre-commit pre-commit echo "Done!" diff --git a/projects/rocthrust/.github/CODEOWNERS b/projects/rocthrust/.github/CODEOWNERS index 2ac616b9b9bb..430fdb8788bb 100755 --- a/projects/rocthrust/.github/CODEOWNERS +++ b/projects/rocthrust/.github/CODEOWNERS @@ -1,4 +1,4 @@ -* @stanleytsang-amd @umfranzw @RobsonRLemos +* @stanleytsang-amd @umfranzw @RobsonRLemos # Documentation files docs/ @ROCm/rocm-documentation *.md @ROCm/rocm-documentation diff --git a/projects/rocthrust/.gitlab/run_benchmarks.py b/projects/rocthrust/.gitlab/run_benchmarks.py index a3fe98212405..6a94c25c615a 100755 --- a/projects/rocthrust/.gitlab/run_benchmarks.py +++ b/projects/rocthrust/.gitlab/run_benchmarks.py @@ -66,7 +66,7 @@ def is_benchmark_executable(filename): subprocess.check_call(args) end_time = time.time() duration = end_time - start_time - + print(f'Benchmark {benchmark_name} took {duration:.3f} seconds to run', file=sys.stderr, flush=True) except subprocess.CalledProcessError as error: print(f'Could not run benchmark at {benchmark_path}. Error: "{error}"', file=sys.stderr, flush=True) diff --git a/projects/rocthrust/CHANGELOG.md b/projects/rocthrust/CHANGELOG.md index 1accf647c12f..2625c998b76b 100644 --- a/projects/rocthrust/CHANGELOG.md +++ b/projects/rocthrust/CHANGELOG.md @@ -100,8 +100,8 @@ Documentation for rocThrust available at * Fixed `copy_if` to work with large data types (512 bytes) ### Known Issues -* `thrust::inclusive_scan_by_key` might produce incorrect results when it's used with -O2 or -O3 optimization. - - The error is caused by a recent compiler change. There is a fix available that will be released at a later date. +* `thrust::inclusive_scan_by_key` might produce incorrect results when it's used with -O2 or -O3 optimization. + - The error is caused by a recent compiler change. There is a fix available that will be released at a later date. ## rocThrust 3.2.0 for ROCm 6.3 diff --git a/projects/rocthrust/CMakeLists.txt b/projects/rocthrust/CMakeLists.txt index ef88453c6028..8d5014956d5e 100644 --- a/projects/rocthrust/CMakeLists.txt +++ b/projects/rocthrust/CMakeLists.txt @@ -170,7 +170,7 @@ if (NOT THRUST_HOST_SYSTEM IN_LIST THRUST_HOST_SYSTEM_OPTIONS) "THRUST_HOST_SYSTEM must be one of ${THRUST_HOST_SYSTEM_OPTIONS}" ) endif () - + set(COMPILE_OPTIONS -Wall -Wextra) if(NOT DISABLE_WERROR) list(APPEND COMPILE_OPTIONS -Werror) @@ -184,7 +184,7 @@ if (WIN32) add_compile_options(-xhip) add_compile_definitions(THRUST_IGNORE_DEPRECATED_CPP_DIALECT) endif() - + # Address Sanitizer if(BUILD_ADDRESS_SANITIZER) list(APPEND COMPILE_OPTIONS -fsanitize=address -shared-libasan) @@ -194,10 +194,10 @@ endif() # Setup VERSION rocm_setup_version(VERSION ${VERSION_STRING}) math(EXPR rocthrust_VERSION_NUMBER "${rocthrust_VERSION_MAJOR} * 100000 + ${rocthrust_VERSION_MINOR} * 100 + ${rocthrust_VERSION_PATCH}") - + # Thrust (with HIP backend) add_subdirectory(thrust) - + if(BUILD_TEST OR BUILD_BENCHMARK OR BUILD_HIPSTDPAR_TEST) rocm_package_setup_component(clients) endif() @@ -205,14 +205,14 @@ endif() if(CODE_COVERAGE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -fprofile-instr-generate -fcoverage-mapping") endif() - + # Tests if(BUILD_TEST OR BUILD_HIPSTDPAR_TEST) rocm_package_setup_client_component(tests) if (ENABLE_UPSTREAM_TESTS) enable_testing() endif() - + # We still want the testing to be compiled to catch some errors #TODO: Get testing folder working with HIP on Windows if (NOT WIN32 AND BUILD_TEST) @@ -260,7 +260,7 @@ rocm_create_package( MAINTAINER "rocthrust-maintainer@amd.com" HEADER_ONLY ) - + # Print configuration summary include(cmake/Summary.cmake) print_configuration_summary() diff --git a/projects/rocthrust/NOTICES.txt b/projects/rocthrust/NOTICES.txt index ca4023a274be..b91ff6f96433 100644 --- a/projects/rocthrust/NOTICES.txt +++ b/projects/rocthrust/NOTICES.txt @@ -2,7 +2,7 @@ Notices and licenses file _________________________ -AMD copyrighted code (Apache 2.0) +AMD copyrighted code (Apache 2.0) Copyright © 2019-2022 Advanced Micro Devices, Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,13 +18,13 @@ See the License for the specific language governing permissions and limitations under the License. -crascit-downloadproject v-u (MIT) +crascit-downloadproject v-u (MIT) # Distributed under the OSI-approved MIT License. See accompanying # file LICENSE or https://github.com/Crascit/DownloadProject for details. -Dependencies on scipy-scipy v-u (BSD-3-Clause) -Copyright (C) 2003-2013 SciPy Developers. -Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved. +Dependencies on scipy-scipy v-u (BSD-3-Clause) +Copyright (C) 2003-2013 SciPy Developers. +Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -55,7 +55,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Dependencies on thrust-thrust v1.9.2 (Apache 2.0) +Dependencies on thrust-thrust v1.9.2 (Apache 2.0) Copyright 2008-2013 NVIDIA Corporation Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved. @@ -72,7 +72,7 @@ See the License for the specific language governing permissions and limitations under the License. -rocmsoftwareplatform-rocfft v-u (MIT) +rocmsoftwareplatform-rocfft v-u (MIT) Copyright © 2016 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -82,7 +82,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE -thrust-thrust v1.9.2 (Apache 2.0) +thrust-thrust v1.9.2 (Apache 2.0) Copyright 2008-2013 NVIDIA Corporation Licensed under the Apache License, Version 2.0 (the "License"); @@ -98,7 +98,7 @@ See the License for the specific language governing permissions and limitations under the License. -thrust-thrust v1.9.2 (BSD3) +thrust-thrust v1.9.2 (BSD3) Copyright (c) 2011, Duane Merrill. All rights reserved. Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. diff --git a/projects/rocthrust/README.md b/projects/rocthrust/README.md index 6e3a8b89bd7a..0859d7e3ba03 100644 --- a/projects/rocthrust/README.md +++ b/projects/rocthrust/README.md @@ -115,7 +115,7 @@ To specify an option, add it to your camke command, prefixed with the `-D` switc ### HIP on Windows -We've added initial support for HIP on Windows. +We've added initial support for HIP on Windows. To install, first clone rocThrust using the steps described in [obtaining the source code](#obtaining-the-source-code). Then, use the provided `rmake.py` Python script: diff --git a/projects/rocthrust/cmake/Dependencies.cmake b/projects/rocthrust/cmake/Dependencies.cmake index 0659be312bec..e05000226b8b 100644 --- a/projects/rocthrust/cmake/Dependencies.cmake +++ b/projects/rocthrust/cmake/Dependencies.cmake @@ -306,7 +306,7 @@ if(BUILD_TEST OR BUILD_HIPSTDPAR_TEST) UPDATE_DISCONNECTED TRUE ) find_package(TBB REQUIRED CONFIG PATHS ${TBB_ROOT}) - + endif() # SQlite (for run-to-run bitwise-reproducibility tests) diff --git a/projects/rocthrust/cmake/FindROCMCmake.cmake b/projects/rocthrust/cmake/FindROCMCmake.cmake index c81d13ff8dd9..1d2d52e36480 100644 --- a/projects/rocthrust/cmake/FindROCMCmake.cmake +++ b/projects/rocthrust/cmake/FindROCMCmake.cmake @@ -46,4 +46,3 @@ if(NOT ROCM_FOUND) find_package( ROCM 0.7.3 REQUIRED CONFIG PATHS ${PROJECT_EXTERN_DIR}/rocm-cmake ) endif() - diff --git a/projects/rocthrust/cmake/Summary.cmake b/projects/rocthrust/cmake/Summary.cmake index 8535ca5f3c98..605ed12ad315 100644 --- a/projects/rocthrust/cmake/Summary.cmake +++ b/projects/rocthrust/cmake/Summary.cmake @@ -114,5 +114,5 @@ if(GIT_FOUND) endif() if(UNAME_EXECUTABLE) message(STATUS " Unix name : ${LINUX_KERNEL_DETAILS}") -endif() +endif() endfunction() diff --git a/projects/rocthrust/custom.properties b/projects/rocthrust/custom.properties index c272889f2520..298aab4a076c 100644 --- a/projects/rocthrust/custom.properties +++ b/projects/rocthrust/custom.properties @@ -1,3 +1,3 @@ booktitle=rocTHRUST API Guide spreadsheet.xml=docs/classification-map.xml -document.locale=enus \ No newline at end of file +document.locale=enus diff --git a/projects/rocthrust/doc/CHANGELOG.md b/projects/rocthrust/doc/CHANGELOG.md index 84add08c82c9..470051873f19 100644 --- a/projects/rocthrust/doc/CHANGELOG.md +++ b/projects/rocthrust/doc/CHANGELOG.md @@ -2281,4 +2281,3 @@ First production release of Thrust. crash. - Komrade 7: Fix an issue where `const_iterator`s could not be passed to `thrust::transform`. - diff --git a/projects/rocthrust/docs/bitwise-repro.rst b/projects/rocthrust/docs/bitwise-repro.rst index 4d367eebaf95..578bb40d60de 100644 --- a/projects/rocthrust/docs/bitwise-repro.rst +++ b/projects/rocthrust/docs/bitwise-repro.rst @@ -22,7 +22,7 @@ An alternative version of the above operations that *is* bitwise reproducible wi ===== Tests ===== -To run the bitwise reproduciblity tests, you'll need to build the reproducibility.hip target. +To run the bitwise reproduciblity tests, you'll need to build the reproducibility.hip target. This target provides bitwise reproduciblity test coverage in two forms: 1. The first form runs tests by issuing multiple calls to the bitwise-reproducible versions of the algorithms mentioned in the section above using the deterministic parallel execution policy. @@ -60,4 +60,4 @@ If one or more of the three factors changes - suppose we now want to run on gfx1 After that we can test in the same manner as before: -``ROCTHRUST_BWR_PATH=/path/to/repro.db reproducibility.hip`` \ No newline at end of file +``ROCTHRUST_BWR_PATH=/path/to/repro.db reproducibility.hip`` diff --git a/projects/rocthrust/docs/data-type-support.rst b/projects/rocthrust/docs/data-type-support.rst index 605898dad826..1a4b65aeaf8f 100644 --- a/projects/rocthrust/docs/data-type-support.rst +++ b/projects/rocthrust/docs/data-type-support.rst @@ -21,4 +21,3 @@ rocThrust and Thrust both support the following fundamental types: Both rocThrust and Thrust also support ``half`` and ``bfloat16``. However, the host-side HIP implementations of these types are missing some functionality. Because of this, ``half`` and ``bfloat16`` should be used only as storage types to be passed between functions. - diff --git a/projects/rocthrust/docs/hip-execution-policies.rst b/projects/rocthrust/docs/hip-execution-policies.rst index a464ea13e6b3..5c0b3da94a87 100644 --- a/projects/rocthrust/docs/hip-execution-policies.rst +++ b/projects/rocthrust/docs/hip-execution-policies.rst @@ -86,4 +86,4 @@ The example below illustrates the behaviour of these two policies. std::cout << "reduction: " << reduction2 << std::endl; return 0; - } \ No newline at end of file + } diff --git a/projects/rocthrust/docs/hipgraph-support.rst b/projects/rocthrust/docs/hipgraph-support.rst index 3e755a17e529..fdf131205623 100644 --- a/projects/rocthrust/docs/hipgraph-support.rst +++ b/projects/rocthrust/docs/hipgraph-support.rst @@ -23,4 +23,4 @@ a given algorithm. This is because some Thrust functions require execution polic arguments) rather than at runtime. Since streams must be created at runtime, there is no way to pass these functions a stream. Adding a stream argument to such functions breaks compatibility with the Thrust API. -For these reasons, we recommend that you do not use hipGraphs together with rocThrust code. \ No newline at end of file +For these reasons, we recommend that you do not use hipGraphs together with rocThrust code. diff --git a/projects/rocthrust/docs/how-to/rocThrust-build-backends.rst b/projects/rocthrust/docs/how-to/rocThrust-build-backends.rst index 18958ecdf8f6..eedda05807d0 100644 --- a/projects/rocthrust/docs/how-to/rocThrust-build-backends.rst +++ b/projects/rocthrust/docs/how-to/rocThrust-build-backends.rst @@ -15,22 +15,22 @@ rocThrust supports CPP, OpenMP, and TBB on HOST and device, and NVIDIA CUDA on d The ``THRUST_HOST_SYSTEM``, ``_THRUST_HOST_SYSTEM_NAMESPACE``, ``THRUST_DEVICE_SYSTEM``, and ``_THRUST_DEVICE_SYSTEM_NAMESPACE`` build options specify the backend to use. -.. list-table:: +.. list-table:: :header-rows: 1 :widths: 52 13 13 13 13 - * - + * - - CPP - OpenMP - TBB - CUDA - * - **THRUST_HOST_SYSTEM** + * - **THRUST_HOST_SYSTEM** - 1 - 2 - 3 - not supported - + * - **_THRUST_HOST_SYSTEM_NAMESPACE** - cpp - omp @@ -42,7 +42,7 @@ The ``THRUST_HOST_SYSTEM``, ``_THRUST_HOST_SYSTEM_NAMESPACE``, ``THRUST_DEVICE_S - 2 - 3 - 1 - + * - **_THRUST_DEVICE_SYSTEM_NAMESPACE** - cpp - omp @@ -64,10 +64,10 @@ To build the application, create the ``build`` directory under the same director Run cmake with the appropriate build options for your backend: .. code:: shell - - CXX=hipcc [-DTHRUST_HOST_SYSTEM={1|2|3} - -D__THRUST_HOST_SYSTEM_NAMESPACE={cpp|omp|tbb}] - [-DTHRUST_HOST_SYSTEM={1|2|3|4} + + CXX=hipcc [-DTHRUST_HOST_SYSTEM={1|2|3} + -D__THRUST_HOST_SYSTEM_NAMESPACE={cpp|omp|tbb}] + [-DTHRUST_HOST_SYSTEM={1|2|3|4} -D__THRUST_HOST_SYSTEM_NAMESPACE={cuda|omp|tbb|cpp}] -Then run ``make`` to build. \ No newline at end of file +Then run ``make`` to build. diff --git a/projects/rocthrust/docs/how-to/run-rocThrust-tests-on-multiple-gpus.rst b/projects/rocthrust/docs/how-to/run-rocThrust-tests-on-multiple-gpus.rst index 671cb5263c58..36f212f2c3c3 100644 --- a/projects/rocthrust/docs/how-to/run-rocThrust-tests-on-multiple-gpus.rst +++ b/projects/rocthrust/docs/how-to/run-rocThrust-tests-on-multiple-gpus.rst @@ -8,11 +8,11 @@ How to run tests on multiple GPUs To run tests on multiple GPUs, you can configure your tests using the ``AMDGPU_TEST_TARGETS`` option or you can use CTest resource allocation. -The ``AMDGPU_TEST_TARGETS`` CTest option lets you specify the families of GPUs on which you want to run your tests. For example, if you have two GPUs from the gfx900 family in your system, you can specify ``-DAMDGPU_TEST_TARGETS=gfx900`` when you configure your test to specify that you only want that family of GPUs to be tested. If you don't set ``AMDGPU_TEST_TARGETS``, the tests will be run on the default device in your system. +The ``AMDGPU_TEST_TARGETS`` CTest option lets you specify the families of GPUs on which you want to run your tests. For example, if you have two GPUs from the gfx900 family in your system, you can specify ``-DAMDGPU_TEST_TARGETS=gfx900`` when you configure your test to specify that you only want that family of GPUs to be tested. If you don't set ``AMDGPU_TEST_TARGETS``, the tests will be run on the default device in your system. -You can use CTest resource allocation to run tests in a distributed manner across multiple GPUs and test multiple product families from one invocation. +You can use CTest resource allocation to run tests in a distributed manner across multiple GPUs and test multiple product families from one invocation. -CTest resource allocation requires a resource specification file. You can generate a resource specification file using the ``GenerateResourceSpec.cmake`` utility script. +CTest resource allocation requires a resource specification file. You can generate a resource specification file using the ``GenerateResourceSpec.cmake`` utility script. After you have cloned the ``rocThrust`` repository and built rocThrust with the ``-DBUILD_TESTS=ON`` option, change directory to the ``build`` directory and run: @@ -20,7 +20,7 @@ After you have cloned the ``rocThrust`` repository and built rocThrust with the ../cmake/GenerateResourceSpec.cmake -This will generate a ``resources.json`` file in the ``build`` directory. Use the ``resources.json`` file in your call to ``ctest``. +This will generate a ``resources.json`` file in the ``build`` directory. Use the ``resources.json`` file in your call to ``ctest``. For example, if you have two compatible GPUs in your system, run: @@ -29,12 +29,6 @@ For example, if you have two compatible GPUs in your system, run: ctest --resource-spec-file ./resources.json --parallel 2 -.. note:: +.. note:: CTest resource allocation requires CMake 3.16 or later. - - - - - - diff --git a/projects/rocthrust/docs/how-to/use-rocThrust-in-a-project.rst b/projects/rocthrust/docs/how-to/use-rocThrust-in-a-project.rst index 4872cc80fc29..aaa3f6f1e31a 100644 --- a/projects/rocthrust/docs/how-to/use-rocThrust-in-a-project.rst +++ b/projects/rocthrust/docs/how-to/use-rocThrust-in-a-project.rst @@ -8,7 +8,7 @@ How to use rocThrust in a CMake project To use rocThrust in your own project, add the following lines to your CMakeLists file: -.. code:: +.. code:: # On ROCm rocThrust requires rocPRIM find_package(rocprim REQUIRED CONFIG PATHS "/opt/rocm/rocprim") @@ -20,4 +20,3 @@ To use rocThrust in your own project, add the following lines to your CMakeLists # include rocThrust headers and roc::rocprim_hip target target_link_libraries( roc::rocthrust) - diff --git a/projects/rocthrust/docs/index.rst b/projects/rocthrust/docs/index.rst index bcd81e48dfb8..8324f22556ef 100644 --- a/projects/rocthrust/docs/index.rst +++ b/projects/rocthrust/docs/index.rst @@ -13,7 +13,7 @@ rocThrust is a parallel algorithm library that has been ported to `HIP `_. Use sparse checkout when cloning the rocThrust project: @@ -26,7 +26,7 @@ rocThrust can be built and installed with |install|_ on Linux, |rmake|_ on Windo .. |install| replace:: ``install`` .. _install: ./rocThrust-install-script.html -.. |rmake| replace:: ``rmake.py`` +.. |rmake| replace:: ``rmake.py`` .. _rmake: ./rocThrust-rmake-install.html CMake provides the most flexibility in building and installing rocThrust. diff --git a/projects/rocthrust/docs/install/rocThrust-install-script.rst b/projects/rocthrust/docs/install/rocThrust-install-script.rst index d13f27332023..f3e149480925 100644 --- a/projects/rocthrust/docs/install/rocThrust-install-script.rst +++ b/projects/rocthrust/docs/install/rocThrust-install-script.rst @@ -6,9 +6,9 @@ Building and installing rocThrust on Linux with the install script ******************************************************************** -You can use the ``install`` script to build and install rocThrust on Linux. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. +You can use the ``install`` script to build and install rocThrust on Linux. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. -:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. The ``install`` script will be located in the ``rocthrust`` root directory. +:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. The ``install`` script will be located in the ``rocthrust`` root directory. To build and install rocThrust with the ``install`` script, run: @@ -29,4 +29,3 @@ To see a complete list of options, run: .. code-block:: shell ./install --help - diff --git a/projects/rocthrust/docs/install/rocThrust-install-with-cmake.rst b/projects/rocthrust/docs/install/rocThrust-install-with-cmake.rst index 7800f8e3c01e..eada72dd65a9 100644 --- a/projects/rocthrust/docs/install/rocThrust-install-with-cmake.rst +++ b/projects/rocthrust/docs/install/rocThrust-install-with-cmake.rst @@ -5,12 +5,12 @@ .. _install-with-cmake: ******************************************************************** -Building and installing rocThrust on Windows and Linux with CMake +Building and installing rocThrust on Windows and Linux with CMake ******************************************************************** You can build and install rocThrust with CMake on either Windows or Linux. -Before you begin, set ``CXX`` to ``amdclang++`` or ``hipcc`` depending on the compiler you'll be using, and set ``CMAKE_CXX_COMPILER`` to the compiler's absolute path. For example: +Before you begin, set ``CXX`` to ``amdclang++`` or ``hipcc`` depending on the compiler you'll be using, and set ``CMAKE_CXX_COMPILER`` to the compiler's absolute path. For example: .. code:: shell @@ -24,7 +24,7 @@ After :doc:`cloning the project <./rocThrust-install-overview>`, create the ``bu mkdir build cd build -Generate the rocThrust makefile using the ``cmake`` command: +Generate the rocThrust makefile using the ``cmake`` command: .. code:: shell @@ -35,7 +35,7 @@ The available build options are: * ``BUILD_BENCHMARK``. Set this to ``ON`` to build rocThrust benchmarks. Off by default. * ``BUILD_EXAMPLE``. Set this to ``ON`` to build rocThrust examples. Off by default. * ``BUILD_TEST``. Set to ``ON`` to enable rocThrust tests. Off by default. -* ``BUILD_HIPSTDPAR_TEST``. Set to ``ON`` to enable HIPSTDPAR tests. Off by default. +* ``BUILD_HIPSTDPAR_TEST``. Set to ``ON`` to enable HIPSTDPAR tests. Off by default. * ``DISABLE_WERROR``. Set this to ``OFF`` to pass ``-Werror`` to the compiler. On by default. * ``DOWNLOAD_ROCPRIM``. Set this to ``ON`` to download rocPRIM regardless of whether or not rocPRIM is already installed. Off by default. * ``SQLITE_USE_SYSTEM_PACKAGE``. Set to ``ON`` to use the ``SQLite`` libaray provided by the system. Off by default - a copy of the library will then be downloaded. ``SQLite`` is needed for bitwise-reproducibility tests. For this option to take effect, either ``BUILD_TEST`` or ``BUILD_HIPSTDPAR_TEST`` must be set to ``ON``. @@ -47,7 +47,7 @@ Build rocThrust using the generated make file: .. code:: shell make -j4 - + After you've built rocThrust, you can optionally generate tar, zip, and deb packages: .. code:: shell diff --git a/projects/rocthrust/docs/install/rocThrust-prerequisites.rst b/projects/rocthrust/docs/install/rocThrust-prerequisites.rst index 0fa612acbbc5..9237d0c41fdb 100644 --- a/projects/rocthrust/docs/install/rocThrust-prerequisites.rst +++ b/projects/rocthrust/docs/install/rocThrust-prerequisites.rst @@ -10,7 +10,7 @@ rocThrust has the following prerequisites on all platforms: * ROCm 6.1 or later. * CMake 3.10.2 or later. -* hipcc or amdclag++. See the `ROCm LLVM compiler infrastructure `_ for more information. +* hipcc or amdclag++. See the `ROCm LLVM compiler infrastructure `_ for more information. * `rocPRIM `_. rocPRIM is automatically downloaded and installed when rocThrust is built and installed. rocThrust has the following HIP on Windows prerequisites: diff --git a/projects/rocthrust/docs/install/rocThrust-rmake-install.rst b/projects/rocthrust/docs/install/rocThrust-rmake-install.rst index f6068c467fa5..0217bfe0c61f 100644 --- a/projects/rocthrust/docs/install/rocThrust-rmake-install.rst +++ b/projects/rocthrust/docs/install/rocThrust-rmake-install.rst @@ -6,9 +6,9 @@ Building and installing rocThrust on Windows with rmake.py ******************************************************************** -You can use ``rmake.py`` to build and install rocThrust on Windows. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. +You can use ``rmake.py`` to build and install rocThrust on Windows. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options. -:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. ``rmake.py`` will be located in the ``rocthrust`` root directory. +:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. ``rmake.py`` will be located in the ``rocthrust`` root directory. To build and install rocThrust with ``rmake.py``, run: @@ -29,5 +29,3 @@ To see a complete list of ``rmake.py`` options, run: .. code-block:: shell python rmake.py --help - - \ No newline at end of file diff --git a/projects/rocthrust/docs/reference/rocThrust-hipstdpar.rst b/projects/rocthrust/docs/reference/rocThrust-hipstdpar.rst index 547f6426d5ad..a070dc64c2ca 100644 --- a/projects/rocthrust/docs/reference/rocThrust-hipstdpar.rst +++ b/projects/rocthrust/docs/reference/rocThrust-hipstdpar.rst @@ -16,11 +16,11 @@ To use the HIPSTDPAR headers, compile your code with the ``--hipstdpar`` flag. F Both the AMD fork of LLVM and the upstream LLVM support offloading parallel algorithms. -Tests for validating HIPSTDPAR implementations are enabled when rocThrust is built with ``BUILD_HIPSTDPAR_TEST=ON``. +Tests for validating HIPSTDPAR implementations are enabled when rocThrust is built with ``BUILD_HIPSTDPAR_TEST=ON``. HIPSTDPAR requires rocThrust, `rocPRIM `_, and `TBB `_. -.. note:: +.. note:: If you're using libstdc++ 9 or libstdc++ 10, your application might fail to compile due to incompatibilities between legacy TBB and oneTBB. See the `oneAPI Threading Building Blocks Release Notes `_ for more information. diff --git a/projects/rocthrust/docs/sphinx/_toc.yml.in b/projects/rocthrust/docs/sphinx/_toc.yml.in index 22c702490389..ebdaa71525e8 100644 --- a/projects/rocthrust/docs/sphinx/_toc.yml.in +++ b/projects/rocthrust/docs/sphinx/_toc.yml.in @@ -16,7 +16,7 @@ subtrees: title: Installing on Windows - file: install/rocThrust-install-with-cmake title: Installing on Linux and Windows with CMake - + - caption: How to entries: diff --git a/projects/rocthrust/examples/cpp_integration/README b/projects/rocthrust/examples/cpp_integration/README index c9dc09e4df64..2bf5b3f4bd28 100644 --- a/projects/rocthrust/examples/cpp_integration/README +++ b/projects/rocthrust/examples/cpp_integration/README @@ -1,4 +1,4 @@ -This example shows how to link a Thrust program contained in +This example shows how to link a Thrust program contained in a .cu file with a C++ program contained in a .cpp file. Note that device_vector only appears in the .cu file while host_vector appears in both. This relects the fact that algorithms on device @@ -18,4 +18,3 @@ Alternatively, we can use g++ to perform final linking step. $ nvcc -O2 -c device.cu $ g++ -O2 -c host.cpp -I/usr/local/cuda/include/ $ g++ -o tester device.o host.o -L/usr/local/cuda/lib64 -lcudart - diff --git a/projects/rocthrust/rmake.py b/projects/rocthrust/rmake.py index 828970a77006..b2dec1255109 100644 --- a/projects/rocthrust/rmake.py +++ b/projects/rocthrust/rmake.py @@ -20,7 +20,7 @@ def parse_args(): parser = argparse.ArgumentParser(description=""" Checks build arguments """) - + default_gpus = 'gfx906:xnack-,gfx1030,gfx1100,gfx1101,gfx1102,gfx1151,gfx1200,gfx1201' parser.add_argument('-g', '--debug', required=False, default=False, action='store_true', @@ -39,7 +39,7 @@ def parse_args(): parser.add_argument( '--cmake-darg', required=False, dest='cmake_dargs', action='append', default=[], help='List of additional cmake defines for builds (e.g. CMAKE_CXX_COMPILER_LAUNCHER=ccache)') parser.add_argument('-a', '--architecture', dest='gpu_architecture', required=False, default=default_gpus, #:sramecc+:xnack-" ) #gfx1030" ) #gfx906" ) # gfx1030" ) - help='Set GPU architectures, e.g. all, gfx000, gfx803, gfx906:xnack-;gfx1030 (optional, default: all)') + help='Set GPU architectures, e.g. all, gfx000, gfx803, gfx906:xnack-;gfx1030 (optional, default: all)') parser.add_argument('-v', '--verbose', required=False, default=False, action='store_true', help='Verbose build (default: False)') return parser.parse_args() @@ -75,12 +75,12 @@ def delete_dir(dir_path) : linux_path = pathlib.Path(dir_path).absolute() #print( linux_path ) run_cmd( "rm" , f"-rf {linux_path}") - + def cmake_path(os_path): if OS_info["ID"] == "windows": return os_path.replace("\\", "/") else: - return os.path.realpath(os_path) + return os.path.realpath(os_path) def config_cmd(): global args @@ -100,7 +100,7 @@ def config_cmd(): toolchain = os.path.join( src_path, "toolchain-windows.cmake" ) #set CPACK_PACKAGING_INSTALL_PREFIX= defined as blank as it is appended to end of path for archive creation cmake_platform_opts.append( f"-DWIN32=ON -DCPACK_PACKAGING_INSTALL_PREFIX=""") #" -DCPACK_PACKAGING_INSTALL_PREFIX={rocm_path}" - cmake_platform_opts.append( f"-DCMAKE_INSTALL_PREFIX=\"C:/hipSDK\" -DCPACK_PACKAGE_INSTALL_DIRECTORY=\"rocthrust\"") + cmake_platform_opts.append( f"-DCMAKE_INSTALL_PREFIX=\"C:/hipSDK\" -DCPACK_PACKAGE_INSTALL_DIRECTORY=\"rocthrust\"") generator = f"-G Ninja" # "-G \"Visual Studio 16 2019\" -A x64" # -G NMake ") # cmake_options.append( generator ) @@ -149,7 +149,7 @@ def config_cmd(): # packaging options cmake_pack_options = f"-DCPACK_SET_DESTDIR=OFF -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF" cmake_options.append( cmake_pack_options ) - + if args.static_lib: cmake_options.append( f"-DBUILD_SHARED_LIBS=OFF" ) @@ -160,7 +160,7 @@ def config_cmd(): cmake_options.append( f"-DBUILD_TEST=ON -DBUILD_BENCHMARK=ON -DBUILD_DIR={build_dir}" ) cmake_options.append( f"-DAMDGPU_TARGETS={args.gpu_architecture}" ) - + if args.cmake_dargs: for i in args.cmake_dargs: cmake_options.append( f"-D{i}" ) diff --git a/projects/rocthrust/rtest.py b/projects/rocthrust/rtest.py index 228fe559ba9a..5b8f3ce3835c 100644 --- a/projects/rocthrust/rtest.py +++ b/projects/rocthrust/rtest.py @@ -49,15 +49,15 @@ def parse_args(): """) parser.add_argument('-e', '--emulation', required=False, default="", help='Test set to run from rtest.xml (optional, eg.smoke). At least one but not both of -e or -t must be set') - parser.add_argument('-t', '--test', required=False, default="", + parser.add_argument('-t', '--test', required=False, default="", help='Test set to run from rtest.xml (optional, e.g. osdb). At least one but not both of -e or -t must be set') parser.add_argument('-g', '--debug', required=False, default=False, action='store_true', help='Test Debug build (optional, default: false)') - parser.add_argument('-o', '--output', type=str, required=False, default="xml", + parser.add_argument('-o', '--output', type=str, required=False, default="xml", help='Test output file (optional, default: test_detail.xml)') parser.add_argument('-a', '--argument', action=ArgAction, nargs=2, metavar=('NAME', 'VALUE'), default={}, help='Arguments to substitute into the xml file (optional, multiple)') - parser.add_argument( '--install_dir', type=str, required=False, default="build", + parser.add_argument( '--install_dir', type=str, required=False, default="build", help='Installation directory where build or release folders are (optional, default: build)') parser.add_argument( '--fail_test', default=False, required=False, action='store_true', help='Return as if test failed (optional, default: false)') @@ -140,14 +140,14 @@ def run(self): cmd = ['TASKKILL', '/F', '/T', '/PID', str(self.kill_pid)] proc = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stderr) else: - os.kill(self.kill_pid, signal.SIGKILL) + os.kill(self.kill_pid, signal.SIGKILL) self.timed_out.set() self.stop() pass def stop(self): self.quit.set() - + def stopped(self): return self.timed_out.is_set() @@ -204,7 +204,7 @@ def run_cmd(cmd, test = False, time_limit = 0): try: if not test: proc = subprocess.run(cmdline, check=True, stderr=subprocess.STDOUT, shell=True) - status = proc.returncode + status = proc.returncode else: error = False timeout = False @@ -230,12 +230,12 @@ def run_cmd(cmd, test = False, time_limit = 0): p.join() timeout = p.stopped() print(f"timeout {timeout}") - if error: + if error: status = 1 elif timeout: status = 2 else: - status = test_proc.returncode + status = test_proc.returncode except: import traceback exc = traceback.format_exc() @@ -256,10 +256,10 @@ def batch(script, xml): rtest_cwd_path = os.path.abspath( os.path.join( cwd, 'rtest.xml') ) if os.path.isfile(rtest_cwd_path) and os.path.dirname(rtest_cwd_path).endswith( "staging" ): # if in a staging directory then test locally - test_dir = cwd + test_dir = cwd else: build_type = "debug" if args.debug else "release" - + # deal with windows pathing install_dir = '//'.join(args.install_dir.split('\\')) @@ -393,7 +393,7 @@ def run_tests(): #print("Failure in script. ABORTING") if (os.curdir != cwd): os.chdir( cwd ) - return 1 + return 1 if (os.curdir != cwd): os.chdir( cwd ) return 0 @@ -413,4 +413,4 @@ def main(): sys.exit(status) if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/projects/rocthrust/test/CMakeLists.txt b/projects/rocthrust/test/CMakeLists.txt index 96e5524dcb8f..b486265cadf2 100644 --- a/projects/rocthrust/test/CMakeLists.txt +++ b/projects/rocthrust/test/CMakeLists.txt @@ -122,7 +122,7 @@ function(add_rocthrust_test TEST) add_custom_command( TARGET ${TEST_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${file_i} ${PROJECT_BINARY_DIR}/test ) endforeach( file_i ) endif() - + # Check for per-test script. Script will be included in the current scope # to allow custom property modifications. set(TEST_CMAKE_SCRIPT "${TEST}.cmake") diff --git a/projects/rocthrust/test/hipstdpar/CMakeLists.txt b/projects/rocthrust/test/hipstdpar/CMakeLists.txt index f02bc3edfa9b..87e59a32b4b2 100644 --- a/projects/rocthrust/test/hipstdpar/CMakeLists.txt +++ b/projects/rocthrust/test/hipstdpar/CMakeLists.txt @@ -39,7 +39,7 @@ function(add_hipstdpar_test TEST TEST_TYPE INTERPOSE_ALLOC) TBB::tbb ) endif() - + if (NOT WIN32) foreach(gpu_target ${GPU_TARGETS}) target_link_libraries(${TEST_TARGET} diff --git a/projects/rocthrust/testing/cuda/merge_sort.cu b/projects/rocthrust/testing/cuda/merge_sort.cu index efb91e822854..a1be652e873c 100644 --- a/projects/rocthrust/testing/cuda/merge_sort.cu +++ b/projects/rocthrust/testing/cuda/merge_sort.cu @@ -196,7 +196,7 @@ void TestMergeSortAscendingKeyValue(const size_t n) #if 0 thrust::host_vector h_keys = unittest::random_integers(n); thrust::device_vector d_keys = h_keys; - + thrust::host_vector h_values = unittest::random_integers(n); thrust::device_vector d_values = h_values; @@ -221,7 +221,7 @@ void TestMergeSortDescendingKeyValue(void) thrust::host_vector h_keys = unittest::random_integers(n); thrust::device_vector d_keys = h_keys; - + thrust::host_vector h_values = unittest::random_integers(n); thrust::device_vector d_values = h_values; diff --git a/projects/rocthrust/thrust/detail/allocator/malloc_allocator.inl b/projects/rocthrust/thrust/detail/allocator/malloc_allocator.inl index f5794239395b..cc6237d0fa64 100644 --- a/projects/rocthrust/thrust/detail/allocator/malloc_allocator.inl +++ b/projects/rocthrust/thrust/detail/allocator/malloc_allocator.inl @@ -62,4 +62,3 @@ template } // end detail THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/detail/allocator/tagged_allocator.inl b/projects/rocthrust/thrust/detail/allocator/tagged_allocator.inl index 4ac54e17e966..bb4b8c42fa20 100644 --- a/projects/rocthrust/thrust/detail/allocator/tagged_allocator.inl +++ b/projects/rocthrust/thrust/detail/allocator/tagged_allocator.inl @@ -101,4 +101,3 @@ bool operator!=(const tagged_allocator &, const tagged_allocato } // end detail THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/detail/reduce.inl b/projects/rocthrust/thrust/detail/reduce.inl index ad3047ab366e..125c597e9489 100644 --- a/projects/rocthrust/thrust/detail/reduce.inl +++ b/projects/rocthrust/thrust/detail/reduce.inl @@ -273,4 +273,3 @@ template THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/detail/reverse.inl b/projects/rocthrust/thrust/detail/reverse.inl index 0348628d081c..600fcf700294 100644 --- a/projects/rocthrust/thrust/detail/reverse.inl +++ b/projects/rocthrust/thrust/detail/reverse.inl @@ -84,4 +84,3 @@ template THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/detail/set_operations.inl b/projects/rocthrust/thrust/detail/set_operations.inl index 84a96a3f171f..488b28f5e806 100644 --- a/projects/rocthrust/thrust/detail/set_operations.inl +++ b/projects/rocthrust/thrust/detail/set_operations.inl @@ -862,4 +862,3 @@ template THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/detail/transform.inl b/projects/rocthrust/thrust/detail/transform.inl index 452ece2e886f..ab8cf492f9ad 100644 --- a/projects/rocthrust/thrust/detail/transform.inl +++ b/projects/rocthrust/thrust/detail/transform.inl @@ -244,4 +244,3 @@ template &lhs, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/linear_congruential_engine.inl b/projects/rocthrust/thrust/random/detail/linear_congruential_engine.inl index 52bd3286aaac..9f75bdd43a26 100644 --- a/projects/rocthrust/thrust/random/detail/linear_congruential_engine.inl +++ b/projects/rocthrust/thrust/random/detail/linear_congruential_engine.inl @@ -169,4 +169,3 @@ operator>>(std::basic_istream &is, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/linear_feedback_shift_engine.inl b/projects/rocthrust/thrust/random/detail/linear_feedback_shift_engine.inl index 3bca5ccaa5e2..bc593c6c4cb0 100644 --- a/projects/rocthrust/thrust/random/detail/linear_feedback_shift_engine.inl +++ b/projects/rocthrust/thrust/random/detail/linear_feedback_shift_engine.inl @@ -165,4 +165,3 @@ operator>>(std::basic_istream &is, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/subtract_with_carry_engine.inl b/projects/rocthrust/thrust/random/detail/subtract_with_carry_engine.inl index 9cb3bc8f7753..d37e1c45cfe1 100644 --- a/projects/rocthrust/thrust/random/detail/subtract_with_carry_engine.inl +++ b/projects/rocthrust/thrust/random/detail/subtract_with_carry_engine.inl @@ -210,4 +210,3 @@ template } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/uniform_int_distribution.inl b/projects/rocthrust/thrust/random/detail/uniform_int_distribution.inl index c65febe1086b..fd075f8ab9c9 100644 --- a/projects/rocthrust/thrust/random/detail/uniform_int_distribution.inl +++ b/projects/rocthrust/thrust/random/detail/uniform_int_distribution.inl @@ -246,4 +246,3 @@ operator>>(std::basic_istream &is, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/uniform_real_distribution.inl b/projects/rocthrust/thrust/random/detail/uniform_real_distribution.inl index e2d44100bc13..c2ffbe7aa0a4 100644 --- a/projects/rocthrust/thrust/random/detail/uniform_real_distribution.inl +++ b/projects/rocthrust/thrust/random/detail/uniform_real_distribution.inl @@ -231,4 +231,3 @@ operator>>(std::basic_istream &is, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/random/detail/xor_combine_engine.inl b/projects/rocthrust/thrust/random/detail/xor_combine_engine.inl index 18bb6b09e151..8ec8901708af 100644 --- a/projects/rocthrust/thrust/random/detail/xor_combine_engine.inl +++ b/projects/rocthrust/thrust/random/detail/xor_combine_engine.inl @@ -215,4 +215,3 @@ bool operator!=(const xor_combine_engine &lhs, } // end random THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/cpp/detail/memory.inl b/projects/rocthrust/thrust/system/cpp/detail/memory.inl index 650aa1cb5016..f72463142dfb 100644 --- a/projects/rocthrust/thrust/system/cpp/detail/memory.inl +++ b/projects/rocthrust/thrust/system/cpp/detail/memory.inl @@ -49,4 +49,3 @@ void free(pointer ptr) } // end cpp } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/cuda/detail/error.inl b/projects/rocthrust/thrust/system/cuda/detail/error.inl index 5ff7fc8c127d..2ce2b6565d88 100644 --- a/projects/rocthrust/thrust/system/cuda/detail/error.inl +++ b/projects/rocthrust/thrust/system/cuda/detail/error.inl @@ -95,4 +95,3 @@ const error_category &cuda_category(void) } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/cuda/detail/memory.inl b/projects/rocthrust/thrust/system/cuda/detail/memory.inl index f096febbcf1a..821026bcef57 100644 --- a/projects/rocthrust/thrust/system/cuda/detail/memory.inl +++ b/projects/rocthrust/thrust/system/cuda/detail/memory.inl @@ -49,4 +49,3 @@ void free(pointer ptr) } // end cuda_cub THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/adjacent_difference.inl b/projects/rocthrust/thrust/system/detail/generic/adjacent_difference.inl index e5385eafa4b0..683ad64999e5 100644 --- a/projects/rocthrust/thrust/system/detail/generic/adjacent_difference.inl +++ b/projects/rocthrust/thrust/system/detail/generic/adjacent_difference.inl @@ -79,4 +79,3 @@ OutputIterator adjacent_difference(thrust::execution_policy &exec } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/advance.inl b/projects/rocthrust/thrust/system/detail/generic/advance.inl index b639fdfdf75d..417ea43627a0 100644 --- a/projects/rocthrust/thrust/system/detail/generic/advance.inl +++ b/projects/rocthrust/thrust/system/detail/generic/advance.inl @@ -65,4 +65,3 @@ void advance(InputIterator& i, Distance n) } // end namespace generic } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/distance.inl b/projects/rocthrust/thrust/system/detail/generic/distance.inl index 3558c1667688..a917e7ec43a9 100644 --- a/projects/rocthrust/thrust/system/detail/generic/distance.inl +++ b/projects/rocthrust/thrust/system/detail/generic/distance.inl @@ -77,4 +77,3 @@ inline THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/inner_product.inl b/projects/rocthrust/thrust/system/detail/generic/inner_product.inl index a71666461498..653aa7a26e04 100644 --- a/projects/rocthrust/thrust/system/detail/generic/inner_product.inl +++ b/projects/rocthrust/thrust/system/detail/generic/inner_product.inl @@ -67,4 +67,3 @@ OutputType inner_product(thrust::execution_policy &exec, } // end detail } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/memory.inl b/projects/rocthrust/thrust/system/detail/generic/memory.inl index 3933fdc066a9..eedfd664ee8a 100644 --- a/projects/rocthrust/thrust/system/detail/generic/memory.inl +++ b/projects/rocthrust/thrust/system/detail/generic/memory.inl @@ -101,4 +101,3 @@ void iter_swap(thrust::execution_policy &, Pointer1, Pointer2) } // end detail } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/merge.inl b/projects/rocthrust/thrust/system/detail/generic/merge.inl index 9a7760763d73..df573309c3ff 100644 --- a/projects/rocthrust/thrust/system/detail/generic/merge.inl +++ b/projects/rocthrust/thrust/system/detail/generic/merge.inl @@ -127,4 +127,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/partition.inl b/projects/rocthrust/thrust/system/detail/generic/partition.inl index 01b21ee7dfec..1a8b2d3eedbd 100644 --- a/projects/rocthrust/thrust/system/detail/generic/partition.inl +++ b/projects/rocthrust/thrust/system/detail/generic/partition.inl @@ -246,4 +246,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/reduce.inl b/projects/rocthrust/thrust/system/detail/generic/reduce.inl index 7e58dc427644..dafdba0508fb 100644 --- a/projects/rocthrust/thrust/system/detail/generic/reduce.inl +++ b/projects/rocthrust/thrust/system/detail/generic/reduce.inl @@ -77,4 +77,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/remove.inl b/projects/rocthrust/thrust/system/detail/generic/remove.inl index 71eb3f86df1b..41744caefcd9 100644 --- a/projects/rocthrust/thrust/system/detail/generic/remove.inl +++ b/projects/rocthrust/thrust/system/detail/generic/remove.inl @@ -143,4 +143,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/reverse.inl b/projects/rocthrust/thrust/system/detail/generic/reverse.inl index eeaf5d15aedf..0f01ab0a37eb 100644 --- a/projects/rocthrust/thrust/system/detail/generic/reverse.inl +++ b/projects/rocthrust/thrust/system/detail/generic/reverse.inl @@ -72,5 +72,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - - diff --git a/projects/rocthrust/thrust/system/detail/generic/set_operations.inl b/projects/rocthrust/thrust/system/detail/generic/set_operations.inl index e8db54f4732b..86e38af93eb6 100644 --- a/projects/rocthrust/thrust/system/detail/generic/set_operations.inl +++ b/projects/rocthrust/thrust/system/detail/generic/set_operations.inl @@ -473,4 +473,3 @@ OutputIterator set_union(thrust::execution_policy &, } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/sort.inl b/projects/rocthrust/thrust/system/detail/generic/sort.inl index 79481d6d20f9..6e8ca2cbf905 100644 --- a/projects/rocthrust/thrust/system/detail/generic/sort.inl +++ b/projects/rocthrust/thrust/system/detail/generic/sort.inl @@ -216,4 +216,3 @@ THRUST_HOST_DEVICE } // end detail } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/tabulate.inl b/projects/rocthrust/thrust/system/detail/generic/tabulate.inl index 8663b283b803..f4692aea3def 100644 --- a/projects/rocthrust/thrust/system/detail/generic/tabulate.inl +++ b/projects/rocthrust/thrust/system/detail/generic/tabulate.inl @@ -57,5 +57,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - - diff --git a/projects/rocthrust/thrust/system/detail/generic/transform.inl b/projects/rocthrust/thrust/system/detail/generic/transform.inl index 69729751c288..91415abcb894 100644 --- a/projects/rocthrust/thrust/system/detail/generic/transform.inl +++ b/projects/rocthrust/thrust/system/detail/generic/transform.inl @@ -188,4 +188,3 @@ THRUST_HOST_DEVICE } // end detail } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/transform_reduce.inl b/projects/rocthrust/thrust/system/detail/generic/transform_reduce.inl index 7eb60e00b898..8f2858022a54 100644 --- a/projects/rocthrust/thrust/system/detail/generic/transform_reduce.inl +++ b/projects/rocthrust/thrust/system/detail/generic/transform_reduce.inl @@ -54,4 +54,3 @@ THRUST_HOST_DEVICE } // end detail } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/unique.inl b/projects/rocthrust/thrust/system/detail/generic/unique.inl index 82be40f0458c..86dbd828ecce 100644 --- a/projects/rocthrust/thrust/system/detail/generic/unique.inl +++ b/projects/rocthrust/thrust/system/detail/generic/unique.inl @@ -112,9 +112,9 @@ THRUST_HOST_DEVICE BinaryPredicate binary_pred) { thrust::detail::head_flags stencil(first, last, binary_pred); - + using namespace thrust::placeholders; - + return thrust::count_if(exec, stencil.begin(), stencil.end(), _1); } // end unique_copy() @@ -136,4 +136,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/generic/unique_by_key.inl b/projects/rocthrust/thrust/system/detail/generic/unique_by_key.inl index fc00d92b4e39..a54212288930 100644 --- a/projects/rocthrust/thrust/system/detail/generic/unique_by_key.inl +++ b/projects/rocthrust/thrust/system/detail/generic/unique_by_key.inl @@ -136,4 +136,3 @@ unique_by_key_copy(thrust::execution_policy &exec, } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/sequential/copy.inl b/projects/rocthrust/thrust/system/detail/sequential/copy.inl index 95a1181bb26e..cd3527694555 100644 --- a/projects/rocthrust/thrust/system/detail/sequential/copy.inl +++ b/projects/rocthrust/thrust/system/detail/sequential/copy.inl @@ -143,4 +143,3 @@ THRUST_HOST_DEVICE } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/sequential/merge.inl b/projects/rocthrust/thrust/system/detail/sequential/merge.inl index 5b79bbdc5afe..496a144ea3f2 100644 --- a/projects/rocthrust/thrust/system/detail/sequential/merge.inl +++ b/projects/rocthrust/thrust/system/detail/sequential/merge.inl @@ -151,4 +151,3 @@ thrust::pair } // end namespace detail } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/detail/system_error.inl b/projects/rocthrust/thrust/system/detail/system_error.inl index 075fe88e4639..8660f4f2e6f9 100644 --- a/projects/rocthrust/thrust/system/detail/system_error.inl +++ b/projects/rocthrust/thrust/system/detail/system_error.inl @@ -109,4 +109,3 @@ const char *system_error } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/copy.inl b/projects/rocthrust/thrust/system/omp/detail/copy.inl index c957fc29ef82..2de1361ce1ad 100644 --- a/projects/rocthrust/thrust/system/omp/detail/copy.inl +++ b/projects/rocthrust/thrust/system/omp/detail/copy.inl @@ -133,4 +133,3 @@ OutputIterator copy_n(execution_policy &exec, } // end namespace omp } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/copy_if.inl b/projects/rocthrust/thrust/system/omp/detail/copy_if.inl index 8e597d4fcc5d..a677ee8dcef6 100644 --- a/projects/rocthrust/thrust/system/omp/detail/copy_if.inl +++ b/projects/rocthrust/thrust/system/omp/detail/copy_if.inl @@ -50,4 +50,3 @@ template default_decom } // end namespace omp } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/for_each.inl b/projects/rocthrust/thrust/system/omp/detail/for_each.inl index c06579499729..f3eb5f77013c 100644 --- a/projects/rocthrust/thrust/system/omp/detail/for_each.inl +++ b/projects/rocthrust/thrust/system/omp/detail/for_each.inl @@ -89,4 +89,3 @@ template ptr) } // end omp } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/partition.inl b/projects/rocthrust/thrust/system/omp/detail/partition.inl index ba0a09eafb06..873a1ca7783f 100644 --- a/projects/rocthrust/thrust/system/omp/detail/partition.inl +++ b/projects/rocthrust/thrust/system/omp/detail/partition.inl @@ -104,4 +104,3 @@ template &, } // end namespace omp } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/remove.inl b/projects/rocthrust/thrust/system/omp/detail/remove.inl index 5330f140725c..4c301290f228 100644 --- a/projects/rocthrust/thrust/system/omp/detail/remove.inl +++ b/projects/rocthrust/thrust/system/omp/detail/remove.inl @@ -90,4 +90,3 @@ template &exec, } // end namespace omp } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/omp/detail/unique.inl b/projects/rocthrust/thrust/system/omp/detail/unique.inl index 9a93fb135840..bf871fe3a549 100644 --- a/projects/rocthrust/thrust/system/omp/detail/unique.inl +++ b/projects/rocthrust/thrust/system/omp/detail/unique.inl @@ -73,7 +73,6 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred) @@ -54,7 +54,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -70,4 +70,3 @@ template &exec, } // end namespace tbb } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/tbb/detail/copy_if.inl b/projects/rocthrust/thrust/system/tbb/detail/copy_if.inl index 7585f45f7273..b9efb39d522e 100644 --- a/projects/rocthrust/thrust/system/tbb/detail/copy_if.inl +++ b/projects/rocthrust/thrust/system/tbb/detail/copy_if.inl @@ -66,13 +66,13 @@ struct body ++sum; } } - + void operator()(const ::tbb::blocked_range& r, ::tbb::final_scan_tag) { InputIterator1 iter1 = first + r.begin(); InputIterator2 iter2 = stencil + r.begin(); OutputIterator iter3 = result + sum; - + for (Size i = r.begin(); i != r.end(); ++i, ++iter1, ++iter2) { if (pred(*iter2)) @@ -87,12 +87,12 @@ struct body void reverse_join(body& b) { sum = b.sum + sum; - } + } void assign(body& b) { sum = b.sum; - } + } }; // end body } // end copy_if_detail @@ -127,4 +127,3 @@ template ptr) } // end tbb } // end system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/tbb/detail/merge.inl b/projects/rocthrust/thrust/system/tbb/detail/merge.inl index 6edb83dee044..b58d8e040bb6 100644 --- a/projects/rocthrust/thrust/system/tbb/detail/merge.inl +++ b/projects/rocthrust/thrust/system/tbb/detail/merge.inl @@ -293,4 +293,3 @@ thrust::pair } // end namespace tbb } // end namespace system THRUST_NAMESPACE_END - diff --git a/projects/rocthrust/thrust/system/tbb/detail/partition.inl b/projects/rocthrust/thrust/system/tbb/detail/partition.inl index 74ad809da4e3..193d2e6ffcb9 100644 --- a/projects/rocthrust/thrust/system/tbb/detail/partition.inl +++ b/projects/rocthrust/thrust/system/tbb/detail/partition.inl @@ -98,4 +98,3 @@ template reduce_by_key( } // namespace detail } // namespace tbb } // namespace system -THRUST_NAMESPACE_END \ No newline at end of file +THRUST_NAMESPACE_END diff --git a/projects/rocthrust/thrust/system/tbb/detail/remove.inl b/projects/rocthrust/thrust/system/tbb/detail/remove.inl index 76d77e64ba56..b98a0fc64593 100644 --- a/projects/rocthrust/thrust/system/tbb/detail/remove.inl +++ b/projects/rocthrust/thrust/system/tbb/detail/remove.inl @@ -90,4 +90,3 @@ template thrust::pair unique_by_key(execution_policy &exec, - ForwardIterator1 keys_first, + ForwardIterator1 keys_first, ForwardIterator1 keys_last, ForwardIterator2 values_first, BinaryPredicate binary_pred) @@ -54,7 +54,7 @@ template thrust::pair unique_by_key_copy(execution_policy &exec, - InputIterator1 keys_first, + InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, @@ -70,4 +70,3 @@ template