Skip to content

Commit

Permalink
GPU: fix tpc geometry definition in a corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Mar 1, 2024
1 parent 5af41a6 commit 60229bc
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions GPU/GPUTracking/Definitions/GPUDefConstantsAndSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@

#define TPC_MAX_TIME_BIN_TRIGGERED 600

#if defined(GPUCA_HAVE_O2HEADERS) && (!defined(__OPENCL__) || defined(__OPENCLCPP__)) && !(defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE < 393216) && defined(__has_include)
#if __has_include("DataFormatsTPC/Constants.h")
//Use definitions from the O2 headers if available for nicer code and type safety
#include "DataFormatsTPC/Constants.h"
#define GPUCA_NSLICES o2::tpc::constants::MAXSECTOR
#define GPUCA_ROW_COUNT o2::tpc::constants::MAXGLOBALPADROW
#endif
#endif
#ifndef GPUCA_NSLICES
#if defined(GPUCA_HAVE_O2HEADERS) && defined(GPUCA_TPC_GEOMETRY_O2) && (!defined(__OPENCL__) || defined(__OPENCLCPP__)) && !(defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE < 393216)
//Use definitions from the O2 headers if available for nicer code and type safety
#include "DataFormatsTPC/Constants.h"
#define GPUCA_NSLICES o2::tpc::constants::MAXSECTOR
#define GPUCA_ROW_COUNT o2::tpc::constants::MAXGLOBALPADROW
#else
//Define it manually, if O2 headers not available, ROOT5, and OpenCL 1.2, which do not know C++11.
#define GPUCA_NSLICES 36
#ifdef GPUCA_TPC_GEOMETRY_O2
Expand Down

0 comments on commit 60229bc

Please sign in to comment.