Skip to content

Commit

Permalink
GPU: Merge GPUDataTypes and GPUDataTypeHeaders in one library
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Nov 19, 2024
1 parent 7c8b70e commit b63541a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DataFormats/Detectors/GlobalTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ o2_add_library(
O2::DataFormatsCPV
O2::DataFormatsPHOS
O2::DataFormatsEMCAL
O2::GPUDataTypeHeaders
O2::GPUDataTypes
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Reconstruction>
PRIVATE_LINK_LIBRARIES
O2::Framework)
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ o2_add_library(DetectorsBase
O2::SimulationDataFormat
O2::SimConfig
O2::CCDB
O2::GPUDataTypeHeaders
O2::GPUDataTypes
MC::VMC
TBB::tbb
)
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TRD/workflow/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ o2_add_library(TRDWorkflowIO
src/TRDCalibWriterSpec.cxx
src/TRDPHReaderSpec.cxx
include/TRDWorkflowIO/KrClusterWriterSpec.h
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypeHeaders O2::DataFormatsTPC)
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypes O2::DataFormatsTPC)


o2_add_executable(digit-reader-workflow
Expand Down
27 changes: 7 additions & 20 deletions GPU/GPUTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ set(SRCS
TRDTracking/GPUTRDTrackerKernels.cxx
Base/GPUParam.cxx)

set(SRCS_DATATYPES DataTypes/GPUDataTypes.cxx DataTypes/GPUConfigDump.cxx)
set(SRCS_DATATYPE_HEADERS DataTypes/GPUTPCGMPolynomialField.cxx)
set(SRCS_DATATYPES DataTypes/GPUDataTypes.cxx DataTypes/GPUConfigDump.cxx DataTypes/GPUTPCGMPolynomialField.cxx)

set(HDRS_CINT_O2 Merger/GPUTPCGMMergedTrack.h Merger/GPUTPCGMSliceTrack.h Merger/GPUTPCGMBorderTrack.h)
set(HDRS_CINT_O2 Merger/GPUTPCGMTrackParam.h Merger/GPUTPCGMMergedTrack.h Merger/GPUTPCGMSliceTrack.h Merger/GPUTPCGMBorderTrack.h TRDTracking/GPUTRDInterfaces.h)
set(HDRS_CINT_DATATYPES DataTypes/GPUTPCGMMergedTrackHit.h)
set(HDRS_CINT_O2_ADDITIONAL DataTypes/GPUSettings.h Definitions/GPUSettingsList.h DataTypes/GPUDataTypes.h DataTypes/GPUTRDTrack.h DataTypes/CalibdEdxTrackTopologyPol.h DataTypes/CalibdEdxTrackTopologySpline.h) # Manual dependencies for ROOT dictionary generation

Expand Down Expand Up @@ -214,10 +213,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2" OR GPUCA_CONFIG_O2_EXTENSIONS)
DataTypes/TPCZSLinkMapping.cxx
DataTypes/CalibdEdxContainer.cxx
DataTypes/CalibdEdxTrackTopologyPol.cxx
DataTypes/CalibdEdxTrackTopologySpline.cxx)

set(SRCS_DATATYPE_HEADERS
${SRCS_DATATYPE_HEADERS}
DataTypes/CalibdEdxTrackTopologySpline.cxx
DataTypes/GPUTRDTrackO2.cxx)

set(SRCS_NO_H ${SRCS_NO_H}
Expand Down Expand Up @@ -298,28 +294,20 @@ string(REPLACE ".cxx" ".h" HDRS_TMP "${SRCS_NO_CINT}")
set(HDRS_INSTALL ${HDRS_INSTALL} ${HDRS_TMP})
string(REPLACE ".cxx" ".h" HDRS_TMP "${SRCS_DATATYPES}")
set(HDRS_CINT_DATATYPES ${HDRS_CINT_DATATYPES} ${HDRS_TMP})
string(REPLACE ".cxx" ".h" HDRS_TMP "${SRCS_DATATYPE_HEADERS}")
set(HDRS_INSTALL ${HDRS_INSTALL} ${HDRS_TMP})
unset(HDRS_TMP)

# Main CMake part for O2
if(ALIGPU_BUILD_TYPE STREQUAL "O2")
o2_add_library(GPUDataTypeHeaders
o2_add_library(GPUDataTypes
TARGETVARNAME targetName
PUBLIC_INCLUDE_DIRECTORIES .
Definitions
DataTypes
PUBLIC_LINK_LIBRARIES O2::GPUCommon
PUBLIC_LINK_LIBRARIES O2::GPUUtils
O2::GPUCommon
O2::ReconstructionDataFormats
O2::TPCFastTransformation
PRIVATE_LINK_LIBRARIES O2::DataFormatsTPC
SOURCES ${SRCS_DATATYPE_HEADERS})
target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB GPUCA_TPC_GEOMETRY_O2 GPUCA_HAVE_O2HEADERS)

o2_add_library(GPUDataTypes
TARGETVARNAME targetName
PUBLIC_LINK_LIBRARIES O2::GPUDataTypeHeaders O2::GPUUtils
PRIVATE_LINK_LIBRARIES O2::DataFormatsTPC
SOURCES ${SRCS_DATATYPES})
target_compile_definitions(${targetName} PRIVATE GPUCA_O2_LIB GPUCA_TPC_GEOMETRY_O2 GPUCA_HAVE_O2HEADERS)
o2_target_root_dictionary(GPUDataTypes
Expand Down Expand Up @@ -461,7 +449,6 @@ if(ALIGPU_BUILD_TYPE STREQUAL "ALIROOT")
${SRCS_NO_CINT}
${SRCS_NO_H}
${SRCS_DATATYPES}
${SRCS_DATATYPE_HEADERS}
G__Ali${MODULE}.cxx)
target_link_libraries(Ali${MODULE} ${LIBDEPS})

Expand All @@ -488,7 +475,7 @@ endif()

# Main CMake part for Standalone
if(ALIGPU_BUILD_TYPE STREQUAL "Standalone")
add_library(${MODULE} SHARED ${SRCS} ${SRCS_NO_CINT} ${SRCS_NO_H} ${SRCS_DATATYPES} ${SRCS_DATATYPE_HEADERS})
add_library(${MODULE} SHARED ${SRCS} ${SRCS_NO_CINT} ${SRCS_NO_H} ${SRCS_DATATYPES})
set(targetName ${MODULE})
add_library(O2::${MODULE} ALIAS ${MODULE})
install(TARGETS ${MODULE})
Expand Down
2 changes: 2 additions & 0 deletions GPU/GPUTracking/GPUTrackingLinkDef_O2.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#pragma link C++ class o2::gpu::GPUTPCTrack + ;
#pragma link C++ struct o2::gpu::GPUTPCBaseTrackParam + ;
#pragma link C++ struct o2::gpu::GPUTPCGMSliceTrack::sliceTrackParam + ;
#pragma link C++ class o2::gpu::trackInterface < o2::gpu::GPUTPCGMTrackParam> + ;
#pragma link C++ class o2::gpu::GPUTRDTrack_t < o2::gpu::trackInterface < o2::gpu::GPUTPCGMTrackParam>> + ;
#pragma link C++ class o2::gpu::gputpcgmmergertypes::GPUTPCOuterParam + ;
#pragma link C++ class o2::gpu::gputpcgmmergertypes::InterpolationErrorHit + ;

Expand Down
3 changes: 3 additions & 0 deletions GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class propagatorInterface<AliTrackerBase> : public AliTrackerBase
#if defined(GPUCA_HAVE_O2HEADERS) // Interface for O2, build only with O2

#include "DetectorsBase/Propagator.h"
#include "GPUTRDInterfaceO2Track.h"

namespace GPUCA_NAMESPACE
{
Expand Down Expand Up @@ -300,6 +301,8 @@ class trackInterface<GPUTPCGMTrackParam> : public GPUTPCGMTrackParam

private:
float mAlpha = 0.f; // rotation along phi wrt global coordinate system

ClassDefNV(trackInterface, 1);
};

template <>
Expand Down
2 changes: 1 addition & 1 deletion GPU/Workflow/helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ o2_add_library(GPUWorkflowHelper
TARGETVARNAME targetName
PUBLIC_LINK_LIBRARIES O2::Framework
O2::DataFormatsGlobalTracking
O2::GPUDataTypeHeaders
O2::GPUDataTypes
O2::GPUO2Interface
O2::ITStracking)

0 comments on commit b63541a

Please sign in to comment.