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
27
namespace
o2::gpu
28
{
29
#include "
utils/bitfield.h
"
30
31
namespace
gpudatatypes
32
{
33
// clang-format off
34
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 };
36
enum class
GeneralStep
: uint32_t {
Prepare
= 1,
QA
= 2 };
37
// clang-format on
38
39
enum class
RecoStep
: uint32_t {
TPCConversion
= 1,
40
TPCSectorTracking
= 2,
41
TPCMerging
= 4,
42
TPCCompression
= 8,
43
TRDTracking
= 16,
44
ITSTracking
= 32,
45
TPCdEdx
= 64,
46
TPCClusterFinding
= 128,
47
TPCDecompression
= 256,
48
Refit
= 512,
49
AllRecoSteps
= 0x7FFFFFFF,
50
NoRecoStep
= 0 };
51
enum class
InOutType
: uint32_t {
TPCClusters
= 1,
52
OBSOLETE
= 2,
53
TPCMergedTracks
= 4,
54
TPCCompressedClusters
= 8,
55
TRDTracklets
= 16,
56
TRDTracks
= 32,
57
TPCRaw
= 64,
58
ITSClusters
= 128,
59
ITSTracks
= 256 };
60
#ifndef __OPENCL__
61
static
constexpr
const
char
*
const
DEVICE_TYPE_NAMES[] = {
"INVALID"
,
"CPU"
,
"CUDA"
,
"HIP"
,
"OCL"
};
62
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"
};
63
static
constexpr
const
char
*
const
GENERAL_STEP_NAMES[] = {
"Prepare"
,
"QA"
};
64
constexpr
static
int32_t N_RECO_STEPS =
sizeof
(gpudatatypes::RECO_STEP_NAMES) /
sizeof
(gpudatatypes::RECO_STEP_NAMES[0]);
65
constexpr
static
int32_t N_GENERAL_STEPS =
sizeof
(gpudatatypes::GENERAL_STEP_NAMES) /
sizeof
(gpudatatypes::GENERAL_STEP_NAMES[0]);
66
#endif
67
typedef
bitfield<RecoStep, uint32_t>
RecoStepField
;
68
typedef
bitfield<InOutType, uint32_t>
InOutTypeField
;
69
DeviceType
GetDeviceType
(
const
char
*
type
);
70
}
// namespace gpudatatypes
71
72
struct
GPURecoStepConfiguration
{
73
gpudatatypes::RecoStepField
steps
= 0;
74
gpudatatypes::RecoStepField
stepsGPUMask
=
gpudatatypes::RecoStep::AllRecoSteps
;
75
gpudatatypes::InOutTypeField
inputs
= 0;
76
gpudatatypes::InOutTypeField
outputs
= 0;
77
};
78
}
// namespace o2::gpu
79
80
#endif
GPUCommonDef.h
bitfield.h
bitfield
Definition
bitfield.h:20
type
GLint GLint GLsizei GLint GLenum GLenum type
Definition
glcorearb.h:275
o2::gpu::gpudatatypes::InOutType
InOutType
Definition
GPUDataTypesConfig.h:51
o2::gpu::gpudatatypes::InOutType::TRDTracklets
@ TRDTracklets
o2::gpu::gpudatatypes::InOutType::ITSClusters
@ ITSClusters
o2::gpu::gpudatatypes::InOutType::TPCClusters
@ TPCClusters
o2::gpu::gpudatatypes::InOutType::TPCMergedTracks
@ TPCMergedTracks
o2::gpu::gpudatatypes::InOutType::TPCRaw
@ TPCRaw
o2::gpu::gpudatatypes::InOutType::ITSTracks
@ ITSTracks
o2::gpu::gpudatatypes::InOutType::TPCCompressedClusters
@ TPCCompressedClusters
o2::gpu::gpudatatypes::InOutType::OBSOLETE
@ OBSOLETE
o2::gpu::gpudatatypes::InOutType::TRDTracks
@ TRDTracks
o2::gpu::gpudatatypes::InOutTypeField
bitfield< InOutType, uint32_t > InOutTypeField
Definition
GPUDataTypesConfig.h:68
o2::gpu::gpudatatypes::RecoStep
RecoStep
Definition
GPUDataTypesConfig.h:39
o2::gpu::gpudatatypes::RecoStep::TPCConversion
@ TPCConversion
o2::gpu::gpudatatypes::RecoStep::TPCClusterFinding
@ TPCClusterFinding
o2::gpu::gpudatatypes::RecoStep::TPCdEdx
@ TPCdEdx
o2::gpu::gpudatatypes::RecoStep::ITSTracking
@ ITSTracking
o2::gpu::gpudatatypes::RecoStep::TPCDecompression
@ TPCDecompression
o2::gpu::gpudatatypes::RecoStep::AllRecoSteps
@ AllRecoSteps
o2::gpu::gpudatatypes::RecoStep::TPCMerging
@ TPCMerging
o2::gpu::gpudatatypes::RecoStep::TPCCompression
@ TPCCompression
o2::gpu::gpudatatypes::RecoStep::Refit
@ Refit
o2::gpu::gpudatatypes::RecoStep::TRDTracking
@ TRDTracking
o2::gpu::gpudatatypes::RecoStep::TPCSectorTracking
@ TPCSectorTracking
o2::gpu::gpudatatypes::RecoStep::NoRecoStep
@ NoRecoStep
o2::gpu::gpudatatypes::RecoStepField
bitfield< RecoStep, uint32_t > RecoStepField
Definition
GPUDataTypesConfig.h:67
o2::gpu::gpudatatypes::GeometryType
GeometryType
Definition
GPUDataTypesConfig.h:34
o2::gpu::gpudatatypes::GeometryType::O2
@ O2
o2::gpu::gpudatatypes::GeometryType::ALIROOT
@ ALIROOT
o2::gpu::gpudatatypes::GeometryType::RESERVED_GEOMETRY
@ RESERVED_GEOMETRY
o2::gpu::gpudatatypes::DeviceType
DeviceType
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::INVALID_DEVICE
@ INVALID_DEVICE
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::OCL
@ OCL
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::CPU
@ CPU
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::HIP
@ HIP
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::CUDA
@ CUDA
Definition
GPUDataTypesConfig.h:35
o2::gpu::gpudatatypes::GetDeviceType
DeviceType GetDeviceType(const char *type)
Definition
GPUDataTypesConfig.cxx:20
o2::gpu::gpudatatypes::GeneralStep
GeneralStep
Definition
GPUDataTypesConfig.h:36
o2::gpu::gpudatatypes::GeneralStep::QA
@ QA
o2::gpu::gpudatatypes::GeneralStep::Prepare
@ Prepare
o2::gpu
Definition
TrackTRD.h:35
o2::gpu::GPURecoStepConfiguration
Definition
GPUDataTypesConfig.h:72
o2::gpu::GPURecoStepConfiguration::steps
gpudatatypes::RecoStepField steps
Definition
GPUDataTypesConfig.h:73
o2::gpu::GPURecoStepConfiguration::inputs
gpudatatypes::InOutTypeField inputs
Definition
GPUDataTypesConfig.h:75
o2::gpu::GPURecoStepConfiguration::stepsGPUMask
gpudatatypes::RecoStepField stepsGPUMask
Definition
GPUDataTypesConfig.h:74
o2::gpu::GPURecoStepConfiguration::outputs
gpudatatypes::InOutTypeField outputs
Definition
GPUDataTypesConfig.h:76
GPU
GPUTracking
DataTypes
GPUDataTypesConfig.h
Generated on Tue Dec 30 2025 08:41:24 for Project by
1.9.8