@@ -33,7 +33,7 @@ namespace o2cp = o2::constants::physics;
3333namespace pid_constants // GPUs currently cannot have static constexpr array members
3434{
3535typedef uint8_t ID ;
36- static constexpr ID NIDsTot = 19 ;
36+ static GPUglobalconstexpr () ID NIDsTot = 19;
3737
3838#if !defined(GPUCA_GPUCODE_DEVICE) || defined(GPUCA_GPU_DEBUG_PRINT)
3939GPUconstexpr () const char* sNames[NIDsTot + 1] = // /< defined particle names
@@ -91,34 +91,34 @@ class PID
9191 // particle identifiers, continuos starting from 0
9292 typedef pid_constants::ID ID ;
9393
94- static constexpr ID Electron = 0 ;
95- static constexpr ID Muon = 1 ;
96- static constexpr ID Pion = 2 ;
97- static constexpr ID Kaon = 3 ;
98- static constexpr ID Proton = 4 ;
99- static constexpr ID Deuteron = 5 ;
100- static constexpr ID Triton = 6 ;
101- static constexpr ID Helium3 = 7 ;
102- static constexpr ID Alpha = 8 ;
94+ static GPUglobalconstexpr () ID Electron = 0;
95+ static GPUglobalconstexpr () ID Muon = 1;
96+ static GPUglobalconstexpr () ID Pion = 2;
97+ static GPUglobalconstexpr () ID Kaon = 3;
98+ static GPUglobalconstexpr () ID Proton = 4;
99+ static GPUglobalconstexpr () ID Deuteron = 5;
100+ static GPUglobalconstexpr () ID Triton = 6;
101+ static GPUglobalconstexpr () ID Helium3 = 7;
102+ static GPUglobalconstexpr () ID Alpha = 8;
103103
104- static constexpr ID First = Electron;
105- static constexpr ID Last = Alpha; // /< if extra IDs added, update this !!!
106- static constexpr ID NIDs = Last + 1 ; // /< number of defined IDs
104+ static GPUglobalconstexpr () ID First = Electron;
105+ static GPUglobalconstexpr () ID Last = Alpha; // /< if extra IDs added, update this !!!
106+ static GPUglobalconstexpr () ID NIDs = Last + 1; // /< number of defined IDs
107107
108108 // PID for derived particles
109- static constexpr ID PI0 = 9 ;
110- static constexpr ID Photon = 10 ;
111- static constexpr ID K0 = 11 ;
112- static constexpr ID Lambda = 12 ;
113- static constexpr ID HyperTriton = 13 ;
114- static constexpr ID Hyperhydrog4 = 14 ;
115- static constexpr ID XiMinus = 15 ;
116- static constexpr ID OmegaMinus = 16 ;
117- static constexpr ID HyperHelium4 = 17 ;
118- static constexpr ID HyperHelium5 = 18 ;
119- static constexpr ID FirstExt = PI0 ;
120- static constexpr ID LastExt = HyperHelium5;
121- static constexpr ID NIDsTot = pid_constants::NIDsTot; // /< total number of defined IDs
109+ static GPUglobalconstexpr () ID PI0 = 9;
110+ static GPUglobalconstexpr () ID Photon = 10;
111+ static GPUglobalconstexpr () ID K0 = 11;
112+ static GPUglobalconstexpr () ID Lambda = 12;
113+ static GPUglobalconstexpr () ID HyperTriton = 13;
114+ static GPUglobalconstexpr () ID Hyperhydrog4 = 14;
115+ static GPUglobalconstexpr () ID XiMinus = 15;
116+ static GPUglobalconstexpr () ID OmegaMinus = 16;
117+ static GPUglobalconstexpr () ID HyperHelium4 = 17;
118+ static GPUglobalconstexpr () ID HyperHelium5 = 18;
119+ static GPUglobalconstexpr () ID FirstExt = PI0;
120+ static GPUglobalconstexpr () ID LastExt = HyperHelium5;
121+ static GPUglobalconstexpr () ID NIDsTot = pid_constants::NIDsTot; // /< total number of defined IDs
122122 static_assert (NIDsTot == LastExt + 1 , " Incorrect NIDsTot, please update!" );
123123
124124 GPUdDefault () PID () = default ;
@@ -159,7 +159,8 @@ class PID
159159
160160 GPUdi () static constexpr ID nameToID(char const * name, ID id)
161161 {
162- return id > LastExt ? id : sameStr (name, pid_constants::sNames [id]) ? id : nameToID (name, id + 1 );
162+ return id > LastExt ? id : sameStr (name, pid_constants::sNames [id]) ? id
163+ : nameToID (name, id + 1 );
163164 }
164165#endif
165166
0 commit comments