Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:46

0001 #ifndef CUDADataFormats_Vertex_ZVertexHeterogeneousHost_H
0002 #define CUDADataFormats_Vertex_ZVertexHeterogeneousHost_H
0003 
0004 #include <cstdint>
0005 
0006 #include "CUDADataFormats/Vertex/interface/ZVertexUtilities.h"
0007 #include "CUDADataFormats/Common/interface/PortableHostCollection.h"
0008 
0009 // TODO: The class is created via inheritance of the PortableHostCollection.
0010 // This is generally discouraged, and should be done via composition.
0011 // See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
0012 template <int32_t S>
0013 class ZVertexSoAHeterogeneousHost : public cms::cuda::PortableHostCollection<ZVertexSoAHeterogeneousLayout<>> {
0014 public:
0015   explicit ZVertexSoAHeterogeneousHost() : cms::cuda::PortableHostCollection<ZVertexSoAHeterogeneousLayout<>>(S) {}
0016 
0017   // Constructor which specifies the SoA size and CUDA stream
0018   explicit ZVertexSoAHeterogeneousHost(cudaStream_t stream)
0019       : PortableHostCollection<ZVertexSoAHeterogeneousLayout<>>(S, stream) {}
0020 };
0021 
0022 using ZVertexSoAHost = ZVertexSoAHeterogeneousHost<zVertex::utilities::MAXTRACKS>;
0023 
0024 #endif  // CUDADataFormats_Vertex_ZVertexHeterogeneousHost_H