File tree Expand file tree Collapse file tree 11 files changed +76
-11
lines changed Expand file tree Collapse file tree 11 files changed +76
-11
lines changed Original file line number Diff line number Diff line change 1+ <use name =" clhep" />
2+ <use name =" rootcore" />
3+ <use name =" rootsmatrix" />
14<use name =" DataFormats/Common" />
25<use name =" DataFormats/CLHEP" />
36<use name =" DataFormats/GeometrySurface" />
47<use name =" DataFormats/Math" />
5- <use name =" rootcore " />
6- <use name =" rootsmatrix " />
7- <use name = " clhep " />
8+ <use name =" DataFormats/Portable " />
9+ <use name =" HeterogeneousCore/AlpakaInterface " />
10+ <flags ALPAKA_BACKENDS = " !serial " />
811<export >
912 <lib name =" 1" />
1013</export >
Original file line number Diff line number Diff line change 1+ #ifndef DataFormats_BeamSpot_interface_BeamSpotHost_h
2+ #define DataFormats_BeamSpot_interface_BeamSpotHost_h
3+
4+ #include "DataFormats/BeamSpot/interface/BeamSpotPOD.h"
5+ #include "DataFormats/Portable/interface/PortableHostObject.h"
6+
7+ // simplified representation of the beamspot data, in host memory
8+ using BeamSpotHost = PortableHostObject < BeamSpotPOD > ;
9+
10+ #endif // DataFormats_BeamSpot_interface_BeamSpotHost_h
Original file line number Diff line number Diff line change 11#ifndef DataFormats_BeamSpot_interface_BeamSpotPOD_h
22#define DataFormats_BeamSpot_interface_BeamSpotPOD_h
33
4- // This struct is a transient-only, simplified representation of the beamspot
5- // data used as the underlying type for data transfers and operations in
4+ // This struct is a simplified representation of the beamspot data
5+ // used as the underlying type for data transfers and operations in
66// heterogeneous code (e.g. in CUDA code).
77
88// The covariance matrix is not used in that code, so is left out here.
99
1010// align to the CUDA L1 cache line size
1111struct alignas (128 ) BeamSpotPOD {
12- float x , y , z ; // position
12+ float x ; // position
13+ float y ;
14+ float z ;
1315 float sigmaZ ;
14- float beamWidthX , beamWidthY ;
15- float dxdz , dydz ;
16- float emittanceX , emittanceY ;
16+ float beamWidthX ;
17+ float beamWidthY ;
18+ float dxdz ;
19+ float dydz ;
20+ float emittanceX ;
21+ float emittanceY ;
1722 float betaStar ;
1823};
1924
Original file line number Diff line number Diff line change 1+ #ifndef DataFormats_BeamSpot_interface_alpaka_BeamSpotDevice_h
2+ #define DataFormats_BeamSpot_interface_alpaka_BeamSpotDevice_h
3+
4+ #include " DataFormats/BeamSpot/interface/BeamSpotHost.h"
5+ #include " DataFormats/BeamSpot/interface/BeamSpotPOD.h"
6+ #include " DataFormats/Portable/interface/alpaka/PortableObject.h"
7+ #include " HeterogeneousCore/AlpakaInterface/interface/config.h"
8+
9+ namespace ALPAKA_ACCELERATOR_NAMESPACE {
10+
11+ // simplified representation of the beamspot data, in device global memory
12+ using BeamSpotDevice = PortableObject<BeamSpotPOD>;
13+
14+ } // namespace ALPAKA_ACCELERATOR_NAMESPACE
15+
16+ // check that the portable device collection for the host device is the same as the portable host collection
17+ ASSERT_DEVICE_MATCHES_HOST_COLLECTION (BeamSpotDevice, BeamSpotHost);
18+
19+ #endif // DataFormats_BeamSpot_interface_alpaka_BeamSpotDevice_h
Original file line number Diff line number Diff line change 1+ #include "DataFormats/BeamSpot/interface/BeamSpotPOD.h"
2+ #include "DataFormats/BeamSpot/interface/alpaka/BeamSpotDevice.h"
3+ #include "DataFormats/Common/interface/DeviceProduct.h"
4+ #include "DataFormats/Common/interface/Wrapper.h"
Original file line number Diff line number Diff line change 1+ <lcgdict >
2+ <class name =" alpaka_cuda_async::BeamSpotDevice" persistent =" false" />
3+ <class name =" edm::DeviceProduct<alpaka_cuda_async::BeamSpotDevice>" persistent =" false" />
4+ <class name =" edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::BeamSpotDevice>>" persistent =" false" />
5+ </lcgdict >
Original file line number Diff line number Diff line change 1+ #include "DataFormats/BeamSpot/interface/BeamSpotPOD.h"
2+ #include "DataFormats/BeamSpot/interface/alpaka/BeamSpotDevice.h"
3+ #include "DataFormats/Common/interface/DeviceProduct.h"
4+ #include "DataFormats/Common/interface/Wrapper.h"
Original file line number Diff line number Diff line change 1+ <lcgdict >
2+ <class name =" alpaka_rocm_async::BeamSpotDevice" persistent =" false" />
3+ <class name =" edm::DeviceProduct<alpaka_rocm_async::BeamSpotDevice>" persistent =" false" />
4+ <class name =" edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::BeamSpotDevice>>" persistent =" false" />
5+ </lcgdict >
Original file line number Diff line number Diff line change 1+ #include " DataFormats/BeamSpot/interface/BeamSpotHost.h"
2+ #include " DataFormats/Portable/interface/PortableHostObjectReadRules.h"
3+
4+ SET_PORTABLEHOSTOBJECT_READ_RULES (BeamSpotHost);
Original file line number Diff line number Diff line change 11#include "DataFormats/BeamSpot/interface/BeamSpot.h"
2+ #include "DataFormats/BeamSpot/interface/BeamSpotHost.h"
23#include "DataFormats/BeamSpot/interface/BeamSpotPOD.h"
34#include "DataFormats/Common/interface/Wrapper.h"
You can’t perform that action at this time.
0 commit comments