src
CUDADataFormats
Track
interface
TrackSoAHeterogeneousHost.h
Go to the documentation of this file.
1
#ifndef CUDADataFormats_Track_TrackHeterogeneousHost_H
2
#define CUDADataFormats_Track_TrackHeterogeneousHost_H
3
4
#include <cstdint>
5
6
#include "
CUDADataFormats/Track/interface/PixelTrackUtilities.h
"
7
#include "
CUDADataFormats/Common/interface/PortableHostCollection.h
"
8
9
// TODO: The class is created via inheritance of the PortableHostCollection.
10
// This is generally discouraged, and should be done via composition.
11
// See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
12
template
<
typename
TrackerTraits>
13
class
TrackSoAHeterogeneousHost
:
public
cms::cuda::PortableHostCollection
<TrackLayout<TrackerTraits>> {
14
public
:
15
static
constexpr int32_t
S
= TrackerTraits::maxNumberOfTuples;
//TODO: this could be made configurable at runtime
16
explicit
TrackSoAHeterogeneousHost
() :
cms
::
cuda
::
PortableHostCollection
<
TrackLayout
<TrackerTraits>>(
S
) {}
17
18
using
cms::cuda::PortableHostCollection<TrackLayout<TrackerTraits>
>
::view
;
19
using
cms::cuda::PortableHostCollection<TrackLayout<TrackerTraits>
>
::const_view
;
20
using
cms::cuda::PortableHostCollection<TrackLayout<TrackerTraits>
>
::buffer
;
21
using
cms::cuda::PortableHostCollection<TrackLayout<TrackerTraits>
>
::bufferSize
;
22
23
// Constructor which specifies the SoA size
24
explicit
TrackSoAHeterogeneousHost
(cudaStream_t
stream
)
25
:
cms
::
cuda
::
PortableHostCollection
<
TrackLayout
<TrackerTraits>>(
S
,
stream
) {}
26
};
27
28
namespace
pixelTrack
{
29
30
using
TrackSoAHostPhase1
=
TrackSoAHeterogeneousHost<pixelTopology::Phase1>
;
31
using
TrackSoAHostPhase2
=
TrackSoAHeterogeneousHost<pixelTopology::Phase2>
;
32
33
}
// namespace pixelTrack
34
35
#endif // CUDADataFormats_Track_TrackHeterogeneousT_H
TrackLayout
typename TrackSoA< TrackerTraits >::template TrackSoALayout<> TrackLayout
Definition:
PixelTrackUtilities.h:233
pixelTrack
Definition:
PixelTrackUtilities.h:10
cms::cuda::PortableHostCollection< TrackLayout< TrackerTraits > >::buffer
Buffer & buffer()
Definition:
PortableHostCollection.h:63
TrackSoAHeterogeneousHost::TrackSoAHeterogeneousHost
TrackSoAHeterogeneousHost(cudaStream_t stream)
Definition:
TrackSoAHeterogeneousHost.h:24
cms::cuda::stream
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition:
HistoContainer.h:51
cms::cuda::PortableHostCollection< TrackLayout< TrackerTraits > >::view
View & view()
Definition:
PortableHostCollection.h:52
PortableHostCollection.h
cms::cuda::PortableHostCollection
Definition:
PortableHostCollection.h:13
PortableHostCollection
Definition:
PortableHostCollection.h:15
PixelTrackUtilities.h
TrackSoAHeterogeneousHost::TrackSoAHeterogeneousHost
TrackSoAHeterogeneousHost()
Definition:
TrackSoAHeterogeneousHost.h:16
TrackSoAHeterogeneousHost
Definition:
TrackSoAHeterogeneousHost.h:13
S
Definition:
CSCDBL1TPParametersExtended.h:16
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:41
cms::cuda::PortableHostCollection< TrackLayout< TrackerTraits > >::const_view
ConstView const & const_view() const
Definition:
PortableHostCollection.h:54
ecalDigis_cff.cuda
cuda
Definition:
ecalDigis_cff.py:35
cms::cuda::PortableHostCollection< TrackLayout< TrackerTraits > >::bufferSize
size_t bufferSize() const
Definition:
PortableHostCollection.h:67
Generated for CMSSW Reference Manual by
1.8.14