forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
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 cms-sw#10 from fllor/PFRecHitAndCluster_GPU_13_0_0…
…_pre4_stable Add CaloRecHitSoA and PFRecHitSoA and PFRecHitProducerAlpaka
- Loading branch information
Showing
23 changed files
with
874 additions
and
120 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
9 changes: 9 additions & 0 deletions
9
DataFormats/ParticleFlowReco/interface/CaloRecHitHostCollection.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,9 @@ | ||
#ifndef ParticleFlowReco_CaloRecHitHostCollection_h | ||
#define ParticleFlowReco_CaloRecHitHostCollection_h | ||
|
||
#include "DataFormats/Portable/interface/PortableHostCollection.h" | ||
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitSoA.h" | ||
|
||
using CaloRecHitHostCollection = PortableHostCollection<CaloRecHitSoA>; | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef ParticleFlowReco_CaloRecHitSoA_h | ||
#define ParticleFlowReco_CaloRecHitSoA_h | ||
|
||
#include <cstdint> | ||
#include "DataFormats/SoATemplate/interface/SoACommon.h" | ||
#include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
#include "DataFormats/SoATemplate/interface/SoAView.h" | ||
|
||
GENERATE_SOA_LAYOUT(CaloRecHitSoALayout, | ||
SOA_COLUMN(uint32_t, detId), | ||
SOA_COLUMN(float, energy), | ||
SOA_COLUMN(float, time) | ||
) | ||
|
||
using CaloRecHitSoA = CaloRecHitSoALayout<>; | ||
|
||
#endif |
9 changes: 9 additions & 0 deletions
9
DataFormats/ParticleFlowReco/interface/PFRecHitHostCollection.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,9 @@ | ||
#ifndef ParticleFlowReco_PFRecHitHostCollection_h | ||
#define ParticleFlowReco_PFRecHitHostCollection_h | ||
|
||
#include "DataFormats/ParticleFlowReco/interface/PFRecHitSoA.h" | ||
#include "DataFormats/Portable/interface/PortableHostCollection.h" | ||
|
||
using PFRecHitHostCollection = PortableHostCollection<PFRecHitSoA>; | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef ParticleFlowReco_PFRecHitSoA_h | ||
#define ParticleFlowReco_PFRecHitSoA_h | ||
|
||
#include <Eigen/Core> | ||
#include <Eigen/Dense> | ||
|
||
#include "DataFormats/SoATemplate/interface/SoACommon.h" | ||
#include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
#include "DataFormats/SoATemplate/interface/SoAView.h" | ||
|
||
#include "DataFormats/ParticleFlowReco/interface/PFLayer.h" | ||
|
||
using Vec8 = Eigen::Matrix<uint32_t, 8, 1>; | ||
GENERATE_SOA_LAYOUT(PFRecHitSoALayout, | ||
SOA_COLUMN(uint32_t, detId), | ||
SOA_COLUMN(float, energy), | ||
SOA_COLUMN(float, time), | ||
SOA_COLUMN(int, depth), | ||
SOA_COLUMN(PFLayer::Layer, layer), | ||
SOA_EIGEN_COLUMN(Vec8, neighbours), | ||
SOA_SCALAR(uint32_t, size) | ||
) | ||
|
||
using PFRecHitSoA = PFRecHitSoALayout<>; | ||
|
||
#endif |
12 changes: 12 additions & 0 deletions
12
DataFormats/ParticleFlowReco/interface/alpaka/CaloRecHitDeviceCollection.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 ParticleFlowReco_CaloRecHitDeviceCollection_h | ||
#define ParticleFlowReco_CaloRecHitDeviceCollection_h | ||
|
||
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitSoA.h" | ||
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
using CaloRecHitDeviceCollection = PortableCollection<CaloRecHitSoA>; | ||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE | ||
|
||
#endif |
12 changes: 12 additions & 0 deletions
12
DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitDeviceCollection.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 ParticleFlowReco_PFRecHitDeviceCollection_h | ||
#define ParticleFlowReco_PFRecHitDeviceCollection_h | ||
|
||
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
#include "DataFormats/ParticleFlowReco/interface/PFRecHitSoA.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
using PFRecHitDeviceCollection = PortableCollection<PFRecHitSoA>; | ||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "DataFormats/Common/interface/DeviceProduct.h" | ||
#include "DataFormats/Common/interface/Wrapper.h" | ||
#include "DataFormats/Portable/interface/Product.h" | ||
#include "DataFormats/ParticleFlowReco/interface/PFRecHitSoA.h" | ||
#include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitDeviceCollection.h" | ||
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitSoA.h" | ||
#include "DataFormats/ParticleFlowReco/interface/alpaka/CaloRecHitDeviceCollection.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,9 @@ | ||
<lcgdict> | ||
<class name="alpaka_cuda_async::CaloRecHitDeviceCollection" persistent="false"/> | ||
<class name="edm::DeviceProduct<alpaka_cuda_async::CaloRecHitDeviceCollection>" persistent="false"/> | ||
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::CaloRecHitDeviceCollection>>" persistent="false"/> | ||
|
||
<class name="alpaka_cuda_async::PFRecHitDeviceCollection" persistent="false"/> | ||
<class name="edm::DeviceProduct<alpaka_cuda_async::PFRecHitDeviceCollection>" persistent="false"/> | ||
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::PFRecHitDeviceCollection>>" persistent="false"/> | ||
</lcgdict> |
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,6 @@ | ||
#include "DataFormats/Common/interface/Wrapper.h" | ||
#include "DataFormats/Portable/interface/Product.h" | ||
#include "DataFormats/ParticleFlowReco/interface/PFRecHitSoA.h" | ||
#include "DataFormats/ParticleFlowReco/interface/PFRecHitHostCollection.h" | ||
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitSoA.h" | ||
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitHostCollection.h" |
29 changes: 29 additions & 0 deletions
29
DataFormats/ParticleFlowReco/src/alpaka/classes_serial_def.xml
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,29 @@ | ||
<lcgdict> | ||
<class name="CaloRecHitHostCollection"/> | ||
<read | ||
sourceClass="CaloRecHitHostCollection" | ||
targetClass="CaloRecHitHostCollection" | ||
version="[1-]" | ||
source="CaloRecHitSoA layout_;" | ||
target="buffer_,layout_,view_" | ||
embed="false"> | ||
<![CDATA[ | ||
CaloRecHitHostCollection::ROOTReadStreamer(newObj, onfile.layout_); | ||
]]> | ||
</read> | ||
<class name="edm::Wrapper<CaloRecHitHostCollection>" splitLevel="0"/> | ||
|
||
<class name="PFRecHitHostCollection"/> | ||
<read | ||
sourceClass="PFRecHitHostCollection" | ||
targetClass="PFRecHitHostCollection" | ||
version="[1-]" | ||
source="PFRecHitSoA layout_;" | ||
target="buffer_,layout_,view_" | ||
embed="false"> | ||
<![CDATA[ | ||
PFRecHitHostCollection::ROOTReadStreamer(newObj, onfile.layout_); | ||
]]> | ||
</read> | ||
<class name="edm::Wrapper<PFRecHitHostCollection>" splitLevel="0"/> | ||
</lcgdict> |
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 was deleted.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
...ts/ParticleFlowReco/src/classes_def_2.xml → ...mats/ParticleFlowReco/src/classes_def.xml
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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
<use name="FWCore/Framework"/> | ||
<use name="HeterogeneousCore/AlpakaCore"/> | ||
<use name="HeterogeneousCore/AlpakaInterface"/> | ||
<flags ALPAKA_BACKENDS="1"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> |
17 changes: 17 additions & 0 deletions
17
RecoParticleFlow/PFRecHitProducer/interface/alpaka/PFRecHitProducerKernel.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,17 @@ | ||
#ifndef RecoParticleFlow_PFRecHitProducer_PFRecHitProducerKernel_h | ||
#define RecoParticleFlow_PFRecHitProducer_PFRecHitProducerKernel_h | ||
|
||
#include "DataFormats/ParticleFlowReco/interface/alpaka/PFRecHitDeviceCollection.h" | ||
#include "DataFormats/ParticleFlowReco/interface/alpaka/CaloRecHitDeviceCollection.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
|
||
class PFRecHitProducerKernel { | ||
public: | ||
void execute(Queue& queue, const CaloRecHitDeviceCollection& recHits, PFRecHitDeviceCollection& collection) const; | ||
}; | ||
|
||
} // namespace ALPAKA_ACCELERATOR_NAMESPACE | ||
|
||
#endif |
Oops, something went wrong.