Project
Loading...
Searching...
No Matches
GPUDefParametersWrapper.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// Wrapper file to load all compile-time parameters (architecture / rtc - dependent ones, and constant ones)
16// Compile-time constants affecting the tracking algorithms / results are located in GPUDefConstantsAndSettings.h
17
18#ifndef GPUDEFPARAMETERSWRAPPER_H
19#define GPUDEFPARAMETERSWRAPPER_H
20// clang-format off
21
22#include "GPUCommonDef.h"
23#include "GPUDefMacros.h"
24
27
28namespace o2::gpu
29{
30#if defined(GPUCA_GPUCODE) && !defined(GPUCA_GPUCODE_NO_LAUNCH_BOUNDS)
31 GPUhdi() static constexpr uint32_t GPUCA_GET_THREAD_COUNT(uint32_t val, ...) { return val; }
32 GPUhdi() static constexpr uint32_t GPUCA_GET_WARP_COUNT(uint32_t val, ...) { return val / GPUCA_WARP_SIZE; }
33#else
34 static constexpr uint32_t GPUCA_WARP_SIZE = 1; // On the host, a thread is a block is a warp, and we run 1 "device thread" per block.
35 #define GPUCA_GET_THREAD_COUNT(...) 1 // This must be a define not a constexpr function
36 #define GPUCA_GET_WARP_COUNT(...) 1 // since launch bound constants are not defined in host-code, and must evaluate to 1!
37#endif
38
39#define GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE_A GPUCA_DETERMINISTIC_CODE(float, GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE)
40#define GPUCA_PAR_DEDX_STORAGE_TYPE_A GPUCA_DETERMINISTIC_CODE(float, GPUCA_PAR_DEDX_STORAGE_TYPE)
41
42// #define GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE // Output Profiling Data for Tracklet Constructor Tracklet Scheduling
43
44// #define GPUCA_KERNEL_DEBUGGER_OUTPUT
45
46} // namespace o2::gpu
47
48// clang-format on
49#endif // GPUDEFPARAMETERSWRAPPER_H
#define GPUCA_GET_THREAD_COUNT(...)
#define GPUCA_GET_WARP_COUNT(...)
GLuint GLfloat * val
Definition glcorearb.h:1582
GPUhdi() const expr float GPUCommonMath