Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Stewart Martin-Haugh stewart.martin-haugh@stfc.ac.uk committed Nov 4, 2024
1 parent 2fb81d2 commit fb1cfaa
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 27 deletions.
48 changes: 24 additions & 24 deletions device/alpaka/include/traccc/alpaka/utils/vecmem_type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion examples/run/alpaka/seeding_example_alpaka.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
3 changes: 2 additions & 1 deletion examples/run/alpaka/seq_example_alpaka.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion tests/alpaka/test_cca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fb1cfaa

Please sign in to comment.