diff --git a/GPU/Common/CMakeLists.txt b/GPU/Common/CMakeLists.txt index efac4fc436758..6951c3b2339b8 100644 --- a/GPU/Common/CMakeLists.txt +++ b/GPU/Common/CMakeLists.txt @@ -64,3 +64,8 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2") endif() install(FILES ${HDRS_INSTALL} DESTINATION include/GPU) endif() + +if(ALIGPU_BUILD_TYPE STREQUAL "Standalone") + install(FILES ${HDRS_INSTALL} + DESTINATION include) +endif() diff --git a/GPU/GPUTracking/CMakeLists.txt b/GPU/GPUTracking/CMakeLists.txt index 33715909e810c..fe2fefe2412c0 100644 --- a/GPU/GPUTracking/CMakeLists.txt +++ b/GPU/GPUTracking/CMakeLists.txt @@ -258,7 +258,7 @@ file(GENERATE if(NOT ALIGPU_BUILD_TYPE STREQUAL "O2") include_directories(${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly) endif() -set(HDRS_INSTALL ${HDRS_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUReconstructionKernelList.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParameters.h) +set(HDRS_INSTALL ${HDRS_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUReconstructionKernelList.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParameters.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParametersLoad.inc) include(kernels.cmake) # Optional sources depending on optional dependencies @@ -376,13 +376,18 @@ if(ALIGPU_BUILD_TYPE STREQUAL "Standalone") if(GPUCA_CONFIG_ROOT) ROOT_GENERATE_DICTIONARY(G__${targetName} ${HDRS_CINT_O2} ${HDRS_CINT_DATATYPES} ${HDRS_CINT_O2_ADDITIONAL} GPUTrackingLinkDef_Standalone.h MODULE ${targetName}) - INSTALL(FILES + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${targetName}_rdict.pcm ${CMAKE_CURRENT_BINARY_DIR}/lib${targetName}.rootmap DESTINATION .) else() target_compile_definitions(${targetName} PRIVATE GPUCA_NO_ROOT) endif() + install(FILES ${HDRS_SRCS} ${HDRS_CINT_O2} ${HDRS_CINT_DATATYPES} ${HDRS_INSTALL} + DESTINATION include) + install(DIRECTORY utils + DESTINATION include + FILES_MATCHING PATTERN *.h) endif() # GPUReconstructionLibrary needs to know which GPU backends are enabled for proper error messages diff --git a/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C b/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C new file mode 100644 index 0000000000000..4a2575c40d79a --- /dev/null +++ b/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C @@ -0,0 +1,38 @@ +// 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 dumpGPUDefParam.C +/// \author David Rohr + +// Run e.g. as: +// ROOT_INCLUDE_PATH="`pwd`/include" root -l -q -b src/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C'()' + +// Logic for testing to load the default parameters +/*#define GPUCA_GPUCODE +#define GPUCA_GPUTYPE_AMPERE +#define GPUCA_DEF_PARAMETERS_LOAD_DEFAULTS +#define GPUCA_MAXN 40 +#define GPUCA_ROW_COUNT 152 +#define GPUCA_TPC_COMP_CHUNK_SIZE 1024 +#include "GPUDefParametersDefault.h"*/ + +// Load file that sets GPUDefParameters +#include "testParam.h" + +#include "GPUDefParametersLoad.inc" +void dumpGPUDefParam() +{ + auto param = o2::gpu::internal::GPUDefParametersLoad(); + printf("Loaded params:\n%s", o2::gpu::internal::GPUDefParametersExport(param, false).c_str()); + FILE* fp = fopen("parameters.out", "w+b"); + fwrite(¶m, 1, sizeof(param), fp); + fclose(fp); +}