From a7d73c09a9c7a7ecbf25c45d56f70ebcadddb285 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Thu, 8 Aug 2024 06:37:00 -0700 Subject: [PATCH] replace alpaka::getPtrNative(buf) with buf.data() --- .../LSTCore/interface/EndcapGeometryBuffer.h | 4 +- RecoTracker/LSTCore/interface/Module.h | 52 +++++++------- RecoTracker/LSTCore/src/LSTESData.cc | 4 +- RecoTracker/LSTCore/src/ModuleMethods.h | 50 ++++++------- RecoTracker/LSTCore/src/alpaka/Event.dev.cc | 40 +++++------ RecoTracker/LSTCore/src/alpaka/Hit.h | 38 +++++----- RecoTracker/LSTCore/src/alpaka/MiniDoublet.h | 72 +++++++++---------- RecoTracker/LSTCore/src/alpaka/ObjectRanges.h | 56 +++++++-------- .../LSTCore/src/alpaka/PixelQuintuplet.h | 36 +++++----- RecoTracker/LSTCore/src/alpaka/PixelTriplet.h | 44 ++++++------ RecoTracker/LSTCore/src/alpaka/Quintuplet.h | 48 ++++++------- RecoTracker/LSTCore/src/alpaka/Segment.h | 68 +++++++++--------- .../LSTCore/src/alpaka/TrackCandidate.h | 34 ++++----- RecoTracker/LSTCore/src/alpaka/Triplet.h | 34 ++++----- 14 files changed, 290 insertions(+), 290 deletions(-) diff --git a/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h b/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h index 6a787a5ed95eb..2c6df9ab2773c 100644 --- a/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h +++ b/RecoTracker/LSTCore/interface/EndcapGeometryBuffer.h @@ -19,8 +19,8 @@ namespace lst { template void setData(TBuff const& buf) { - geoMapDetId = alpaka::getPtrNative(buf.geoMapDetId_buf); - geoMapPhi = alpaka::getPtrNative(buf.geoMapPhi_buf); + geoMapDetId = buf.geoMapDetId_buf.data(); + geoMapPhi = buf.geoMapPhi_buf.data(); } }; diff --git a/RecoTracker/LSTCore/interface/Module.h b/RecoTracker/LSTCore/interface/Module.h index eca086b91850f..7266ebd7bc49b 100644 --- a/RecoTracker/LSTCore/interface/Module.h +++ b/RecoTracker/LSTCore/interface/Module.h @@ -84,32 +84,32 @@ namespace lst { template void setData(TBuff const& buf) { - detIds = alpaka::getPtrNative(buf.detIds_buf); - moduleMap = alpaka::getPtrNative(buf.moduleMap_buf); - mapdetId = alpaka::getPtrNative(buf.mapdetId_buf); - mapIdx = alpaka::getPtrNative(buf.mapIdx_buf); - nConnectedModules = alpaka::getPtrNative(buf.nConnectedModules_buf); - drdzs = alpaka::getPtrNative(buf.drdzs_buf); - dxdys = alpaka::getPtrNative(buf.dxdys_buf); - nModules = alpaka::getPtrNative(buf.nModules_buf); - nLowerModules = alpaka::getPtrNative(buf.nLowerModules_buf); - partnerModuleIndices = alpaka::getPtrNative(buf.partnerModuleIndices_buf); - - layers = alpaka::getPtrNative(buf.layers_buf); - rings = alpaka::getPtrNative(buf.rings_buf); - modules = alpaka::getPtrNative(buf.modules_buf); - rods = alpaka::getPtrNative(buf.rods_buf); - subdets = alpaka::getPtrNative(buf.subdets_buf); - sides = alpaka::getPtrNative(buf.sides_buf); - eta = alpaka::getPtrNative(buf.eta_buf); - r = alpaka::getPtrNative(buf.r_buf); - isInverted = alpaka::getPtrNative(buf.isInverted_buf); - isLower = alpaka::getPtrNative(buf.isLower_buf); - isAnchor = alpaka::getPtrNative(buf.isAnchor_buf); - moduleType = alpaka::getPtrNative(buf.moduleType_buf); - moduleLayerType = alpaka::getPtrNative(buf.moduleLayerType_buf); - lstLayers = alpaka::getPtrNative(buf.lstLayers_buf); - connectedPixels = alpaka::getPtrNative(buf.connectedPixels_buf); + detIds = buf.detIds_buf.data(); + moduleMap = buf.moduleMap_buf.data(); + mapdetId = buf.mapdetId_buf.data(); + mapIdx = buf.mapIdx_buf.data(); + nConnectedModules = buf.nConnectedModules_buf.data(); + drdzs = buf.drdzs_buf.data(); + dxdys = buf.dxdys_buf.data(); + nModules = buf.nModules_buf.data(); + nLowerModules = buf.nLowerModules_buf.data(); + partnerModuleIndices = buf.partnerModuleIndices_buf.data(); + + layers = buf.layers_buf.data(); + rings = buf.rings_buf.data(); + modules = buf.modules_buf.data(); + rods = buf.rods_buf.data(); + subdets = buf.subdets_buf.data(); + sides = buf.sides_buf.data(); + eta = buf.eta_buf.data(); + r = buf.r_buf.data(); + isInverted = buf.isInverted_buf.data(); + isLower = buf.isLower_buf.data(); + isAnchor = buf.isAnchor_buf.data(); + moduleType = buf.moduleType_buf.data(); + moduleLayerType = buf.moduleLayerType_buf.data(); + lstLayers = buf.lstLayers_buf.data(); + connectedPixels = buf.connectedPixels_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/LSTESData.cc b/RecoTracker/LSTCore/src/LSTESData.cc index 9079d0d229216..1acf085a0f491 100644 --- a/RecoTracker/LSTCore/src/LSTESData.cc +++ b/RecoTracker/LSTCore/src/LSTESData.cc @@ -89,10 +89,10 @@ std::unique_ptr> lst::loadAndFillESHost() auto endcapGeometryBuffers = EndcapGeometryBuffer(cms::alpakatools::host(), endcapGeometry.nEndCapMap); - std::memcpy(alpaka::getPtrNative(endcapGeometryBuffers.geoMapDetId_buf), + std::memcpy(endcapGeometryBuffers.geoMapDetId_buf.data(), endcapGeometry.geoMapDetId_buf.data(), endcapGeometry.nEndCapMap * sizeof(unsigned int)); - std::memcpy(alpaka::getPtrNative(endcapGeometryBuffers.geoMapPhi_buf), + std::memcpy(endcapGeometryBuffers.geoMapPhi_buf.data(), endcapGeometry.geoMapPhi_buf.data(), endcapGeometry.nEndCapMap * sizeof(float)); diff --git a/RecoTracker/LSTCore/src/ModuleMethods.h b/RecoTracker/LSTCore/src/ModuleMethods.h index 54514cccf2b54..196212defdfa6 100644 --- a/RecoTracker/LSTCore/src/ModuleMethods.h +++ b/RecoTracker/LSTCore/src/ModuleMethods.h @@ -83,7 +83,7 @@ namespace lst { modulesBuf.connectedPixels_buf = allocBufWrapper(cms::alpakatools::host(), nPixels); modulesBuf.data_.setData(modulesBuf); - unsigned int* connectedPixels = alpaka::getPtrNative(modulesBuf.connectedPixels_buf); + unsigned int* connectedPixels = modulesBuf.connectedPixels_buf.data(); for (unsigned int icondet = 0; icondet < totalSizes; icondet++) { connectedPixels[icondet] = mmd.detIdToIndex.at(connectedModuleDetIds[icondet]); @@ -99,8 +99,8 @@ namespace lst { inline void fillConnectedModuleArrayExplicit(ModulesBuffer& modulesBuf, ModuleMetaData const& mmd, ModuleConnectionMap const& moduleConnectionMap) { - uint16_t* moduleMap = alpaka::getPtrNative(modulesBuf.moduleMap_buf); - uint16_t* nConnectedModules = alpaka::getPtrNative(modulesBuf.nConnectedModules_buf); + uint16_t* moduleMap = modulesBuf.moduleMap_buf.data(); + uint16_t* nConnectedModules = modulesBuf.nConnectedModules_buf.data(); for (auto it = mmd.detIdToIndex.begin(); it != mmd.detIdToIndex.end(); ++it) { unsigned int detId = it->first; @@ -114,8 +114,8 @@ namespace lst { } inline void fillMapArraysExplicit(ModulesBuffer& modulesBuf, ModuleMetaData const& mmd) { - uint16_t* mapIdx = alpaka::getPtrNative(modulesBuf.mapIdx_buf); - unsigned int* mapdetId = alpaka::getPtrNative(modulesBuf.mapdetId_buf); + uint16_t* mapIdx = modulesBuf.mapIdx_buf.data(); + unsigned int* mapdetId = modulesBuf.mapdetId_buf.data(); unsigned int counter = 0; for (auto it = mmd.detIdToIndex.begin(); it != mmd.detIdToIndex.end(); ++it) { @@ -205,26 +205,26 @@ namespace lst { ModulesBuffer modulesBuf(cms::alpakatools::host(), nModules, 0); // Getting the underlying data pointers - unsigned int* host_detIds = alpaka::getPtrNative(modulesBuf.detIds_buf); - short* host_layers = alpaka::getPtrNative(modulesBuf.layers_buf); - short* host_rings = alpaka::getPtrNative(modulesBuf.rings_buf); - short* host_rods = alpaka::getPtrNative(modulesBuf.rods_buf); - short* host_modules = alpaka::getPtrNative(modulesBuf.modules_buf); - short* host_subdets = alpaka::getPtrNative(modulesBuf.subdets_buf); - short* host_sides = alpaka::getPtrNative(modulesBuf.sides_buf); - float* host_eta = alpaka::getPtrNative(modulesBuf.eta_buf); - float* host_r = alpaka::getPtrNative(modulesBuf.r_buf); - bool* host_isInverted = alpaka::getPtrNative(modulesBuf.isInverted_buf); - bool* host_isLower = alpaka::getPtrNative(modulesBuf.isLower_buf); - bool* host_isAnchor = alpaka::getPtrNative(modulesBuf.isAnchor_buf); - ModuleType* host_moduleType = alpaka::getPtrNative(modulesBuf.moduleType_buf); - ModuleLayerType* host_moduleLayerType = alpaka::getPtrNative(modulesBuf.moduleLayerType_buf); - float* host_dxdys = alpaka::getPtrNative(modulesBuf.dxdys_buf); - float* host_drdzs = alpaka::getPtrNative(modulesBuf.drdzs_buf); - uint16_t* host_nModules = alpaka::getPtrNative(modulesBuf.nModules_buf); - uint16_t* host_nLowerModules = alpaka::getPtrNative(modulesBuf.nLowerModules_buf); - uint16_t* host_partnerModuleIndices = alpaka::getPtrNative(modulesBuf.partnerModuleIndices_buf); - int* host_lstLayers = alpaka::getPtrNative(modulesBuf.lstLayers_buf); + unsigned int* host_detIds = modulesBuf.detIds_buf.data(); + short* host_layers = modulesBuf.layers_buf.data(); + short* host_rings = modulesBuf.rings_buf.data(); + short* host_rods = modulesBuf.rods_buf.data(); + short* host_modules = modulesBuf.modules_buf.data(); + short* host_subdets = modulesBuf.subdets_buf.data(); + short* host_sides = modulesBuf.sides_buf.data(); + float* host_eta = modulesBuf.eta_buf.data(); + float* host_r = modulesBuf.r_buf.data(); + bool* host_isInverted = modulesBuf.isInverted_buf.data(); + bool* host_isLower = modulesBuf.isLower_buf.data(); + bool* host_isAnchor = modulesBuf.isAnchor_buf.data(); + ModuleType* host_moduleType = modulesBuf.moduleType_buf.data(); + ModuleLayerType* host_moduleLayerType = modulesBuf.moduleLayerType_buf.data(); + float* host_dxdys = modulesBuf.dxdys_buf.data(); + float* host_drdzs = modulesBuf.drdzs_buf.data(); + uint16_t* host_nModules = modulesBuf.nModules_buf.data(); + uint16_t* host_nLowerModules = modulesBuf.nLowerModules_buf.data(); + uint16_t* host_partnerModuleIndices = modulesBuf.partnerModuleIndices_buf.data(); + int* host_lstLayers = modulesBuf.lstLayers_buf.data(); //reassign detIdToIndex indices here nLowerModules = (nModules - 1) / 2; diff --git a/RecoTracker/LSTCore/src/alpaka/Event.dev.cc b/RecoTracker/LSTCore/src/alpaka/Event.dev.cc index 82a7f44a268b9..9e46c96a4488c 100644 --- a/RecoTracker/LSTCore/src/alpaka/Event.dev.cc +++ b/RecoTracker/LSTCore/src/alpaka/Event.dev.cc @@ -197,8 +197,8 @@ void lst::Event::addHitToEvent(std::vector const& x, TwoS, nModules_, nEndCapMap_, - alpaka::getPtrNative(endcapGeometryBuffers_.geoMapDetId_buf), - alpaka::getPtrNative(endcapGeometryBuffers_.geoMapPhi_buf), + endcapGeometryBuffers_.geoMapDetId_buf.data(), + endcapGeometryBuffers_.geoMapPhi_buf.data(), *modulesBuffers_.data(), *hitsInGPU, nHits); @@ -368,11 +368,11 @@ void lst::Event::addPixelSegmentToEvent(std::vector const& *hitsInGPU, *mdsInGPU, *segmentsInGPU, - alpaka::getPtrNative(hitIndices0_dev), - alpaka::getPtrNative(hitIndices1_dev), - alpaka::getPtrNative(hitIndices2_dev), - alpaka::getPtrNative(hitIndices3_dev), - alpaka::getPtrNative(dPhiChange_dev), + hitIndices0_dev.data(), + hitIndices1_dev.data(), + hitIndices2_dev.data(), + hitIndices3_dev.data(), + dPhiChange_dev.data(), pixelModuleIndex, size); } @@ -560,7 +560,7 @@ void lst::Event::createTriplets() { *segmentsInGPU, *tripletsInGPU, *rangesInGPU, - alpaka::getPtrNative(index_gpu_buf), + index_gpu_buf.data(), nonZeroModules); Vec3D const threadsPerBlockAddTrip{1, 1, 1024}; @@ -720,10 +720,10 @@ void lst::Event::createTrackCandidates(bool no_pls_dupclean, bool tc_pls_ alpaka::memcpy(queue, nTrackCanT5Host_buf, trackCandidatesBuffers->nTrackCandidatesT5_buf); alpaka::wait(queue); // wait to get the values before using them - auto nTrackCandidatespT5 = *alpaka::getPtrNative(nTrackCanpT5Host_buf); - auto nTrackCandidatespT3 = *alpaka::getPtrNative(nTrackCanpT3Host_buf); - auto nTrackCandidatespLS = *alpaka::getPtrNative(nTrackCanpLSHost_buf); - auto nTrackCandidatesT5 = *alpaka::getPtrNative(nTrackCanT5Host_buf); + auto nTrackCandidatespT5 = *nTrackCanpT5Host_buf.data(); + auto nTrackCandidatespT3 = *nTrackCanpT3Host_buf.data(); + auto nTrackCandidatespLS = *nTrackCanpLSHost_buf.data(); + auto nTrackCandidatesT5 = *nTrackCanT5Host_buf.data(); if ((nTrackCandidatespT5 + nTrackCandidatespT3 + nTrackCandidatespLS == n_max_pixel_track_candidates) || (nTrackCandidatesT5 == n_max_nonpixel_track_candidates)) { printf( @@ -764,8 +764,8 @@ void lst::Event::createPixelTriplets() { auto connectedPixelSize_dev_buf = allocBufWrapper(devAcc, nInnerSegments, queue); auto connectedPixelIndex_dev_buf = allocBufWrapper(devAcc, nInnerSegments, queue); - unsigned int* connectedPixelSize_host = alpaka::getPtrNative(connectedPixelSize_host_buf); - unsigned int* connectedPixelIndex_host = alpaka::getPtrNative(connectedPixelIndex_host_buf); + unsigned int* connectedPixelSize_host = connectedPixelSize_host_buf.data(); + unsigned int* connectedPixelIndex_host = connectedPixelIndex_host_buf.data(); int pixelIndexOffsetPos = pixelMapping_.connectedPixelsIndex[size_superbins - 1] + pixelMapping_.connectedPixelsSizes[size_superbins - 1]; @@ -821,8 +821,8 @@ void lst::Event::createPixelTriplets() { *segmentsInGPU, *tripletsInGPU, *pixelTripletsInGPU, - alpaka::getPtrNative(connectedPixelSize_dev_buf), - alpaka::getPtrNative(connectedPixelIndex_dev_buf), + connectedPixelSize_dev_buf.data(), + connectedPixelIndex_dev_buf.data(), nInnerSegments); #ifdef WARNINGS @@ -831,7 +831,7 @@ void lst::Event::createPixelTriplets() { alpaka::memcpy(queue, nPixelTriplets_buf, pixelTripletsBuffers->nPixelTriplets_buf); alpaka::wait(queue); // wait to get the value before using it - std::cout << "number of pixel triplets = " << *alpaka::getPtrNative(nPixelTriplets_buf) << std::endl; + std::cout << "number of pixel triplets = " << *nPixelTriplets_buf.data() << std::endl; #endif //pT3s can be cleaned here because they're not used in making pT5s! @@ -1028,8 +1028,8 @@ void lst::Event::createPixelQuintuplets() { *tripletsInGPU, *quintupletsInGPU, *pixelQuintupletsInGPU, - alpaka::getPtrNative(connectedPixelSize_dev_buf), - alpaka::getPtrNative(connectedPixelIndex_dev_buf), + connectedPixelSize_dev_buf.data(), + connectedPixelIndex_dev_buf.data(), nInnerSegments, *rangesInGPU); @@ -1065,7 +1065,7 @@ void lst::Event::createPixelQuintuplets() { alpaka::memcpy(queue, nPixelQuintuplets_buf, pixelQuintupletsBuffers->nPixelQuintuplets_buf); alpaka::wait(queue); // wait to get the value before using it - std::cout << "number of pixel quintuplets = " << *alpaka::getPtrNative(nPixelQuintuplets_buf) << std::endl; + std::cout << "number of pixel quintuplets = " << *nPixelQuintuplets_buf.data() << std::endl; #endif } diff --git a/RecoTracker/LSTCore/src/alpaka/Hit.h b/RecoTracker/LSTCore/src/alpaka/Hit.h index 7f3412ce4694a..253b0860c7068 100644 --- a/RecoTracker/LSTCore/src/alpaka/Hit.h +++ b/RecoTracker/LSTCore/src/alpaka/Hit.h @@ -28,25 +28,25 @@ namespace lst { template void setData(TBuff& buf) { - nHits = alpaka::getPtrNative(buf.nHits_buf); - xs = alpaka::getPtrNative(buf.xs_buf); - ys = alpaka::getPtrNative(buf.ys_buf); - zs = alpaka::getPtrNative(buf.zs_buf); - moduleIndices = alpaka::getPtrNative(buf.moduleIndices_buf); - idxs = alpaka::getPtrNative(buf.idxs_buf); - detid = alpaka::getPtrNative(buf.detid_buf); - rts = alpaka::getPtrNative(buf.rts_buf); - phis = alpaka::getPtrNative(buf.phis_buf); - etas = alpaka::getPtrNative(buf.etas_buf); - highEdgeXs = alpaka::getPtrNative(buf.highEdgeXs_buf); - highEdgeYs = alpaka::getPtrNative(buf.highEdgeYs_buf); - lowEdgeXs = alpaka::getPtrNative(buf.lowEdgeXs_buf); - lowEdgeYs = alpaka::getPtrNative(buf.lowEdgeYs_buf); - hitRanges = alpaka::getPtrNative(buf.hitRanges_buf); - hitRangesLower = alpaka::getPtrNative(buf.hitRangesLower_buf); - hitRangesUpper = alpaka::getPtrNative(buf.hitRangesUpper_buf); - hitRangesnLower = alpaka::getPtrNative(buf.hitRangesnLower_buf); - hitRangesnUpper = alpaka::getPtrNative(buf.hitRangesnUpper_buf); + nHits = buf.nHits_buf.data(); + xs = buf.xs_buf.data(); + ys = buf.ys_buf.data(); + zs = buf.zs_buf.data(); + moduleIndices = buf.moduleIndices_buf.data(); + idxs = buf.idxs_buf.data(); + detid = buf.detid_buf.data(); + rts = buf.rts_buf.data(); + phis = buf.phis_buf.data(); + etas = buf.etas_buf.data(); + highEdgeXs = buf.highEdgeXs_buf.data(); + highEdgeYs = buf.highEdgeYs_buf.data(); + lowEdgeXs = buf.lowEdgeXs_buf.data(); + lowEdgeYs = buf.lowEdgeYs_buf.data(); + hitRanges = buf.hitRanges_buf.data(); + hitRangesLower = buf.hitRangesLower_buf.data(); + hitRangesUpper = buf.hitRangesUpper_buf.data(); + hitRangesnLower = buf.hitRangesnLower_buf.data(); + hitRangesnUpper = buf.hitRangesnUpper_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h b/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h index bda334b31afc1..b4cbd500c7bf8 100644 --- a/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h +++ b/RecoTracker/LSTCore/src/alpaka/MiniDoublet.h @@ -56,42 +56,42 @@ namespace lst { template void setData(TBuf& buf) { - nMemoryLocations = alpaka::getPtrNative(buf.nMemoryLocations_buf); - anchorHitIndices = alpaka::getPtrNative(buf.anchorHitIndices_buf); - outerHitIndices = alpaka::getPtrNative(buf.outerHitIndices_buf); - moduleIndices = alpaka::getPtrNative(buf.moduleIndices_buf); - nMDs = alpaka::getPtrNative(buf.nMDs_buf); - totOccupancyMDs = alpaka::getPtrNative(buf.totOccupancyMDs_buf); - dphichanges = alpaka::getPtrNative(buf.dphichanges_buf); - dzs = alpaka::getPtrNative(buf.dzs_buf); - dphis = alpaka::getPtrNative(buf.dphis_buf); - shiftedXs = alpaka::getPtrNative(buf.shiftedXs_buf); - shiftedYs = alpaka::getPtrNative(buf.shiftedYs_buf); - shiftedZs = alpaka::getPtrNative(buf.shiftedZs_buf); - noShiftedDphis = alpaka::getPtrNative(buf.noShiftedDphis_buf); - noShiftedDphiChanges = alpaka::getPtrNative(buf.noShiftedDphiChanges_buf); - anchorX = alpaka::getPtrNative(buf.anchorX_buf); - anchorY = alpaka::getPtrNative(buf.anchorY_buf); - anchorZ = alpaka::getPtrNative(buf.anchorZ_buf); - anchorRt = alpaka::getPtrNative(buf.anchorRt_buf); - anchorPhi = alpaka::getPtrNative(buf.anchorPhi_buf); - anchorEta = alpaka::getPtrNative(buf.anchorEta_buf); - anchorHighEdgeX = alpaka::getPtrNative(buf.anchorHighEdgeX_buf); - anchorHighEdgeY = alpaka::getPtrNative(buf.anchorHighEdgeY_buf); - anchorLowEdgeX = alpaka::getPtrNative(buf.anchorLowEdgeX_buf); - anchorLowEdgeY = alpaka::getPtrNative(buf.anchorLowEdgeY_buf); - outerX = alpaka::getPtrNative(buf.outerX_buf); - outerY = alpaka::getPtrNative(buf.outerY_buf); - outerZ = alpaka::getPtrNative(buf.outerZ_buf); - outerRt = alpaka::getPtrNative(buf.outerRt_buf); - outerPhi = alpaka::getPtrNative(buf.outerPhi_buf); - outerEta = alpaka::getPtrNative(buf.outerEta_buf); - outerHighEdgeX = alpaka::getPtrNative(buf.outerHighEdgeX_buf); - outerHighEdgeY = alpaka::getPtrNative(buf.outerHighEdgeY_buf); - outerLowEdgeX = alpaka::getPtrNative(buf.outerLowEdgeX_buf); - outerLowEdgeY = alpaka::getPtrNative(buf.outerLowEdgeY_buf); - anchorLowEdgePhi = alpaka::getPtrNative(buf.anchorLowEdgePhi_buf); - anchorHighEdgePhi = alpaka::getPtrNative(buf.anchorHighEdgePhi_buf); + nMemoryLocations = buf.nMemoryLocations_buf.data(); + anchorHitIndices = buf.anchorHitIndices_buf.data(); + outerHitIndices = buf.outerHitIndices_buf.data(); + moduleIndices = buf.moduleIndices_buf.data(); + nMDs = buf.nMDs_buf.data(); + totOccupancyMDs = buf.totOccupancyMDs_buf.data(); + dphichanges = buf.dphichanges_buf.data(); + dzs = buf.dzs_buf.data(); + dphis = buf.dphis_buf.data(); + shiftedXs = buf.shiftedXs_buf.data(); + shiftedYs = buf.shiftedYs_buf.data(); + shiftedZs = buf.shiftedZs_buf.data(); + noShiftedDphis = buf.noShiftedDphis_buf.data(); + noShiftedDphiChanges = buf.noShiftedDphiChanges_buf.data(); + anchorX = buf.anchorX_buf.data(); + anchorY = buf.anchorY_buf.data(); + anchorZ = buf.anchorZ_buf.data(); + anchorRt = buf.anchorRt_buf.data(); + anchorPhi = buf.anchorPhi_buf.data(); + anchorEta = buf.anchorEta_buf.data(); + anchorHighEdgeX = buf.anchorHighEdgeX_buf.data(); + anchorHighEdgeY = buf.anchorHighEdgeY_buf.data(); + anchorLowEdgeX = buf.anchorLowEdgeX_buf.data(); + anchorLowEdgeY = buf.anchorLowEdgeY_buf.data(); + outerX = buf.outerX_buf.data(); + outerY = buf.outerY_buf.data(); + outerZ = buf.outerZ_buf.data(); + outerRt = buf.outerRt_buf.data(); + outerPhi = buf.outerPhi_buf.data(); + outerEta = buf.outerEta_buf.data(); + outerHighEdgeX = buf.outerHighEdgeX_buf.data(); + outerHighEdgeY = buf.outerHighEdgeY_buf.data(); + outerLowEdgeX = buf.outerLowEdgeX_buf.data(); + outerLowEdgeY = buf.outerLowEdgeY_buf.data(); + anchorLowEdgePhi = buf.anchorLowEdgePhi_buf.data(); + anchorHighEdgePhi = buf.anchorHighEdgePhi_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/ObjectRanges.h b/RecoTracker/LSTCore/src/alpaka/ObjectRanges.h index 09aac58bc8eb4..0e17185104c74 100644 --- a/RecoTracker/LSTCore/src/alpaka/ObjectRanges.h +++ b/RecoTracker/LSTCore/src/alpaka/ObjectRanges.h @@ -40,34 +40,34 @@ namespace lst { template void setData(TBuff& buf) { - hitRanges = alpaka::getPtrNative(buf.hitRanges_buf); - hitRangesLower = alpaka::getPtrNative(buf.hitRangesLower_buf); - hitRangesUpper = alpaka::getPtrNative(buf.hitRangesUpper_buf); - hitRangesnLower = alpaka::getPtrNative(buf.hitRangesnLower_buf); - hitRangesnUpper = alpaka::getPtrNative(buf.hitRangesnUpper_buf); - mdRanges = alpaka::getPtrNative(buf.mdRanges_buf); - segmentRanges = alpaka::getPtrNative(buf.segmentRanges_buf); - trackletRanges = alpaka::getPtrNative(buf.trackletRanges_buf); - tripletRanges = alpaka::getPtrNative(buf.tripletRanges_buf); - trackCandidateRanges = alpaka::getPtrNative(buf.trackCandidateRanges_buf); - quintupletRanges = alpaka::getPtrNative(buf.quintupletRanges_buf); - - nEligibleT5Modules = alpaka::getPtrNative(buf.nEligibleT5Modules_buf); - indicesOfEligibleT5Modules = alpaka::getPtrNative(buf.indicesOfEligibleT5Modules_buf); - - quintupletModuleIndices = alpaka::getPtrNative(buf.quintupletModuleIndices_buf); - quintupletModuleOccupancy = alpaka::getPtrNative(buf.quintupletModuleOccupancy_buf); - miniDoubletModuleIndices = alpaka::getPtrNative(buf.miniDoubletModuleIndices_buf); - miniDoubletModuleOccupancy = alpaka::getPtrNative(buf.miniDoubletModuleOccupancy_buf); - segmentModuleIndices = alpaka::getPtrNative(buf.segmentModuleIndices_buf); - segmentModuleOccupancy = alpaka::getPtrNative(buf.segmentModuleOccupancy_buf); - tripletModuleIndices = alpaka::getPtrNative(buf.tripletModuleIndices_buf); - tripletModuleOccupancy = alpaka::getPtrNative(buf.tripletModuleOccupancy_buf); - - device_nTotalMDs = alpaka::getPtrNative(buf.device_nTotalMDs_buf); - device_nTotalSegs = alpaka::getPtrNative(buf.device_nTotalSegs_buf); - device_nTotalTrips = alpaka::getPtrNative(buf.device_nTotalTrips_buf); - device_nTotalQuints = alpaka::getPtrNative(buf.device_nTotalQuints_buf); + hitRanges = buf.hitRanges_buf.data(); + hitRangesLower = buf.hitRangesLower_buf.data(); + hitRangesUpper = buf.hitRangesUpper_buf.data(); + hitRangesnLower = buf.hitRangesnLower_buf.data(); + hitRangesnUpper = buf.hitRangesnUpper_buf.data(); + mdRanges = buf.mdRanges_buf.data(); + segmentRanges = buf.segmentRanges_buf.data(); + trackletRanges = buf.trackletRanges_buf.data(); + tripletRanges = buf.tripletRanges_buf.data(); + trackCandidateRanges = buf.trackCandidateRanges_buf.data(); + quintupletRanges = buf.quintupletRanges_buf.data(); + + nEligibleT5Modules = buf.nEligibleT5Modules_buf.data(); + indicesOfEligibleT5Modules = buf.indicesOfEligibleT5Modules_buf.data(); + + quintupletModuleIndices = buf.quintupletModuleIndices_buf.data(); + quintupletModuleOccupancy = buf.quintupletModuleOccupancy_buf.data(); + miniDoubletModuleIndices = buf.miniDoubletModuleIndices_buf.data(); + miniDoubletModuleOccupancy = buf.miniDoubletModuleOccupancy_buf.data(); + segmentModuleIndices = buf.segmentModuleIndices_buf.data(); + segmentModuleOccupancy = buf.segmentModuleOccupancy_buf.data(); + tripletModuleIndices = buf.tripletModuleIndices_buf.data(); + tripletModuleOccupancy = buf.tripletModuleOccupancy_buf.data(); + + device_nTotalMDs = buf.device_nTotalMDs_buf.data(); + device_nTotalSegs = buf.device_nTotalSegs_buf.data(); + device_nTotalTrips = buf.device_nTotalTrips_buf.data(); + device_nTotalQuints = buf.device_nTotalQuints_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h b/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h index 2c0b143a6d913..0a14f2cbbd112 100644 --- a/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h +++ b/RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h @@ -34,24 +34,24 @@ namespace lst { template void setData(TBuff& buf) { - pixelIndices = alpaka::getPtrNative(buf.pixelIndices_buf); - T5Indices = alpaka::getPtrNative(buf.T5Indices_buf); - nPixelQuintuplets = alpaka::getPtrNative(buf.nPixelQuintuplets_buf); - totOccupancyPixelQuintuplets = alpaka::getPtrNative(buf.totOccupancyPixelQuintuplets_buf); - isDup = alpaka::getPtrNative(buf.isDup_buf); - score = alpaka::getPtrNative(buf.score_buf); - eta = alpaka::getPtrNative(buf.eta_buf); - phi = alpaka::getPtrNative(buf.phi_buf); - logicalLayers = alpaka::getPtrNative(buf.logicalLayers_buf); - hitIndices = alpaka::getPtrNative(buf.hitIndices_buf); - lowerModuleIndices = alpaka::getPtrNative(buf.lowerModuleIndices_buf); - pixelRadius = alpaka::getPtrNative(buf.pixelRadius_buf); - quintupletRadius = alpaka::getPtrNative(buf.quintupletRadius_buf); - centerX = alpaka::getPtrNative(buf.centerX_buf); - centerY = alpaka::getPtrNative(buf.centerY_buf); - rzChiSquared = alpaka::getPtrNative(buf.rzChiSquared_buf); - rPhiChiSquared = alpaka::getPtrNative(buf.rPhiChiSquared_buf); - rPhiChiSquaredInwards = alpaka::getPtrNative(buf.rPhiChiSquaredInwards_buf); + pixelIndices = buf.pixelIndices_buf.data(); + T5Indices = buf.T5Indices_buf.data(); + nPixelQuintuplets = buf.nPixelQuintuplets_buf.data(); + totOccupancyPixelQuintuplets = buf.totOccupancyPixelQuintuplets_buf.data(); + isDup = buf.isDup_buf.data(); + score = buf.score_buf.data(); + eta = buf.eta_buf.data(); + phi = buf.phi_buf.data(); + logicalLayers = buf.logicalLayers_buf.data(); + hitIndices = buf.hitIndices_buf.data(); + lowerModuleIndices = buf.lowerModuleIndices_buf.data(); + pixelRadius = buf.pixelRadius_buf.data(); + quintupletRadius = buf.quintupletRadius_buf.data(); + centerX = buf.centerX_buf.data(); + centerY = buf.centerY_buf.data(); + rzChiSquared = buf.rzChiSquared_buf.data(); + rPhiChiSquared = buf.rPhiChiSquared_buf.data(); + rPhiChiSquaredInwards = buf.rPhiChiSquaredInwards_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h b/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h index 15e4456c21fc6..aa37b91ebb9da 100644 --- a/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h +++ b/RecoTracker/LSTCore/src/alpaka/PixelTriplet.h @@ -42,28 +42,28 @@ namespace lst { template void setData(TBuff& buf) { - pixelSegmentIndices = alpaka::getPtrNative(buf.pixelSegmentIndices_buf); - tripletIndices = alpaka::getPtrNative(buf.tripletIndices_buf); - nPixelTriplets = alpaka::getPtrNative(buf.nPixelTriplets_buf); - totOccupancyPixelTriplets = alpaka::getPtrNative(buf.totOccupancyPixelTriplets_buf); - pixelRadius = alpaka::getPtrNative(buf.pixelRadius_buf); - tripletRadius = alpaka::getPtrNative(buf.tripletRadius_buf); - pt = alpaka::getPtrNative(buf.pt_buf); - eta = alpaka::getPtrNative(buf.eta_buf); - phi = alpaka::getPtrNative(buf.phi_buf); - eta_pix = alpaka::getPtrNative(buf.eta_pix_buf); - phi_pix = alpaka::getPtrNative(buf.phi_pix_buf); - score = alpaka::getPtrNative(buf.score_buf); - isDup = alpaka::getPtrNative(buf.isDup_buf); - partOfPT5 = alpaka::getPtrNative(buf.partOfPT5_buf); - logicalLayers = alpaka::getPtrNative(buf.logicalLayers_buf); - hitIndices = alpaka::getPtrNative(buf.hitIndices_buf); - lowerModuleIndices = alpaka::getPtrNative(buf.lowerModuleIndices_buf); - centerX = alpaka::getPtrNative(buf.centerX_buf); - centerY = alpaka::getPtrNative(buf.centerY_buf); - rPhiChiSquared = alpaka::getPtrNative(buf.rPhiChiSquared_buf); - rPhiChiSquaredInwards = alpaka::getPtrNative(buf.rPhiChiSquaredInwards_buf); - rzChiSquared = alpaka::getPtrNative(buf.rzChiSquared_buf); + pixelSegmentIndices = buf.pixelSegmentIndices_buf.data(); + tripletIndices = buf.tripletIndices_buf.data(); + nPixelTriplets = buf.nPixelTriplets_buf.data(); + totOccupancyPixelTriplets = buf.totOccupancyPixelTriplets_buf.data(); + pixelRadius = buf.pixelRadius_buf.data(); + tripletRadius = buf.tripletRadius_buf.data(); + pt = buf.pt_buf.data(); + eta = buf.eta_buf.data(); + phi = buf.phi_buf.data(); + eta_pix = buf.eta_pix_buf.data(); + phi_pix = buf.phi_pix_buf.data(); + score = buf.score_buf.data(); + isDup = buf.isDup_buf.data(); + partOfPT5 = buf.partOfPT5_buf.data(); + logicalLayers = buf.logicalLayers_buf.data(); + hitIndices = buf.hitIndices_buf.data(); + lowerModuleIndices = buf.lowerModuleIndices_buf.data(); + centerX = buf.centerX_buf.data(); + centerY = buf.centerY_buf.data(); + rPhiChiSquared = buf.rPhiChiSquared_buf.data(); + rPhiChiSquaredInwards = buf.rPhiChiSquaredInwards_buf.data(); + rzChiSquared = buf.rzChiSquared_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h index 3b700dbb94793..49eb3b1902c9a 100644 --- a/RecoTracker/LSTCore/src/alpaka/Quintuplet.h +++ b/RecoTracker/LSTCore/src/alpaka/Quintuplet.h @@ -46,30 +46,30 @@ namespace lst { template void setData(TBuff& buf) { - tripletIndices = alpaka::getPtrNative(buf.tripletIndices_buf); - lowerModuleIndices = alpaka::getPtrNative(buf.lowerModuleIndices_buf); - nQuintuplets = alpaka::getPtrNative(buf.nQuintuplets_buf); - totOccupancyQuintuplets = alpaka::getPtrNative(buf.totOccupancyQuintuplets_buf); - nMemoryLocations = alpaka::getPtrNative(buf.nMemoryLocations_buf); - innerRadius = alpaka::getPtrNative(buf.innerRadius_buf); - bridgeRadius = alpaka::getPtrNative(buf.bridgeRadius_buf); - outerRadius = alpaka::getPtrNative(buf.outerRadius_buf); - pt = alpaka::getPtrNative(buf.pt_buf); - eta = alpaka::getPtrNative(buf.eta_buf); - phi = alpaka::getPtrNative(buf.phi_buf); - score_rphisum = alpaka::getPtrNative(buf.score_rphisum_buf); - layer = alpaka::getPtrNative(buf.layer_buf); - isDup = alpaka::getPtrNative(buf.isDup_buf); - TightCutFlag = alpaka::getPtrNative(buf.TightCutFlag_buf); - partOfPT5 = alpaka::getPtrNative(buf.partOfPT5_buf); - regressionRadius = alpaka::getPtrNative(buf.regressionRadius_buf); - regressionG = alpaka::getPtrNative(buf.regressionG_buf); - regressionF = alpaka::getPtrNative(buf.regressionF_buf); - logicalLayers = alpaka::getPtrNative(buf.logicalLayers_buf); - hitIndices = alpaka::getPtrNative(buf.hitIndices_buf); - rzChiSquared = alpaka::getPtrNative(buf.rzChiSquared_buf); - chiSquared = alpaka::getPtrNative(buf.chiSquared_buf); - nonAnchorChiSquared = alpaka::getPtrNative(buf.nonAnchorChiSquared_buf); + tripletIndices = buf.tripletIndices_buf.data(); + lowerModuleIndices = buf.lowerModuleIndices_buf.data(); + nQuintuplets = buf.nQuintuplets_buf.data(); + totOccupancyQuintuplets = buf.totOccupancyQuintuplets_buf.data(); + nMemoryLocations = buf.nMemoryLocations_buf.data(); + innerRadius = buf.innerRadius_buf.data(); + bridgeRadius = buf.bridgeRadius_buf.data(); + outerRadius = buf.outerRadius_buf.data(); + pt = buf.pt_buf.data(); + eta = buf.eta_buf.data(); + phi = buf.phi_buf.data(); + score_rphisum = buf.score_rphisum_buf.data(); + layer = buf.layer_buf.data(); + isDup = buf.isDup_buf.data(); + TightCutFlag = buf.TightCutFlag_buf.data(); + partOfPT5 = buf.partOfPT5_buf.data(); + regressionRadius = buf.regressionRadius_buf.data(); + regressionG = buf.regressionG_buf.data(); + regressionF = buf.regressionF_buf.data(); + logicalLayers = buf.logicalLayers_buf.data(); + hitIndices = buf.hitIndices_buf.data(); + rzChiSquared = buf.rzChiSquared_buf.data(); + chiSquared = buf.chiSquared_buf.data(); + nonAnchorChiSquared = buf.nonAnchorChiSquared_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/Segment.h b/RecoTracker/LSTCore/src/alpaka/Segment.h index 76436778802b1..cee59e316064a 100644 --- a/RecoTracker/LSTCore/src/alpaka/Segment.h +++ b/RecoTracker/LSTCore/src/alpaka/Segment.h @@ -50,40 +50,40 @@ namespace lst { template void setData(TBuff& buf) { - dPhis = alpaka::getPtrNative(buf.dPhis_buf); - dPhiMins = alpaka::getPtrNative(buf.dPhiMins_buf); - dPhiMaxs = alpaka::getPtrNative(buf.dPhiMaxs_buf); - dPhiChanges = alpaka::getPtrNative(buf.dPhiChanges_buf); - dPhiChangeMins = alpaka::getPtrNative(buf.dPhiChangeMins_buf); - dPhiChangeMaxs = alpaka::getPtrNative(buf.dPhiChangeMaxs_buf); - innerLowerModuleIndices = alpaka::getPtrNative(buf.innerLowerModuleIndices_buf); - outerLowerModuleIndices = alpaka::getPtrNative(buf.outerLowerModuleIndices_buf); - seedIdx = alpaka::getPtrNative(buf.seedIdx_buf); - mdIndices = alpaka::getPtrNative(buf.mdIndices_buf); - nMemoryLocations = alpaka::getPtrNative(buf.nMemoryLocations_buf); - innerMiniDoubletAnchorHitIndices = alpaka::getPtrNative(buf.innerMiniDoubletAnchorHitIndices_buf); - outerMiniDoubletAnchorHitIndices = alpaka::getPtrNative(buf.outerMiniDoubletAnchorHitIndices_buf); - charge = alpaka::getPtrNative(buf.charge_buf); - superbin = alpaka::getPtrNative(buf.superbin_buf); - nSegments = alpaka::getPtrNative(buf.nSegments_buf); - totOccupancySegments = alpaka::getPtrNative(buf.totOccupancySegments_buf); - pLSHitsIdxs = alpaka::getPtrNative(buf.pLSHitsIdxs_buf); - pixelType = alpaka::getPtrNative(buf.pixelType_buf); - isQuad = alpaka::getPtrNative(buf.isQuad_buf); - isDup = alpaka::getPtrNative(buf.isDup_buf); - partOfPT5 = alpaka::getPtrNative(buf.partOfPT5_buf); - ptIn = alpaka::getPtrNative(buf.ptIn_buf); - ptErr = alpaka::getPtrNative(buf.ptErr_buf); - px = alpaka::getPtrNative(buf.px_buf); - py = alpaka::getPtrNative(buf.py_buf); - pz = alpaka::getPtrNative(buf.pz_buf); - etaErr = alpaka::getPtrNative(buf.etaErr_buf); - eta = alpaka::getPtrNative(buf.eta_buf); - phi = alpaka::getPtrNative(buf.phi_buf); - score = alpaka::getPtrNative(buf.score_buf); - circleCenterX = alpaka::getPtrNative(buf.circleCenterX_buf); - circleCenterY = alpaka::getPtrNative(buf.circleCenterY_buf); - circleRadius = alpaka::getPtrNative(buf.circleRadius_buf); + dPhis = buf.dPhis_buf.data(); + dPhiMins = buf.dPhiMins_buf.data(); + dPhiMaxs = buf.dPhiMaxs_buf.data(); + dPhiChanges = buf.dPhiChanges_buf.data(); + dPhiChangeMins = buf.dPhiChangeMins_buf.data(); + dPhiChangeMaxs = buf.dPhiChangeMaxs_buf.data(); + innerLowerModuleIndices = buf.innerLowerModuleIndices_buf.data(); + outerLowerModuleIndices = buf.outerLowerModuleIndices_buf.data(); + seedIdx = buf.seedIdx_buf.data(); + mdIndices = buf.mdIndices_buf.data(); + nMemoryLocations = buf.nMemoryLocations_buf.data(); + innerMiniDoubletAnchorHitIndices = buf.innerMiniDoubletAnchorHitIndices_buf.data(); + outerMiniDoubletAnchorHitIndices = buf.outerMiniDoubletAnchorHitIndices_buf.data(); + charge = buf.charge_buf.data(); + superbin = buf.superbin_buf.data(); + nSegments = buf.nSegments_buf.data(); + totOccupancySegments = buf.totOccupancySegments_buf.data(); + pLSHitsIdxs = buf.pLSHitsIdxs_buf.data(); + pixelType = buf.pixelType_buf.data(); + isQuad = buf.isQuad_buf.data(); + isDup = buf.isDup_buf.data(); + partOfPT5 = buf.partOfPT5_buf.data(); + ptIn = buf.ptIn_buf.data(); + ptErr = buf.ptErr_buf.data(); + px = buf.px_buf.data(); + py = buf.py_buf.data(); + pz = buf.pz_buf.data(); + etaErr = buf.etaErr_buf.data(); + eta = buf.eta_buf.data(); + phi = buf.phi_buf.data(); + score = buf.score_buf.data(); + circleCenterX = buf.circleCenterX_buf.data(); + circleCenterY = buf.circleCenterY_buf.data(); + circleRadius = buf.circleRadius_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h index 835647c65e4bd..03e853cea7d7b 100644 --- a/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h +++ b/RecoTracker/LSTCore/src/alpaka/TrackCandidate.h @@ -34,23 +34,23 @@ namespace lst { template void setData(TBuff& buf) { - trackCandidateType = alpaka::getPtrNative(buf.trackCandidateType_buf); - directObjectIndices = alpaka::getPtrNative(buf.directObjectIndices_buf); - objectIndices = alpaka::getPtrNative(buf.objectIndices_buf); - nTrackCandidates = alpaka::getPtrNative(buf.nTrackCandidates_buf); - nTrackCandidatespT3 = alpaka::getPtrNative(buf.nTrackCandidatespT3_buf); - nTrackCandidatespT5 = alpaka::getPtrNative(buf.nTrackCandidatespT5_buf); - nTrackCandidatespLS = alpaka::getPtrNative(buf.nTrackCandidatespLS_buf); - nTrackCandidatesT5 = alpaka::getPtrNative(buf.nTrackCandidatesT5_buf); - - logicalLayers = alpaka::getPtrNative(buf.logicalLayers_buf); - hitIndices = alpaka::getPtrNative(buf.hitIndices_buf); - pixelSeedIndex = alpaka::getPtrNative(buf.pixelSeedIndex_buf); - lowerModuleIndices = alpaka::getPtrNative(buf.lowerModuleIndices_buf); - - centerX = alpaka::getPtrNative(buf.centerX_buf); - centerY = alpaka::getPtrNative(buf.centerY_buf); - radius = alpaka::getPtrNative(buf.radius_buf); + trackCandidateType = buf.trackCandidateType_buf.data(); + directObjectIndices = buf.directObjectIndices_buf.data(); + objectIndices = buf.objectIndices_buf.data(); + nTrackCandidates = buf.nTrackCandidates_buf.data(); + nTrackCandidatespT3 = buf.nTrackCandidatespT3_buf.data(); + nTrackCandidatespT5 = buf.nTrackCandidatespT5_buf.data(); + nTrackCandidatespLS = buf.nTrackCandidatespLS_buf.data(); + nTrackCandidatesT5 = buf.nTrackCandidatesT5_buf.data(); + + logicalLayers = buf.logicalLayers_buf.data(); + hitIndices = buf.hitIndices_buf.data(); + pixelSeedIndex = buf.pixelSeedIndex_buf.data(); + lowerModuleIndices = buf.lowerModuleIndices_buf.data(); + + centerX = buf.centerX_buf.data(); + centerY = buf.centerY_buf.data(); + radius = buf.radius_buf.data(); } }; diff --git a/RecoTracker/LSTCore/src/alpaka/Triplet.h b/RecoTracker/LSTCore/src/alpaka/Triplet.h index 9f3521e712ed6..3744dfb69e262 100644 --- a/RecoTracker/LSTCore/src/alpaka/Triplet.h +++ b/RecoTracker/LSTCore/src/alpaka/Triplet.h @@ -36,24 +36,24 @@ namespace lst { #endif template void setData(TBuff& buf) { - segmentIndices = alpaka::getPtrNative(buf.segmentIndices_buf); - lowerModuleIndices = alpaka::getPtrNative(buf.lowerModuleIndices_buf); - nTriplets = alpaka::getPtrNative(buf.nTriplets_buf); - totOccupancyTriplets = alpaka::getPtrNative(buf.totOccupancyTriplets_buf); - nMemoryLocations = alpaka::getPtrNative(buf.nMemoryLocations_buf); - logicalLayers = alpaka::getPtrNative(buf.logicalLayers_buf); - hitIndices = alpaka::getPtrNative(buf.hitIndices_buf); - betaIn = alpaka::getPtrNative(buf.betaIn_buf); - circleRadius = alpaka::getPtrNative(buf.circleRadius_buf); - circleCenterX = alpaka::getPtrNative(buf.circleCenterX_buf); - circleCenterY = alpaka::getPtrNative(buf.circleCenterY_buf); - partOfPT5 = alpaka::getPtrNative(buf.partOfPT5_buf); - partOfT5 = alpaka::getPtrNative(buf.partOfT5_buf); - partOfPT3 = alpaka::getPtrNative(buf.partOfPT3_buf); + segmentIndices = buf.segmentIndices_buf.data(); + lowerModuleIndices = buf.lowerModuleIndices_buf.data(); + nTriplets = buf.nTriplets_buf.data(); + totOccupancyTriplets = buf.totOccupancyTriplets_buf.data(); + nMemoryLocations = buf.nMemoryLocations_buf.data(); + logicalLayers = buf.logicalLayers_buf.data(); + hitIndices = buf.hitIndices_buf.data(); + betaIn = buf.betaIn_buf.data(); + circleRadius = buf.circleRadius_buf.data(); + circleCenterX = buf.circleCenterX_buf.data(); + circleCenterY = buf.circleCenterY_buf.data(); + partOfPT5 = buf.partOfPT5_buf.data(); + partOfT5 = buf.partOfT5_buf.data(); + partOfPT3 = buf.partOfPT3_buf.data(); #ifdef CUT_VALUE_DEBUG - zOut = alpaka::getPtrNative(buf.zOut_buf); - rtOut = alpaka::getPtrNative(buf.rtOut_buf); - betaInCut = alpaka::getPtrNative(buf.betaInCut_buf); + zOut = buf.zOut_buf.data(); + rtOut = buf.rtOut_buf.data(); + betaInCut = buf.betaInCut_buf.data(); #endif } };