Skip to content

Commit 1265804

Browse files
committed
GPU: Remove OpenCL base protections no longer needed
1 parent c758e98 commit 1265804

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

GPU/Common/GPUCommonDef.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232

3333
#if (!(defined(__CINT__) || defined(__ROOTCINT__)) || defined(__CLING__)) && defined(__cplusplus) && __cplusplus >= 201103L
3434
#define GPUCA_NOCOMPAT // C++11 + No old ROOT5 + No old OpenCL
35-
#ifndef __OPENCL__
36-
#define GPUCA_NOCOMPAT_ALLOPENCL // + No OpenCL at all
37-
#endif
3835
#ifndef __CINT__
3936
#define GPUCA_NOCOMPAT_ALLCINT // + No ROOT CINT at all
4037
#endif

GPU/GPUTracking/Base/GPUMemoryResource.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ namespace GPUCA_NAMESPACE
2323
namespace gpu
2424
{
2525

26-
#ifdef GPUCA_NOCOMPAT_ALLOPENCL
2726
struct GPUMemoryReuse {
2827
enum Type : int32_t {
2928
NONE = 0,
@@ -50,7 +49,6 @@ struct GPUMemoryReuse {
5049
Type type = NONE;
5150
ID id = 0;
5251
};
53-
#endif
5452

5553
class GPUMemoryResource
5654
{

GPU/GPUTracking/DataTypes/GPUDataTypes.h

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
// Please add complex data types required on the host but not GPU to GPUHostDataTypes.h and forward-declare!
2222
#ifndef GPUCA_GPUCODE_DEVICE
2323
#include <cstddef>
24-
#ifdef GPUCA_NOCOMPAT_ALLOPENCL
25-
#include <type_traits>
26-
#endif
2724
#endif
25+
#include "GPUCommonTypeTraits.h"
2826
#ifdef GPUCA_NOCOMPAT
2927
#include "GPUTRDDef.h"
3028

@@ -114,16 +112,10 @@ namespace GPUCA_NAMESPACE
114112
{
115113
namespace gpu
116114
{
117-
#ifdef GPUCA_NOCOMPAT_ALLOPENCL
118115
#include "utils/bitfield.h"
119116
#define ENUM_CLASS class
120117
#define ENUM_UINT : uint32_t
121118
#define GPUCA_RECO_STEP GPUDataTypes::RecoStep
122-
#else
123-
#define ENUM_CLASS
124-
#define ENUM_UINT
125-
#define GPUCA_RECO_STEP GPUDataTypes
126-
#endif
127119

128120
class GPUTPCTrack;
129121
class GPUTPCHitId;
@@ -172,30 +164,27 @@ class GPUDataTypes
172164
TPCRaw = 64,
173165
ITSClusters = 128,
174166
ITSTracks = 256 };
175-
176-
#ifdef GPUCA_NOCOMPAT_ALLOPENCL
167+
#ifndef __OPENCL__
177168
static constexpr const char* const DEVICE_TYPE_NAMES[] = {"INVALID", "CPU", "CUDA", "HIP", "OCL"};
178169
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"};
179170
static constexpr const char* const GENERAL_STEP_NAMES[] = {"Prepare", "QA"};
180-
typedef bitfield<RecoStep, uint32_t> RecoStepField;
181-
typedef bitfield<InOutType, uint32_t> InOutTypeField;
182171
constexpr static int32_t N_RECO_STEPS = sizeof(GPUDataTypes::RECO_STEP_NAMES) / sizeof(GPUDataTypes::RECO_STEP_NAMES[0]);
183172
constexpr static int32_t N_GENERAL_STEPS = sizeof(GPUDataTypes::GENERAL_STEP_NAMES) / sizeof(GPUDataTypes::GENERAL_STEP_NAMES[0]);
184173
#endif
174+
typedef bitfield<RecoStep, uint32_t> RecoStepField;
175+
typedef bitfield<InOutType, uint32_t> InOutTypeField;
185176
#ifdef GPUCA_NOCOMPAT
186177
static constexpr uint32_t NSLICES = 36;
187178
#endif
188179
static DeviceType GetDeviceType(const char* type);
189180
};
190181

191-
#ifdef GPUCA_NOCOMPAT_ALLOPENCL
192182
struct GPURecoStepConfiguration {
193183
GPUDataTypes::RecoStepField steps = 0;
194184
GPUDataTypes::RecoStepField stepsGPUMask = GPUDataTypes::RecoStep::AllRecoSteps;
195185
GPUDataTypes::InOutTypeField inputs = 0;
196186
GPUDataTypes::InOutTypeField outputs = 0;
197187
};
198-
#endif
199188

200189
#ifdef GPUCA_NOCOMPAT
201190

GPU/GPUTracking/utils/bitfield.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef Q_BITFIELD_H
1616
#define Q_BITFIELD_H
1717

18-
#if !defined(GPUCA_NOCOMPAT_ALLOPENCL) && !defined(GPUCA_GPUCODE_COMPILEKERNELS)
18+
#if !defined(GPUCA_GPUCODE_DEVICE) && !defined(GPUCA_GPUCODE_COMPILEKERNELS)
1919
#include <type_traits>
2020
#endif
2121

@@ -92,7 +92,7 @@ class bitfield
9292
return retVal;
9393
}
9494

95-
#if defined(GPUCA_NOCOMPAT_ALLOPENCL) && !defined(GPUCA_GPUCODE_DEVICE)
95+
#if !defined(GPUCA_GPUCODE_DEVICE)
9696
static_assert(std::is_integral<S>::value, "Storage type non integral");
9797
static_assert(sizeof(S) >= sizeof(T), "Storage type has insufficient capacity");
9898
#endif

0 commit comments

Comments
 (0)