-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
88 additions
and
1 deletion.
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
13 changes: 13 additions & 0 deletions
13
DataFormats/HcalRecHit/interface/HcalRecHitHostCollection.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,13 @@ | ||
#ifndef DataFormats_HcalRecHit_HcalRecHitHostCollection_h | ||
#define DataFormats_HcalRecHit_HcalRecHitHostCollection_h | ||
|
||
#include "DataFormats/Portable/interface/PortableHostCollection.h" | ||
#include "DataFormats/HcalRecHit/interface/HcalRecHitSoA.h" | ||
|
||
namespace hcal { | ||
|
||
// HcalRecHitSoA in host memory | ||
using RecHitHostCollection = PortableHostCollection<HcalRecHitSoA>; | ||
} // namespace hcal | ||
|
||
#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,19 @@ | ||
#ifndef DataFormats_HcalRecHit_HcalRecHitSoA_h | ||
#define DataFormats_HcalRecHit_HcalRecHitSoA_h | ||
|
||
#include "DataFormats/SoATemplate/interface/SoALayout.h" | ||
|
||
namespace hcal { | ||
|
||
GENERATE_SOA_LAYOUT(HcalRecHitSoALayout, | ||
SOA_SCALAR(uint32_t, size), | ||
SOA_COLUMN(uint32_t, detId), | ||
SOA_COLUMN(float, energy), | ||
SOA_COLUMN(float, chi2), | ||
SOA_COLUMN(float, energyM0), | ||
SOA_COLUMN(float, timeM0)) | ||
|
||
using HcalRecHitSoA = HcalRecHitSoALayout<>; | ||
} // namespace hcal | ||
|
||
#endif |
22 changes: 22 additions & 0 deletions
22
DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.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,22 @@ | ||
#ifndef DataFormats_HcalRecHit_alpaka_HcalRecHitDeviceCollection_h | ||
#define DataFormats_HcalRecHit_alpaka_HcalRecHitDeviceCollection_h | ||
|
||
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h" | ||
#include "DataFormats/HcalRecHit/interface/HcalRecHitSoA.h" | ||
#include "HeterogeneousCore/AlpakaInterface/interface/config.h" | ||
|
||
namespace ALPAKA_ACCELERATOR_NAMESPACE { | ||
|
||
namespace hcal { | ||
|
||
// make the names from the top-level hcal namespace visible for unqualified lookup | ||
// inside the ALPAKA_ACCELERATOR_NAMESPACE::hcal namespace | ||
using namespace ::hcal; | ||
|
||
// HcalRecHitSoA in device global memory | ||
using RecHitDeviceCollection = PortableCollection<HcalRecHitSoA>; | ||
} // namespace hcal | ||
|
||
} // 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,4 @@ | ||
#include "DataFormats/Common/interface/DeviceProduct.h" | ||
#include "DataFormats/Common/interface/Wrapper.h" | ||
#include "DataFormats/HcalRecHit/interface/HcalRecHitSoA.h" | ||
#include "DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.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,5 @@ | ||
<lcgdict> | ||
<class name="alpaka_cuda_async::hcal::RecHitDeviceCollection" persistent="false"/> | ||
<class name="edm::DeviceProduct<alpaka_cuda_async::hcal::RecHitDeviceCollection>" persistent="false"/> | ||
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::hcal::RecHitDeviceCollection>>" 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,4 @@ | ||
#include "DataFormats/Common/interface/DeviceProduct.h" | ||
#include "DataFormats/Common/interface/Wrapper.h" | ||
#include "DataFormats/HcalRecHit/interface/HcalRecHitSoA.h" | ||
#include "DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.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,5 @@ | ||
<lcgdict> | ||
<class name="alpaka_rocm_async::hcal::RecHitDeviceCollection" persistent="false"/> | ||
<class name="edm::DeviceProduct<alpaka_rocm_async::hcal::RecHitDeviceCollection>" persistent="false"/> | ||
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::hcal::RecHitDeviceCollection>>" 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,4 @@ | ||
#include "DataFormats/HcalRecHit/interface/HcalRecHitHostCollection.h" | ||
#include "DataFormats/Portable/interface/PortableHostCollectionReadRules.h" | ||
|
||
SET_PORTABLEHOSTCOLLECTION_READ_RULES(hcal::RecHitHostCollection); |
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