|
| 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 dumpGPUDefParam.C |
| 13 | +/// \author David Rohr |
| 14 | + |
| 15 | +// Run e.g. as: |
| 16 | +// ROOT_INCLUDE_PATH="`pwd`/include" root -l -q -b src/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C'()' |
| 17 | + |
| 18 | +// Logic for testing to load the default parameters |
| 19 | +/*#define GPUCA_GPUCODE |
| 20 | +#define GPUCA_GPUTYPE_AMPERE |
| 21 | +#define GPUCA_DEF_PARAMETERS_LOAD_DEFAULTS |
| 22 | +#define GPUCA_MAXN 40 |
| 23 | +#define GPUCA_ROW_COUNT 152 |
| 24 | +#define GPUCA_TPC_COMP_CHUNK_SIZE 1024 |
| 25 | +#include "GPUDefParametersDefault.h"*/ |
| 26 | + |
| 27 | +// Load file that sets GPUDefParameters |
| 28 | +#include "testParam.h" |
| 29 | + |
| 30 | +#include "GPUDefParametersLoad.inc" |
| 31 | +void dumpGPUDefParam() { |
| 32 | + auto param = o2::gpu::internal::GPUDefParametersLoad(); |
| 33 | + printf("Loaded params:\n%s", o2::gpu::internal::GPUDefParametersExport(param, false).c_str()); |
| 34 | + FILE* fp = fopen("parameters.out", "w+b"); |
| 35 | + fwrite(¶m, 1, sizeof(param), fp); |
| 36 | + fclose(fp); |
| 37 | +} |
0 commit comments