|
21 | 21 | // Please add complex data types required on the host but not GPU to GPUHostDataTypes.h and forward-declare! |
22 | 22 | #ifndef GPUCA_GPUCODE_DEVICE |
23 | 23 | #include <cstddef> |
24 | | -#ifdef GPUCA_NOCOMPAT_ALLOPENCL |
25 | | -#include <type_traits> |
26 | | -#endif |
27 | 24 | #endif |
| 25 | +#include "GPUCommonTypeTraits.h" |
28 | 26 | #ifdef GPUCA_NOCOMPAT |
29 | 27 | #include "GPUTRDDef.h" |
30 | 28 |
|
@@ -114,16 +112,10 @@ namespace GPUCA_NAMESPACE |
114 | 112 | { |
115 | 113 | namespace gpu |
116 | 114 | { |
117 | | -#ifdef GPUCA_NOCOMPAT_ALLOPENCL |
118 | 115 | #include "utils/bitfield.h" |
119 | 116 | #define ENUM_CLASS class |
120 | 117 | #define ENUM_UINT : uint32_t |
121 | 118 | #define GPUCA_RECO_STEP GPUDataTypes::RecoStep |
122 | | -#else |
123 | | -#define ENUM_CLASS |
124 | | -#define ENUM_UINT |
125 | | -#define GPUCA_RECO_STEP GPUDataTypes |
126 | | -#endif |
127 | 119 |
|
128 | 120 | class GPUTPCTrack; |
129 | 121 | class GPUTPCHitId; |
@@ -172,30 +164,27 @@ class GPUDataTypes |
172 | 164 | TPCRaw = 64, |
173 | 165 | ITSClusters = 128, |
174 | 166 | ITSTracks = 256 }; |
175 | | - |
176 | | -#ifdef GPUCA_NOCOMPAT_ALLOPENCL |
| 167 | +#ifndef __OPENCL__ |
177 | 168 | static constexpr const char* const DEVICE_TYPE_NAMES[] = {"INVALID", "CPU", "CUDA", "HIP", "OCL"}; |
178 | 169 | static constexpr const char* const RECO_STEP_NAMES[] = {"TPC Transformation", "TPC Sector Tracking", "TPC Track Merging and Fit", "TPC Compression", "TRD Tracking", "ITS Tracking", "TPC dEdx Computation", "TPC Cluster Finding", "TPC Decompression", "Global Refit"}; |
179 | 170 | static constexpr const char* const GENERAL_STEP_NAMES[] = {"Prepare", "QA"}; |
180 | | - typedef bitfield<RecoStep, uint32_t> RecoStepField; |
181 | | - typedef bitfield<InOutType, uint32_t> InOutTypeField; |
182 | 171 | constexpr static int32_t N_RECO_STEPS = sizeof(GPUDataTypes::RECO_STEP_NAMES) / sizeof(GPUDataTypes::RECO_STEP_NAMES[0]); |
183 | 172 | constexpr static int32_t N_GENERAL_STEPS = sizeof(GPUDataTypes::GENERAL_STEP_NAMES) / sizeof(GPUDataTypes::GENERAL_STEP_NAMES[0]); |
184 | 173 | #endif |
| 174 | + typedef bitfield<RecoStep, uint32_t> RecoStepField; |
| 175 | + typedef bitfield<InOutType, uint32_t> InOutTypeField; |
185 | 176 | #ifdef GPUCA_NOCOMPAT |
186 | 177 | static constexpr uint32_t NSLICES = 36; |
187 | 178 | #endif |
188 | 179 | static DeviceType GetDeviceType(const char* type); |
189 | 180 | }; |
190 | 181 |
|
191 | | -#ifdef GPUCA_NOCOMPAT_ALLOPENCL |
192 | 182 | struct GPURecoStepConfiguration { |
193 | 183 | GPUDataTypes::RecoStepField steps = 0; |
194 | 184 | GPUDataTypes::RecoStepField stepsGPUMask = GPUDataTypes::RecoStep::AllRecoSteps; |
195 | 185 | GPUDataTypes::InOutTypeField inputs = 0; |
196 | 186 | GPUDataTypes::InOutTypeField outputs = 0; |
197 | 187 | }; |
198 | | -#endif |
199 | 188 |
|
200 | 189 | #ifdef GPUCA_NOCOMPAT |
201 | 190 |
|
|
0 commit comments