src
RecoLocalTracker
SiPixelRecHits
interface
alpaka
PixelCPEFastParamsCollection.h
Go to the documentation of this file.
1
#ifndef RecoLocalTracker_SiPixelRecHits_interface_alpaka_PixelCPEFastParamsCollection_h
2
#define RecoLocalTracker_SiPixelRecHits_interface_alpaka_PixelCPEFastParamsCollection_h
3
4
#include <cstdint>
5
#include <alpaka/alpaka.hpp>
6
#include "
HeterogeneousCore/AlpakaInterface/interface/config.h
"
7
#include "
RecoLocalTracker/SiPixelRecHits/interface/PixelCPEFastParamsHost.h
"
8
#include "
RecoLocalTracker/SiPixelRecHits/interface/PixelCPEFastParamsDevice.h
"
9
#include "
DataFormats/Portable/interface/alpaka/PortableCollection.h
"
10
#include "
HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h
"
11
12
// TODO: The class is created via inheritance of the PortableCollection.
13
// This is generally discouraged, and should be done via composition.
14
// See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
15
namespace
ALPAKA_ACCELERATOR_NAMESPACE
{
16
17
template
<
typename
TrackerTraits>
18
using
PixelCPEFastParams
= std::conditional_t<std::is_same_v<Device, alpaka::DevCpu>,
19
PixelCPEFastParamsHost<TrackerTraits>
,
20
PixelCPEFastParamsDevice<Device, TrackerTraits>
>;
21
22
using
PixelCPEFastParamsPhase1
=
PixelCPEFastParams<pixelTopology::Phase1>
;
23
using
PixelCPEFastParamsHIonPhase1
=
PixelCPEFastParams<pixelTopology::HIonPhase1>
;
24
using
PixelCPEFastParamsPhase2
=
PixelCPEFastParams<pixelTopology::Phase2>
;
25
26
}
// namespace ALPAKA_ACCELERATOR_NAMESPACE
27
28
namespace
cms::alpakatools
{
29
template
<
typename
TrackerTraits>
30
struct
CopyToDevice
<
PixelCPEFastParamsHost
<TrackerTraits>> {
31
template
<
typename
TQueue>
32
static
auto
copyAsync
(TQueue&
queue
,
PixelCPEFastParamsHost<TrackerTraits>
const
& srcData) {
33
using
TDevice =
typename
alpaka::trait::DevType<TQueue>::type
;
34
PixelCPEFastParamsDevice<TDevice, TrackerTraits>
dstData(
queue
);
35
alpaka::memcpy(
queue
, dstData.
buffer
(), srcData.
buffer
());
36
return
dstData;
37
}
38
};
39
}
// namespace cms::alpakatools
40
41
#endif // DataFormats_PixelCPEFastParamsoA_interface_alpaka_PixelCPEFastParamsCollection_h
PixelCPEFastParamsDevice.h
PixelCPEFastParamsHost.h
PixelCPEFastParamsDevice
Definition:
PixelCPEFastParamsDevice.h:10
cms::alpakatools::CopyToDevice< PixelCPEFastParamsHost< TrackerTraits > >::copyAsync
static auto copyAsync(TQueue &queue, PixelCPEFastParamsHost< TrackerTraits > const &srcData)
Definition:
PixelCPEFastParamsCollection.h:32
cms::alpakatools::CopyToDevice
Definition:
CopyToDevice.h:32
createBeamHaloJobs.queue
queue
Definition:
createBeamHaloJobs.py:343
cms::alpakatools
Definition:
HcalRecoParamWithPulseShapeHost.h:11
CopyToDevice.h
ALPAKA_ACCELERATOR_NAMESPACE
Definition:
SiPixelCablingSoAESProducer.cc:21
ALPAKA_ACCELERATOR_NAMESPACE::PixelCPEFastParamsHIonPhase1
PixelCPEFastParams< pixelTopology::HIonPhase1 > PixelCPEFastParamsHIonPhase1
Definition:
PixelCPEFastParamsCollection.h:23
gainCalibHelper::gainCalibPI::type
type
Definition:
SiPixelGainCalibHelper.h:40
ALPAKA_ACCELERATOR_NAMESPACE::PixelCPEFastParamsPhase2
PixelCPEFastParams< pixelTopology::Phase2 > PixelCPEFastParamsPhase2
Definition:
PixelCPEFastParamsCollection.h:24
PortableCollection.h
PixelCPEFastParamsHost::buffer
Buffer buffer()
Definition:
PixelCPEFastParamsHost.h:43
ALPAKA_ACCELERATOR_NAMESPACE::PixelCPEFastParams
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, PixelCPEFastParamsHost< TrackerTraits >, PixelCPEFastParamsDevice< Device, TrackerTraits > > PixelCPEFastParams
Definition:
PixelCPEFastParamsCollection.h:20
ALPAKA_ACCELERATOR_NAMESPACE::PixelCPEFastParamsPhase1
PixelCPEFastParams< pixelTopology::Phase1 > PixelCPEFastParamsPhase1
Definition:
PixelCPEFastParamsCollection.h:22
PixelCPEFastParamsDevice::buffer
Buffer buffer()
Definition:
PixelCPEFastParamsDevice.h:31
config.h
PixelCPEFastParamsHost
Definition:
PixelCPEFastParamsHost.h:18
Generated for CMSSW Reference Manual by
1.8.14