Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b1b040d
GPU: remove obsolete config code
davidrohr Oct 16, 2026
65de400
GPU Display: Fix FPE with display width = 0, e.g. with none backend
davidrohr Oct 22, 2026
baa35cc
GPU: Possibility to generate run time type information about config s…
davidrohr Oct 16, 2026
3a53dcc
GPU Display: Reorganize frontend to have GPUSettingsFrontendConfig.cx…
davidrohr Oct 16, 2026
b20222b
GPU Display Frontend: move key binding constants to separate header
davidrohr Oct 24, 2026
6d16ed2
GPU Display: Build config RTTI Structs
davidrohr Oct 22, 2026
d2a45d1
GPU Display: Remove mKeysShifted helper array
davidrohr Oct 24, 2026
83633ef
GPU Display: Assemble all variables controlling the display in a cont…
davidrohr Oct 25, 2026
175854b
GPU Display: Add option to list configuration bindings for keyboard a…
davidrohr Oct 24, 2026
b62432e
GPU Display Frontend: move key handling to RTTI callbacks instead of …
davidrohr Oct 24, 2026
816aa14
GPU Display Frontend: Add a map for key down actions, and assign keys…
davidrohr Oct 27, 2026
a024d3e
GPU Display: Switch help-text to auto-generated help text from key bi…
davidrohr Oct 27, 2026
9f49cb6
GPU Display: Info messages per configuration value, not per key, so t…
davidrohr Oct 27, 2026
a9f005f
GPU Display: Unify calling DrawGLScene and handling of events
davidrohr Oct 27, 2026
797f9d8
GPU Display: Clean up full screen / maximized setting, make them idem…
davidrohr Oct 28, 2026
f227f57
GPU Display: Cleanup: check for config changes only once
davidrohr Oct 28, 2026
ccbd487
GPU Display backend glut: support maximizing the window
davidrohr Oct 28, 2026
2e73d9f
GPU Display: Modernize GLUT backend: Use callbacks with user-data for…
davidrohr Oct 28, 2026
e41a0bb
GPU Display Frontend: Use condition_variable to signal stop and confi…
davidrohr Oct 29, 2026
d86469a
GPU Wayland Display: Fix handling of F keys
davidrohr Oct 29, 2026
db7d183
GPU Display: Drop / implement some simple TODOs
davidrohr Oct 29, 2026
180a566
GPU Display: Fix creating unrequested screenshot, when enabling savin…
davidrohr Oct 29, 2026
d32f950
GPU Display Frontend: auto-generate info message for key-press if non…
davidrohr Oct 29, 2026
ec5d2f5
GPU Display: Order key bindings for better grouping in the help text
davidrohr Oct 29, 2026
10f3210
GPU Display: Drop obsolete compat profile for OpenGL
davidrohr Oct 31, 2026
06a135f
GPU Display: Wrap lines of help text if they do not fit on screen
davidrohr Oct 31, 2026
ee2075b
GPU Display: Fix do not exit on arrow key presses in the console
davidrohr Nov 3, 2026
063a395
GPU Display Qt GUI: Add proper passing of frames with config elements…
davidrohr Oct 29, 2026
660851a
GPU Display GUI: Get rid of Qt ui file, since all elements are create…
davidrohr Nov 4, 2026
1eef39d
GPU: Can load GPUSettingsList.h - like structs from multiple files
davidrohr Nov 4, 2026
cac0229
GPU Config: Clean up header guards
davidrohr Nov 6, 2026
1eff308
GPU: Fix missing newline in RTC param code
davidrohr Nov 6, 2026
3f44d67
GPU: Improve settings handling and make GPUDisplayControl a qconfig G…
davidrohr Nov 7, 2026
6a40512
GPU Display Frontend: Use RTTI for configuring GPUDisplayControl
davidrohr Nov 6, 2026
f615d4c
GPU Display: Suppress generic SetInfo change-messages for certain var…
davidrohr Nov 7, 2026
9c41ce0
GPUD Display: Move frontend key number constants to separate header
davidrohr Nov 8, 2026
adfb06c
GPU Display: Correctly handle special cars pressed in the console window
davidrohr Nov 8, 2026
69ad375
GPU Display OpenGL: Ignore stale errors from the frontend
davidrohr Nov 8, 2026
da22c41
GPU Display: Add an integrated console for manipulating the configura…
davidrohr Nov 8, 2026
1308c23
GPU Display: Improve synchronization and avoid possible race conditio…
davidrohr Nov 8, 2026
229a666
GPU Display Console: Add the possibility to execute a script file
davidrohr Nov 8, 2026
8aadf23
GPU: Split GPUSettingsList.h further into groups, extract display and…
davidrohr Nov 8, 2026
5f1d105
GPU NN Clusterizer: Fix some variable types
davidrohr Nov 9, 2026
fa6f2b1
GPU Display: Fix order in which Euler rotations are applied during an…
davidrohr Nov 9, 2026
f9f1bec
GPU Display Console: Add plenty of useful commands
davidrohr Nov 8, 2026
06b3d33
GPU Display: Cleanup: add some typedefs and rename variables
davidrohr Nov 9, 2026
13a6203
GPU Display Console: Add the possibility to rebind keys
davidrohr Nov 9, 2026
4cf6370
GPU: Apply clang-format or suppress it
davidrohr Nov 9, 2026
a5008b7
GPU Display Improvemnts: bind middle mouse button, better error messa…
davidrohr Nov 9, 2026
ac29b63
GPU Display GUI: Make animation points configurable in the GUI
davidrohr Nov 9, 2026
4797ef0
GPU: Make vecpod allocator stateless
davidrohr Nov 9, 2026
1d87055
GPU Display: Improve animations and support blending of multiple anim…
davidrohr Nov 9, 2026
47874b3
GPU Display: Cleanup: remove dummy variale and string comparisons for…
davidrohr Nov 9, 2026
d0db025
GPU Display: Several fixes to key handling
davidrohr Nov 9, 2026
9319266
GPU Display: Fix several minor issues
davidrohr Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ IndentWidth: 2
# It is broken on windows. Breaks all #include "header.h"
---
Language: Cpp
AttributeMacros: ['GPUrestrict'] # GPU qualifier macro: GPUrestrict() is otherwise parsed as function call, e.g. 'a -> b' after it
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
Expand Down
2 changes: 2 additions & 0 deletions GPU/Common/GPUCommonArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ struct array {
}
T m_internal_V__[N];
};
// clang-format off
template <class T, class... E>
GPUd() array(T, E...)->array<T, 1 + sizeof...(E)>;
// clang-format on
#else
template <typename T, size_t N>
using array = std::array<T, N>;
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/GPUCommonConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ namespace o2::gpu::gpu_common_constants
{
static GPUglobalconstexpr() const float kCLight = 0.000299792458f; // TODO: Duplicate of MathConstants, fix this now that we use only OpenCL CPP
static GPUglobalconstexpr() const float kZeroFieldCut = 0.013f;
}
} // namespace o2::gpu::gpu_common_constants

#endif
1 change: 1 addition & 0 deletions GPU/GPUTracking/Base/GPUParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "GPUCommonDef.h"
#include "GPUCommonMath.h"
#include "GPUDef.h"
#define GPUSETTINGS_PARAM
#include "GPUSettings.h"
#include "GPUTPCGMPolynomialField.h"
#include "DataFormatsTPC/Constants.h"
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/Base/GPUParamRTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#define GPUPARAMRTC_H

#include "GPUParam.h"
#define GPUSETTINGS_ALL
#include "GPUSettings.h"
#include <string>

namespace o2::gpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@

// clang-format off
$<JOIN:$<LIST:TRANSFORM,$<LIST:TRANSFORM,$<LIST:REMOVE_DUPLICATES,$<TARGET_PROPERTY:O2_GPU_KERNELS,O2_GPU_KERNEL_INCLUDES>>,APPEND,.h">,PREPEND,#include ">,
>
// clang-format on
> // clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
#include "GPUReconstructionKernelMacros.h"

// clang-format off
$<JOIN:$<TARGET_PROPERTY:O2_GPU_KERNELS,O2_GPU_KERNELS>,>
// clang-format on
$<JOIN:$<TARGET_PROPERTY:O2_GPU_KERNELS,O2_GPU_KERNELS>,> // clang-format on
2 changes: 2 additions & 0 deletions GPU/GPUTracking/Base/GPUReconstructionTimeframe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "AliHLTTPCRawCluster.h"
#include "TPCFastTransformPOD.h"
#include "GPUO2DataTypes.h"
#define GPUSETTINGS_STANDALONE
#define GPUSETTINGS_DISPLAY
#include "GPUSettings.h"

#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime()
}
}

#ifndef __HIPCC__ // CUDA
#ifndef __HIPCC__ // CUDA
dummyInitKernel<<<mMultiprocessorCount, 256>>>(mDeviceMemoryBase); // TODO: Can't we just use the CUDA version and hipify will take care of the rest?
#else // HIP
#else // HIP
hipLaunchKernelGGL(HIP_KERNEL_NAME(dummyInitKernel), dim3(mMultiprocessorCount), dim3(256), 0, 0, mDeviceMemoryBase);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

// clang-format off
@O2_GPU_KERNEL_TEMPLATE_FILES@
// clang-format on

extern "C" {
// clang-format off
@O2_GPU_KERNEL_TEMPLATE_REPLACE@
// clang-format on
}
} // clang-format on: not before the }, the placeholders confuse clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

// clang-format off
@O2_GPU_KERNEL_TEMPLATE_FILES@
// clang-format on

extern "C" {
// clang-format off
@O2_GPU_KERNEL_TEMPLATE_REPLACE@
// clang-format on
}
} // clang-format on: not before the }, the placeholders confuse clang-format
6 changes: 5 additions & 1 deletion GPU/GPUTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ set(SRCS_DATATYPES DataTypes/GPUDataTypesConfig.cxx DataTypes/GPUConfigDump.cxx

set(HDRS_CINT_O2 Merger/GPUTPCGMTrackParam.h Merger/GPUTPCGMMergedTrack.h Merger/GPUTPCGMSectorTrack.h Merger/GPUTPCGMBorderTrack.h TRDTracking/GPUTRDInterfaces.h)
set(HDRS_CINT_DATATYPES DataTypes/GPUTPCGMMergedTrackHit.h)
set(HDRS_CINT_O2_ADDITIONAL DataTypes/GPUSettings.h Definitions/GPUSettingsList.h DataTypes/GPUDataTypesIO.h DataTypes/GPUDataTypesConfig.h DataTypes/GPUDataTypesQA.h DataTypes/GPUTRDTrack.h DataTypes/GPUTRDRecoParam.h DataTypes/CalibdEdxTrackTopologyPol.h DataTypes/CalibdEdxTrackTopologySpline.h) # Manual dependencies for ROOT dictionary generation
set(HDRS_CINT_O2_ADDITIONAL DataTypes/GPUSettings.h DataTypes/GPUSettingsTypes.h Definitions/GPUSettingsListDisplay.h Definitions/GPUSettingsList.h DataTypes/GPUDataTypesIO.h DataTypes/GPUDataTypesConfig.h DataTypes/GPUDataTypesQA.h DataTypes/GPUTRDTrack.h DataTypes/GPUTRDRecoParam.h DataTypes/CalibdEdxTrackTopologyPol.h DataTypes/CalibdEdxTrackTopologySpline.h) # Manual dependencies for ROOT dictionary generation

set(SRCS_NO_CINT
DataTypes/GPUMemorySizeScalers.cxx
Expand Down Expand Up @@ -120,6 +120,7 @@ set(HDRS_INSTALL
Base/GPUReconstructionIncludesITS.h
Base/GPUReconstructionKernelMacros.h
Base/GPUReconstructionCPUKernels.h
Base/GPUStdSystemHeaders.h
DataCompression/GPUTPCClusterRejection.h
DataCompression/GPUTPCCompressionKernels.inc
DataCompression/TPCClusterDecompressionCore.inc
Expand Down Expand Up @@ -156,6 +157,7 @@ set(HDRS_INSTALL
SectorTracker/GPUTPCMCInfo.h
SectorTracker/GPUTPCTracklet.h
SectorTracker/GPUTPCTrackLinearisation.h
SectorTracker/GPUTPCRow.h
TPCConvert/GPUTPCConvertImpl.h
TRDTracking/GPUTRDGeometry.h
TRDTracking/GPUTRDSpacePoint.h
Expand All @@ -165,6 +167,8 @@ set(HDRS_INSTALL
TRDTracking/GPUTRDTrackPoint.h
TRDTracking/GPUTRDTrackPoint.h
DataTypes/GPUTPCGMPolynomialField.h
DataTypes/GPUSettingsParam.h
Definitions/GPUSettingsListStandalone.h
)

set(SRCS_NO_CINT ${SRCS_NO_CINT} display/GPUDisplayInterface.cxx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step0at
if (!(param.rec.tpc.compressionTypeMask & GPUSettings::CompressionTrackModel)) {
continue; // No track model compression
}
const ClusterNative& GPUrestrict() orgCl = clusters -> clusters[hit.sector][hit.row][hit.num - clusters->clusterOffset[hit.sector][hit.row]];
const ClusterNative& GPUrestrict() orgCl = clusters->clusters[hit.sector][hit.row][hit.num - clusters->clusterOffset[hit.sector][hit.row]];
constexpr GPUTPCGeometry geo;
float x = geo.Row2X(hit.row);
float y = track.LinearPad2Y(hit.sector, orgCl.getPad(), geo.PadWidth(hit.row), geo.NPads(hit.row));
Expand Down Expand Up @@ -291,7 +291,7 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step1un

for (uint32_t j = get_local_id(0); j < count; j += get_local_size(0)) {
int32_t outidx = idOffsetOut + totalCount + j;
const ClusterNative& GPUrestrict() orgCl = clusters -> clusters[iSector][iRow][sortBuffer[j]];
const ClusterNative& GPUrestrict() orgCl = clusters->clusters[iSector][iRow][sortBuffer[j]];

int32_t preId = j != 0 ? (int32_t)sortBuffer[j - 1] : (totalCount != 0 ? (int32_t)smem.lastIndex : -1);
GPUTPCCompression_EncodeUnattached(param.rec.tpc.compressionTypeMask, orgCl, c.timeDiffU[outidx], c.padDiffU[outidx], preId == -1 ? nullptr : &clusters->clusters[iSector][iRow][preId]);
Expand Down
6 changes: 2 additions & 4 deletions GPU/GPUTracking/DataTypes/GPUConfigDump.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "GPUConfigDump.h"
#include "GPUDataTypesIO.h"
#define GPUSETTINGS_ALL
#include "GPUSettings.h"

#include <functional>
Expand All @@ -27,10 +28,7 @@ using namespace o2::gpu;
namespace
{
GPUSettingsStandalone configStandalone;
std::vector<std::function<void()>> qprint_global;
#define QCONFIG_PRINT
#include "utils/qconfig_internal.h"
#undef QCONFIG_PRINT
#include "utils/qconfig_print.inc"
} // namespace

void GPUConfigDump::dumpConfig(const GPUSettingsRec* rec, const GPUSettingsProcessing* proc, const GPUSettingsQA* qa, const GPUSettingsDisplay* display, const GPUSettingsDeviceBackend* device, const GPURecoStepConfiguration* workflow)
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/DataTypes/GPUO2ConfigurableParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using namespace o2::gpu;
#define AddCustomCPP(...)
#define AddHelp(...)
#define AddShortcut(...)
#include "GPUSettingsListDisplay.h"
#include "GPUSettingsList.h"
#undef BeginNamespace
#undef EndNamespace
Expand Down Expand Up @@ -80,6 +81,7 @@ GPUSettingsO2 GPUO2InterfaceConfiguration::ReadConfigurableParam(GPUO2InterfaceC
#define AddCustomCPP(...)
#define AddHelp(...)
#define AddShortcut(...)
#include "GPUSettingsListDisplay.h"
#include "GPUSettingsList.h"
#undef BeginNamespace
#undef EndNamespace
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/DataTypes/GPUO2ConfigurableParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "GPUO2ExternalUser.h"
#include "CommonUtils/ConfigurableParam.h"
#include "CommonUtils/ConfigurableParamHelper.h"
#define GPUSETTINGS_DISPLAY
#include "GPUSettings.h"
#include "GPUDefMacros.h"
#include <vector>
Expand Down Expand Up @@ -59,6 +60,7 @@
#define AddShortcut(...)
#define AddOptionRTC(...) AddOption(__VA_ARGS__)
#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
#include "GPUSettingsListDisplay.h"
#include "GPUSettingsList.h"
#undef BeginNamespace
#undef EndNamespace
Expand Down
67 changes: 3 additions & 64 deletions GPU/GPUTracking/DataTypes/GPUSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,76 +16,15 @@
#define GPUSETTINGS_H

#include "GPUCommonDef.h"
#include "GPUDataTypesConfig.h"
#include "GPUTPCGMMergedTrackHit.h"
#ifndef GPUCA_GPUCODE_DEVICE
#include <vector>
#include <string>
#endif

namespace o2::gpu
{
class GPUDisplayFrontendInterface;
class GPUReconstruction;

class GPUSettings
{
public:
enum CompressionModes { CompressionTruncate = 1,
CompressionDifferences = 2,
CompressionTrackModel = 4,
CompressionFull = 7 };
enum CompressionSort { SortTime = 0,
SortPad = 1,
SortZTimePad = 2,
SortZPadTime = 3,
SortNoSort = 4 };
enum CompressionRejection { RejectionNone = 0,
RejectionStrategyA = 1,
RejectionStrategyB = 2 };

static GPUglobalconstexpr() const uint32_t TPC_MAX_TF_TIME_BIN = ((256 * 3564 + 2 * 8 - 2) / 8);
};

// Settings describing the global run parameters
struct GPUSettingsGRP {
// 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.
float solenoidBzNominalGPU = -5.00668f; // solenoid field strength
int32_t constBz = 0; // for test-MC events with constant Bz
int32_t removed0 = 0; // Obsolete parameter, dummy value needed to support reading old dumps
int32_t grpContinuousMaxTimeBin = -2; // 0 for triggered events, -1 for automatic setting, -2 invalid default
int32_t needsClusterer = 0; // Set to true if the data requires the clusterizer
int32_t doCompClusterDecode = 0; // Set to true if the data contains compressed TPC clusters
int32_t tpcCutTimeBin = 0; // Cut TPC clusters and digits >= this cut
};
#include "GPUSettingsTypes.h"

// Parameters of the current time frame
struct GPUSettingsTF {
int32_t hasTfStartOrbit = 0;
int32_t tfStartOrbit = 0;
int32_t hasRunStartOrbit = 0;
int32_t runStartOrbit = 0;
int32_t hasSimStartOrbit = 0;
int32_t simStartOrbit = 0;
int32_t hasNHBFPerTF = 0;
int32_t nHBFPerTF = 0;
};

// Settings defining the setup of the GPUReconstruction processing (basically selecting the device / class instance)
struct GPUSettingsDeviceBackend {
uint32_t deviceType = gpudatatypes::DeviceType::CPU; // Device type, shall use gpudatatypes::DEVICE_TYPE constants, e.g. CPU / CUDA
uint8_t forceDeviceType = 1; // Fail if device initialization fails, otherwise falls back to CPU
GPUReconstruction* master = nullptr; // GPUReconstruction master object
};

} // namespace o2::gpu
#endif // GPUSETTINGS_H

// Outside of header guard, since might run it multiple times for different config structs
#ifdef GPUCA_GPUCODE_DEVICE
#define QCONFIG_GPU
#endif
// See GPUSettingsList.h for a list of all available settings of GPU Reconstruction
#ifndef GPUCA_GPUCODE_GENRTC
#include "utils/qconfig.h"
#endif

#endif
23 changes: 23 additions & 0 deletions GPU/GPUTracking/DataTypes/GPUSettingsParam.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file GPUSettingsParam.h
/// \author David Rohr

// clang-format off

// No include guard: included multiple times by qconfig with different macro definitions

// Derrived parameters used in GPUParam
BeginHiddenConfig(GPUSettingsParam, param)
AddVariableRTC(continuousTracking, int8_t, 0) // Continuous tracking, estimate bz and errors for abs(z) = 125cm during seeding
AddVariableRTC(dodEdx, int8_t, 0) // Do dEdx computation
EndConfig()
83 changes: 83 additions & 0 deletions GPU/GPUTracking/DataTypes/GPUSettingsTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file GPUSettingsTypes.h
/// \author David Rohr

#ifndef GPUSETTINGSTYPES_H
#define GPUSETTINGSTYPES_H

#include "GPUCommonDef.h"
#include "GPUDataTypesConfig.h"
#include "GPUTPCGMMergedTrackHit.h"
#ifndef GPUCA_GPUCODE_DEVICE
#include <vector>
#include <string>
#endif

namespace o2::gpu
{
class GPUDisplayFrontendInterface;
class GPUReconstruction;

class GPUSettings
{
public:
enum CompressionModes { CompressionTruncate = 1,
CompressionDifferences = 2,
CompressionTrackModel = 4,
CompressionFull = 7 };
enum CompressionSort { SortTime = 0,
SortPad = 1,
SortZTimePad = 2,
SortZPadTime = 3,
SortNoSort = 4 };
enum CompressionRejection { RejectionNone = 0,
RejectionStrategyA = 1,
RejectionStrategyB = 2 };

static GPUglobalconstexpr() const uint32_t TPC_MAX_TF_TIME_BIN = ((256 * 3564 + 2 * 8 - 2) / 8);
};

// Settings describing the global run parameters
struct GPUSettingsGRP {
// 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.
float solenoidBzNominalGPU = -5.00668f; // solenoid field strength
int32_t constBz = 0; // for test-MC events with constant Bz
int32_t removed0 = 0; // Obsolete parameter, dummy value needed to support reading old dumps
int32_t grpContinuousMaxTimeBin = -2; // 0 for triggered events, -1 for automatic setting, -2 invalid default
int32_t needsClusterer = 0; // Set to true if the data requires the clusterizer
int32_t doCompClusterDecode = 0; // Set to true if the data contains compressed TPC clusters
int32_t tpcCutTimeBin = 0; // Cut TPC clusters and digits >= this cut
};

// Parameters of the current time frame
struct GPUSettingsTF {
int32_t hasTfStartOrbit = 0;
int32_t tfStartOrbit = 0;
int32_t hasRunStartOrbit = 0;
int32_t runStartOrbit = 0;
int32_t hasSimStartOrbit = 0;
int32_t simStartOrbit = 0;
int32_t hasNHBFPerTF = 0;
int32_t nHBFPerTF = 0;
};

// Settings defining the setup of the GPUReconstruction processing (basically selecting the device / class instance)
struct GPUSettingsDeviceBackend {
uint32_t deviceType = gpudatatypes::DeviceType::CPU; // Device type, shall use gpudatatypes::DEVICE_TYPE constants, e.g. CPU / CUDA
uint8_t forceDeviceType = 1; // Fail if device initialization fails, otherwise falls back to CPU
GPUReconstruction* master = nullptr; // GPUReconstruction master object
};

} // namespace o2::gpu

#endif // GPUSETTINGSTYPES_H
Loading
Loading