File indexing completed on 2026-07-26 08:22:11
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012 #include "traccc/device/concepts/thread_id.hpp"
0013
0014 namespace traccc::cuda::details {
0015
0016
0017 struct thread_id1 {
0018 __device__ thread_id1() {}
0019
0020 inline unsigned int __device__ getLocalThreadId() const {
0021 return threadIdx.x;
0022 }
0023
0024 inline unsigned int __device__ getLocalThreadIdX() const {
0025 return threadIdx.x;
0026 }
0027
0028 inline unsigned int __device__ getGlobalThreadId() const {
0029 return threadIdx.x + blockIdx.x * blockDim.x;
0030 }
0031
0032 inline unsigned int __device__ getGlobalThreadIdX() const {
0033 return threadIdx.x + blockIdx.x * blockDim.x;
0034 }
0035
0036 inline unsigned int __device__ getBlockIdX() const { return blockIdx.x; }
0037
0038 inline unsigned int __device__ getBlockDimX() const { return blockDim.x; }
0039
0040 inline unsigned int __device__ getGridDimX() const { return gridDim.x; }
0041
0042 };
0043
0044
0045
0046 static_assert(traccc::device::concepts::thread_id1<thread_id1>);
0047
0048 }