From fb1cfaa75fc67d5a49834f40f71c520111669f3b Mon Sep 17 00:00:00 2001 From: "Stewart Martin-Haugh stewart.martin-haugh@stfc.ac.uk" Date: Mon, 4 Nov 2024 17:28:52 +0000 Subject: [PATCH] Fix formatting --- .../alpaka/utils/vecmem_type_traits.hpp | 48 +++++++++---------- .../run/alpaka/seeding_example_alpaka.cpp | 3 +- examples/run/alpaka/seq_example_alpaka.cpp | 3 +- tests/alpaka/test_cca.cpp | 3 +- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/device/alpaka/include/traccc/alpaka/utils/vecmem_type_traits.hpp b/device/alpaka/include/traccc/alpaka/utils/vecmem_type_traits.hpp index 344eaa7d0..06f2c848c 100644 --- a/device/alpaka/include/traccc/alpaka/utils/vecmem_type_traits.hpp +++ b/device/alpaka/include/traccc/alpaka/utils/vecmem_type_traits.hpp @@ -35,32 +35,32 @@ namespace traccc::alpaka::vecmem { #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) - struct host_device_traits { - using device_memory_resource = ::vecmem::cuda::device_memory_resource; - using host_memory_resource = ::vecmem::cuda::host_memory_resource ; - using managed_memory_resource = ::vecmem::cuda::managed_memory_resource; - using device_copy = ::vecmem::cuda::copy; - }; // struct host_device_traits +struct host_device_traits { + using device_memory_resource = ::vecmem::cuda::device_memory_resource; + using host_memory_resource = ::vecmem::cuda::host_memory_resource; + using managed_memory_resource = ::vecmem::cuda::managed_memory_resource; + using device_copy = ::vecmem::cuda::copy; +}; // struct host_device_traits #elif defined(ALPAKA_ACC_GPU_HIP_ENABLED) - struct host_device_traits { - using device_memory_resource = ::vecmem::hip::device_memory_resource; - using host_memory_resource = ::vecmem::hip::host_memory_resource ; - using managed_memory_resource = ::vecmem::hip::managed_memory_resource; - using device_copy = ::vecmem::hip::copy; - }; // struct host_device_traits +struct host_device_traits { + using device_memory_resource = ::vecmem::hip::device_memory_resource; + using host_memory_resource = ::vecmem::hip::host_memory_resource; + using managed_memory_resource = ::vecmem::hip::managed_memory_resource; + using device_copy = ::vecmem::hip::copy; +}; // struct host_device_traits #elif defined(ALPAKA_ACC_SYCL_ENABLED) - struct host_device_traits { - using device_memory_resource = ::vecmem::sycl::device_memory_resource; - using host_memory_resource = ::vecmem::sycl::host_memory_resource ; - using managed_memory_resource = ::vecmem::sycl::managed_memory_resource; - using device_copy = ::vecmem::sycl::copy; - }; // struct host_device_traits +struct host_device_traits { + using device_memory_resource = ::vecmem::sycl::device_memory_resource; + using host_memory_resource = ::vecmem::sycl::host_memory_resource; + using managed_memory_resource = ::vecmem::sycl::managed_memory_resource; + using device_copy = ::vecmem::sycl::copy; +}; // struct host_device_traits #else // host-only - struct host_device_traits { - using device_memory_resource = ::vecmem::host_memory_resource; - using host_memory_resource = ::vecmem::host_memory_resource ; - using managed_memory_resource = ::vecmem::managed_memory_resource; - using device_copy = ::vecmem::copy; - }; // struct host_device_traits +struct host_device_traits { + using device_memory_resource = ::vecmem::host_memory_resource; + using host_memory_resource = ::vecmem::host_memory_resource; + using managed_memory_resource = ::vecmem::managed_memory_resource; + using device_copy = ::vecmem::copy; +}; // struct host_device_traits #endif } // namespace traccc::alpaka::vecmem diff --git a/examples/run/alpaka/seeding_example_alpaka.cpp b/examples/run/alpaka/seeding_example_alpaka.cpp index b27465645..e7271d3a9 100644 --- a/examples/run/alpaka/seeding_example_alpaka.cpp +++ b/examples/run/alpaka/seeding_example_alpaka.cpp @@ -60,7 +60,8 @@ int seq_run(const traccc::opts::track_seeding& seeding_opts, traccc::alpaka::vecmem::host_device_traits::device_copy copy; traccc::alpaka::vecmem::host_device_traits::host_memory_resource host_mr; - traccc::alpaka::vecmem::host_device_traits::device_memory_resource device_mr; + traccc::alpaka::vecmem::host_device_traits::device_memory_resource + device_mr; traccc::alpaka::vecmem::host_device_traits::managed_memory_resource mng_mr; traccc::memory_resource mr{device_mr, &host_mr}; diff --git a/examples/run/alpaka/seq_example_alpaka.cpp b/examples/run/alpaka/seq_example_alpaka.cpp index 1cce4ac1c..ae1879393 100644 --- a/examples/run/alpaka/seq_example_alpaka.cpp +++ b/examples/run/alpaka/seq_example_alpaka.cpp @@ -62,7 +62,8 @@ int seq_run(const traccc::opts::detector& detector_opts, // Memory resources used by the application. traccc::alpaka::vecmem::host_device_traits::host_memory_resource host_mr; traccc::alpaka::vecmem::host_device_traits::device_copy copy; - traccc::alpaka::vecmem::host_device_traits::device_memory_resource device_mr; + traccc::alpaka::vecmem::host_device_traits::device_memory_resource + device_mr; traccc::memory_resource mr{device_mr, &host_mr}; // Construct the detector description object. diff --git a/tests/alpaka/test_cca.cpp b/tests/alpaka/test_cca.cpp index 5e0f7192a..8a55f2310 100644 --- a/tests/alpaka/test_cca.cpp +++ b/tests/alpaka/test_cca.cpp @@ -26,7 +26,8 @@ cca_function_t get_f_with(traccc::clustering_config cfg) { vecmem::host_memory_resource host_mr; traccc::alpaka::vecmem::host_device_traits::device_copy copy; - traccc::alpaka::vecmem::host_device_traits::device_memory_resource device_mr; + traccc::alpaka::vecmem::host_device_traits::device_memory_resource + device_mr; traccc::alpaka::clusterization_algorithm cc({device_mr}, copy, cfg);