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
PixelCPEFastParamsPhase2
=
PixelCPEFastParams<pixelTopology::Phase2>
;
24
25
}
// namespace ALPAKA_ACCELERATOR_NAMESPACE
26
27
namespace
cms::alpakatools
{
28
template
<
typename
TrackerTraits>
29
struct
CopyToDevice
<
PixelCPEFastParamsHost
<TrackerTraits>> {
30
template
<
typename
TQueue>
31
static
auto
copyAsync
(TQueue&
queue
,
PixelCPEFastParamsHost<TrackerTraits>
const
& srcData) {
32
using
TDevice =
typename
alpaka::trait::DevType<TQueue>::type
;
33
PixelCPEFastParamsDevice<TDevice, TrackerTraits>
dstData(
queue
);
34
alpaka::memcpy(
queue
, dstData.
buffer
(), srcData.
buffer
());
35
return
dstData;
36
}
37
};
38
}
// namespace cms::alpakatools
39
40
#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:31
cms::alpakatools::CopyToDevice
Definition:
CopyToDevice.h:32
createBeamHaloJobs.queue
queue
Definition:
createBeamHaloJobs.py:343
cms::alpakatools
Definition:
PortableCollection.h:38
CopyToDevice.h
ALPAKA_ACCELERATOR_NAMESPACE
Definition:
SiPixelCablingSoAESProducer.cc:21
gainCalibHelper::gainCalibPI::type
type
Definition:
SiPixelGainCalibHelper.h:40
ALPAKA_ACCELERATOR_NAMESPACE::PixelCPEFastParamsPhase2
PixelCPEFastParams< pixelTopology::Phase2 > PixelCPEFastParamsPhase2
Definition:
PixelCPEFastParamsCollection.h:23
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