Skip to content

Commit a903a38

Browse files
committed
GPU: add METAL to the device type enumeration
Purely additive: a new DeviceType value and its name. GetDeviceType() walks DEVICE_TYPE_NAMES, so the table is the only other place that needs to know. The name table is excluded under __METAL__ for the same reason it is under __OPENCL__ -- no host strings in device code.
1 parent a44ed8d commit a903a38

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

GPU/GPUTracking/DataTypes/GPUDataTypesConfig.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace gpudatatypes
3232
{
3333
// clang-format off
3434
enum class GeometryType : uint32_t { RESERVED_GEOMETRY = 0, ALIROOT = 1, O2 = 2 };
35-
enum DeviceType : uint32_t { INVALID_DEVICE = 0, CPU = 1, CUDA = 2, HIP = 3, OCL = 4 };
35+
enum DeviceType : uint32_t { INVALID_DEVICE = 0, CPU = 1, CUDA = 2, HIP = 3, OCL = 4, METAL = 5 };
3636
enum class GeneralStep : uint32_t { Prepare = 1, QA = 2 };
3737
// clang-format on
3838

@@ -57,8 +57,8 @@ enum class InOutType : uint32_t { TPCClusters = 1,
5757
TPCRaw = 64,
5858
ITSClusters = 128,
5959
ITSTracks = 256 };
60-
#ifndef __OPENCL__
61-
static constexpr const char* const DEVICE_TYPE_NAMES[] = {"INVALID", "CPU", "CUDA", "HIP", "OCL"};
60+
#if !defined(__OPENCL__) && !defined(__METAL__)
61+
static constexpr const char* const DEVICE_TYPE_NAMES[] = {"INVALID", "CPU", "CUDA", "HIP", "OCL", "METAL"};
6262
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"};
6363
static constexpr const char* const GENERAL_STEP_NAMES[] = {"Prepare", "QA"};
6464
constexpr static int32_t N_RECO_STEPS = sizeof(gpudatatypes::RECO_STEP_NAMES) / sizeof(gpudatatypes::RECO_STEP_NAMES[0]);

0 commit comments

Comments
 (0)