Project
Loading...
Searching...
No Matches
GPUSettings.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 GPUSETTINGS_H
16#define GPUSETTINGS_H
17
18#include "GPUCommonDef.h"
19#include "GPUDataTypes.h"
21#ifndef GPUCA_GPUCODE_DEVICE
22#include <vector>
23#include <string>
24#endif
25
26namespace o2::gpu
27{
28class GPUDisplayFrontendInterface;
29class GPUReconstruction;
30
32{
33 public:
46
47 static constexpr const uint32_t TPC_MAX_TF_TIME_BIN = ((256 * 3564 + 2 * 8 - 2) / 8);
48};
49
50// Settings describing the global run parameters
52 // All new members must be sizeof(int32_t) resp. sizeof(float) for alignment reasons!, default value for newly added members for old data will be 0.
53 float solenoidBzNominalGPU = -5.00668f; // solenoid field strength
54 int32_t constBz = 0; // for test-MC events with constant Bz
55 int32_t homemadeEvents = 0; // Toy-MC events
56 int32_t grpContinuousMaxTimeBin = -2; // 0 for triggered events, -1 for automatic setting, -2 invalid default
57 int32_t needsClusterer = 0; // Set to true if the data requires the clusterizer
58 int32_t doCompClusterDecode = 0; // Set to true if the data contains compressed TPC clusters
59 int32_t tpcCutTimeBin = 0; // Cut TPC clusters and digits >= this cut
60};
61
62// Parameters of the current time frame
64 int32_t hasTfStartOrbit = 0;
65 int32_t tfStartOrbit = 0;
66 int32_t hasRunStartOrbit = 0;
67 int32_t runStartOrbit = 0;
68 int32_t hasSimStartOrbit = 0;
69 int32_t simStartOrbit = 0;
70 int32_t hasNHBFPerTF = 0;
71 int32_t nHBFPerTF = 0;
72};
73
74// Settings defining the setup of the GPUReconstruction processing (basically selecting the device / class instance)
76 uint32_t deviceType = GPUDataTypes::DeviceType::CPU; // Device type, shall use GPUDataTypes::DEVICE_TYPE constants, e.g. CPU / CUDA
77 uint8_t forceDeviceType = 1; // Fail if device initialization fails, otherwise falls back to CPU
78 GPUReconstruction* master = nullptr; // GPUReconstruction master object
79};
80
81} // namespace o2::gpu
82
83#ifdef GPUCA_GPUCODE_DEVICE
84#define QCONFIG_GPU
85#endif
86// See GPUSettingsList.h for a list of all available settings of GPU Reconstruction
87#ifndef GPUCA_GPUCODE_GENRTC
88#include "utils/qconfig.h"
89#endif
90
91#endif
static constexpr const uint32_t TPC_MAX_TF_TIME_BIN
Definition GPUSettings.h:47