|
| 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 | + |
| 12 | +/// \file GPUSettingsTypes.h |
| 13 | +/// \author David Rohr |
| 14 | + |
| 15 | +#ifndef GPUSETTINGSTYPES_H |
| 16 | +#define GPUSETTINGSTYPES_H |
| 17 | + |
| 18 | +#include "GPUCommonDef.h" |
| 19 | +#include "GPUDataTypesConfig.h" |
| 20 | +#include "GPUTPCGMMergedTrackHit.h" |
| 21 | +#ifndef GPUCA_GPUCODE_DEVICE |
| 22 | +#include <vector> |
| 23 | +#include <string> |
| 24 | +#endif |
| 25 | + |
| 26 | +namespace o2::gpu |
| 27 | +{ |
| 28 | +class GPUDisplayFrontendInterface; |
| 29 | +class GPUReconstruction; |
| 30 | + |
| 31 | +class GPUSettings |
| 32 | +{ |
| 33 | + public: |
| 34 | + enum CompressionModes { CompressionTruncate = 1, |
| 35 | + CompressionDifferences = 2, |
| 36 | + CompressionTrackModel = 4, |
| 37 | + CompressionFull = 7 }; |
| 38 | + enum CompressionSort { SortTime = 0, |
| 39 | + SortPad = 1, |
| 40 | + SortZTimePad = 2, |
| 41 | + SortZPadTime = 3, |
| 42 | + SortNoSort = 4 }; |
| 43 | + enum CompressionRejection { RejectionNone = 0, |
| 44 | + RejectionStrategyA = 1, |
| 45 | + RejectionStrategyB = 2 }; |
| 46 | + |
| 47 | + static GPUglobalconstexpr() const uint32_t TPC_MAX_TF_TIME_BIN = ((256 * 3564 + 2 * 8 - 2) / 8); |
| 48 | +}; |
| 49 | + |
| 50 | +// Settings describing the global run parameters |
| 51 | +struct GPUSettingsGRP { |
| 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 removed0 = 0; // Obsolete parameter, dummy value needed to support reading old dumps |
| 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 |
| 63 | +struct GPUSettingsTF { |
| 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) |
| 75 | +struct GPUSettingsDeviceBackend { |
| 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 | +#endif // GPUSETTINGSTYPES_H |
0 commit comments