Project
Loading...
Searching...
No Matches
GPUConfigDump.cxx
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#include "GPUConfigDump.h"
16#include "GPUDataTypes.h"
17#include "GPUSettings.h"
18
19#include <functional>
20#include <iostream>
21#include <cstdio>
22
24
25using namespace o2::gpu;
26
27namespace
28{
29GPUSettingsStandalone configStandalone;
30std::vector<std::function<void()>> qprint_global;
31#define QCONFIG_PRINT
32#include "utils/qconfig.h"
33#undef QCONFIG_PRINT
34} // namespace
35
36void GPUConfigDump::dumpConfig(const GPUSettingsRec* rec, const GPUSettingsProcessing* proc, const GPUSettingsQA* qa, const GPUSettingsDisplay* display, const GPUSettingsDeviceBackend* device, const GPURecoStepConfiguration* workflow)
37{
38 if (rec) {
39 qConfigPrint(*rec, "rec.");
40 }
41 if (proc) {
42 qConfigPrint(*proc, "proc.");
43 }
44 if (qa) {
45 qConfigPrint(*qa, "QA.");
46 }
47 if (display) {
48 qConfigPrint(*display, "display.");
49 }
50 if (device) {
51 std::cout << "\n\tGPUSettingsDeviceBackend:\n"
52 << "\tdeviceType = " << (int32_t)device->deviceType << "\n"
53 << "\tforceDeviceType = " << (device->forceDeviceType ? "true" : "false") << "\n"
54 << "\tslave = " << (device->master ? "true" : "false") << "\n";
55 }
56 if (workflow) {
57 printf("\n\tReconstruction steps / inputs / outputs:\n\tReco Steps = 0x%08x\n\tReco Steps GPU = 0x%08x\n\tInputs = 0x%08x\n\tOutputs = 0x%08x\n", (uint32_t)workflow->steps, (uint32_t)workflow->stepsGPUMask, (uint32_t)workflow->inputs, (uint32_t)workflow->outputs);
58 }
59}
static void dumpConfig(const GPUSettingsRec *rec, const GPUSettingsProcessing *proc, const GPUSettingsQA *qa, const GPUSettingsDisplay *display, const GPUSettingsDeviceBackend *device, const GPURecoStepConfiguration *workflow)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GPUSettingsStandalone configStandalone
Definition genEvents.cxx:47
std::vector< std::function< void()> > qprint_global
Definition qconfig.cxx:508
void qConfigPrint()
Definition qconfig.cxx:517
GPUReconstruction * rec
GPUDataTypes::RecoStepField stepsGPUMask
GPUDataTypes::InOutTypeField outputs
GPUDataTypes::RecoStepField steps
GPUDataTypes::InOutTypeField inputs