Project
Loading...
Searching...
No Matches
GPUDataTypesConfig.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef GPUDATATYPESCONFIG_H
16#define GPUDATATYPESCONFIG_H
17
18#include "GPUCommonDef.h"
19
20// These are basic and non-complex data types, which will also be visible on the GPU.
21// Please add complex data types required on the host but not GPU to GPUHostDataTypes.h and forward-declare!
22#ifndef GPUCA_GPUCODE_DEVICE
23#include <type_traits> // for bitfield below
24#include <cstddef>
25#endif
26
27namespace o2::gpu
28{
29#include "utils/bitfield.h"
30
31namespace gpudatatypes
32{
33// clang-format off
34enum class GeometryType : uint32_t { RESERVED_GEOMETRY = 0, ALIROOT = 1, O2 = 2 };
35enum DeviceType : uint32_t { INVALID_DEVICE = 0, CPU = 1, CUDA = 2, HIP = 3, OCL = 4 };
36enum class GeneralStep : uint32_t { Prepare = 1, QA = 2 };
37// clang-format on
38
39enum class RecoStep : uint32_t { TPCConversion = 1,
41 TPCMerging = 4,
43 TRDTracking = 16,
44 ITSTracking = 32,
45 TPCdEdx = 64,
47 TPCDecompression = 256,
48 Refit = 512,
49 AllRecoSteps = 0x7FFFFFFF,
50 NoRecoStep = 0 };
51enum class InOutType : uint32_t { TPCClusters = 1,
52 OBSOLETE = 2,
55 TRDTracklets = 16,
56 TRDTracks = 32,
57 TPCRaw = 64,
58 ITSClusters = 128,
59 ITSTracks = 256 };
60#ifndef __OPENCL__
61static constexpr const char* const DEVICE_TYPE_NAMES[] = {"INVALID", "CPU", "CUDA", "HIP", "OCL"};
62static 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"};
63static constexpr const char* const GENERAL_STEP_NAMES[] = {"Prepare", "QA"};
64constexpr static int32_t N_RECO_STEPS = sizeof(gpudatatypes::RECO_STEP_NAMES) / sizeof(gpudatatypes::RECO_STEP_NAMES[0]);
65constexpr static int32_t N_GENERAL_STEPS = sizeof(gpudatatypes::GENERAL_STEP_NAMES) / sizeof(gpudatatypes::GENERAL_STEP_NAMES[0]);
66#endif
69DeviceType GetDeviceType(const char* type);
70} // namespace gpudatatypes
71
78} // namespace o2::gpu
79
80#endif
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
bitfield< InOutType, uint32_t > InOutTypeField
bitfield< RecoStep, uint32_t > RecoStepField
DeviceType GetDeviceType(const char *type)
gpudatatypes::RecoStepField steps
gpudatatypes::InOutTypeField inputs
gpudatatypes::RecoStepField stepsGPUMask
gpudatatypes::InOutTypeField outputs