File tree Expand file tree Collapse file tree
DataFormats/Detectors/TPC/include/DataFormatsTPC Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#ifndef AliceO2_TPC_Constants_H
1818#define AliceO2_TPC_Constants_H
1919
20+ #include " GPUCommonDef.h"
21+
2022namespace o2
2123{
2224namespace tpc
@@ -25,17 +27,17 @@ namespace constants
2527{
2628
2729// the number of sectors
28- constexpr int MAXSECTOR = 36 ;
30+ GPUglobalconstexpr () int MAXSECTOR = 36 ;
2931
3032// the number of global pad rows
3133#if defined(GPUCA_STANDALONE) && defined(GPUCA_RUN2)
32- constexpr int MAXGLOBALPADROW = 159 ; // Number of pad rows in Run 2, used for GPU TPC tests with Run 2 data
34+ GPUglobalconstexpr () int MAXGLOBALPADROW = 159; // Number of pad rows in Run 2, used for GPU TPC tests with Run 2 data
3335#else
34- constexpr int MAXGLOBALPADROW = 152 ; // Correct number of pad rows in Run 3
36+ GPUglobalconstexpr () int MAXGLOBALPADROW = 152; // Correct number of pad rows in Run 3
3537#endif
3638
3739// number of LHC bunch crossings per TPC time bin (40 MHz / 5 MHz)
38- constexpr int LHCBCPERTIMEBIN = 8 ;
40+ GPUglobalconstexpr () int LHCBCPERTIMEBIN = 8 ;
3941} // namespace constants
4042} // namespace tpc
4143} // namespace o2
Original file line number Diff line number Diff line change 4848 #define GPUglobal () // global memory variable declaration (only used for kernel input pointers)
4949 #define GPUconstant () // constant memory variable declaraion
5050 #define GPUconstexpr () static constexpr // constexpr on GPU that needs to be instantiated for dynamic access (e.g. arrays), becomes __constant on GPU
51+ #define GPUglobalconstexpr () constexpr // constexpr variable at program scope, needs the constant address space in MSL
5152 #define GPUprivate () // private memory variable declaration
5253 #define GPUgeneric () // reference / ptr to generic address space
5354 #define GPUbarrier () // synchronize all GPU threads in block
160161 #define GPUglobal () device
161162 #define GPUconstant () constant // TODO: possibly add const __restrict where possible later!
162163 #define GPUconstexpr () constant
164+ #define GPUglobalconstexpr () constant constexpr
163165 #define GPUprivate () thread
164166 #define GPUgeneric ()
165167 #define GPUglobalref () device
255257#ifndef GPUconstexprref
256258#define GPUconstexprref ()
257259#endif
260+ #ifndef GPUglobalconstexpr
261+ #define GPUglobalconstexpr () constexpr
262+ #endif
258263
259264#define GPUrestrict () __restrict__
260265
You can’t perform that action at this time.
0 commit comments