Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:12

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2025 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Project include(s).
0011 #include "traccc/device/global_index.hpp"
0012 
0013 // SYCL include(s).
0014 #include <sycl/sycl.hpp>
0015 
0016 namespace traccc::sycl::details {
0017 
0018 /// Function creating a global index in a 1D SYCL kernel
0019 inline device::global_index_t global_index(const ::sycl::nd_item<1>& item) {
0020   return static_cast<device::global_index_t>(item.get_global_linear_id());
0021 }
0022 
0023 /// Function creating a global index in a 2D SYCL kernel
0024 inline device::global_index_t global_index(const ::sycl::nd_item<2>& item) {
0025   return static_cast<device::global_index_t>(item.get_global_linear_id());
0026 }
0027 
0028 /// Function creating a global index in a 3D SYCL kernel
0029 inline device::global_index_t global_index(const ::sycl::nd_item<3>& item) {
0030   return static_cast<device::global_index_t>(item.get_global_linear_id());
0031 }
0032 
0033 }  // namespace traccc::sycl::details