forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from SegmentLinking/segments_soa
Migrate segments to SoA+PortableCollection
- Loading branch information
Showing
17 changed files
with
557 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#ifndef RecoTracker_LSTCore_interface_SegmentsSoA_h | ||
#define RecoTracker_LSTCore_interface_SegmentsSoA_h | ||
|
||
#include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
#include "DataFormats/Portable/interface/PortableCollection.h" | ||
|
||
#include "RecoTracker/LSTCore/interface/Constants.h" | ||
|
||
namespace lst { | ||
|
||
GENERATE_SOA_LAYOUT(SegmentsSoALayout, | ||
SOA_COLUMN(FPX, dPhis), | ||
SOA_COLUMN(FPX, dPhiMins), | ||
SOA_COLUMN(FPX, dPhiMaxs), | ||
SOA_COLUMN(FPX, dPhiChanges), | ||
SOA_COLUMN(FPX, dPhiChangeMins), | ||
SOA_COLUMN(FPX, dPhiChangeMaxs), | ||
SOA_COLUMN(uint16_t, innerLowerModuleIndices), | ||
SOA_COLUMN(uint16_t, outerLowerModuleIndices), | ||
SOA_COLUMN(Params_LS::ArrayUxLayers, mdIndices), | ||
SOA_COLUMN(unsigned int, innerMiniDoubletAnchorHitIndices), | ||
SOA_COLUMN(unsigned int, outerMiniDoubletAnchorHitIndices) | ||
//SOA_SCALAR(unsigned int, nMemoryLocations) | ||
) | ||
|
||
GENERATE_SOA_LAYOUT(SegmentsOccupancySoALayout, | ||
SOA_COLUMN(unsigned int, nSegments), //number of segments per inner lower module | ||
SOA_COLUMN(unsigned int, totOccupancySegments)) | ||
|
||
GENERATE_SOA_LAYOUT(SegmentsPixelSoALayout, | ||
SOA_COLUMN(unsigned int, seedIdx), | ||
SOA_COLUMN(int, charge), | ||
SOA_COLUMN(int, superbin), | ||
SOA_COLUMN(uint4, pLSHitsIdxs), | ||
SOA_COLUMN(PixelType, pixelType), | ||
SOA_COLUMN(char, isQuad), | ||
SOA_COLUMN(char, isDup), | ||
SOA_COLUMN(bool, partOfPT5), | ||
SOA_COLUMN(float, ptIn), | ||
SOA_COLUMN(float, ptErr), | ||
SOA_COLUMN(float, px), | ||
SOA_COLUMN(float, py), | ||
SOA_COLUMN(float, pz), | ||
SOA_COLUMN(float, etaErr), | ||
SOA_COLUMN(float, eta), | ||
SOA_COLUMN(float, phi), | ||
SOA_COLUMN(float, score), | ||
SOA_COLUMN(float, circleCenterX), | ||
SOA_COLUMN(float, circleCenterY), | ||
SOA_COLUMN(float, circleRadius)) | ||
|
||
using SegmentsSoA = SegmentsSoALayout<>; | ||
using SegmentsOccupancySoA = SegmentsOccupancySoALayout<>; | ||
using SegmentsPixelSoA = SegmentsPixelSoALayout<>; | ||
|
||
using Segments = SegmentsSoA::View; | ||
using SegmentsConst = SegmentsSoA::ConstView; | ||
using SegmentsOccupancy = SegmentsOccupancySoA::View; | ||
using SegmentsOccupancyConst = SegmentsOccupancySoA::ConstView; | ||
using SegmentsPixel = SegmentsPixelSoA::View; | ||
using SegmentsPixelConst = SegmentsPixelSoA::ConstView; | ||
|
||
using SegmentsHostCollection = PortableHostMultiCollection<SegmentsSoA, SegmentsOccupancySoA, SegmentsPixelSoA>; | ||
|
||
} // namespace lst | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
RecoTracker/LSTCore/interface/alpaka/MiniDoubletsDeviceCollection.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
RecoTracker/LSTCore/interface/alpaka/SegmentsDeviceCollection.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef RecoTracker_LSTCore_interface_alpaka_SegmentsDeviceCollection_h | ||
#define RecoTracker_LSTCore_interface_alpaka_SegmentsDeviceCollection_h | ||
|
||
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h" | ||
|
||
#include "RecoTracker/LSTCore/interface/SegmentsSoA.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE::lst { | ||
using SegmentsDeviceCollection = PortableCollection3<SegmentsSoA, SegmentsOccupancySoA, SegmentsPixelSoA>; | ||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst | ||
|
||
#endif |
Oops, something went wrong.