CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BeamSpotCUDA.h
Go to the documentation of this file.
1 #ifndef CUDADataFormats_BeamSpot_interface_BeamSpotCUDA_h
2 #define CUDADataFormats_BeamSpot_interface_BeamSpotCUDA_h
3 
4 #include <cuda_runtime.h>
5 
8 
9 class BeamSpotCUDA {
10 public:
11  // default constructor, required by cms::cuda::Product<BeamSpotCUDA>
12  BeamSpotCUDA() = default;
13 
14  // constructor that allocates cached device memory on the given CUDA stream
15  BeamSpotCUDA(cudaStream_t stream) { data_d_ = cms::cuda::make_device_unique<BeamSpotPOD>(stream); }
16 
17  // movable, non-copiable
18  BeamSpotCUDA(BeamSpotCUDA const&) = delete;
19  BeamSpotCUDA(BeamSpotCUDA&&) = default;
20  BeamSpotCUDA& operator=(BeamSpotCUDA const&) = delete;
21  BeamSpotCUDA& operator=(BeamSpotCUDA&&) = default;
22 
23  BeamSpotPOD* data() { return data_d_.get(); }
24  BeamSpotPOD const* data() const { return data_d_.get(); }
25 
28 
29 private:
31 };
32 
33 #endif // CUDADataFormats_BeamSpot_interface_BeamSpotCUDA_h
BeamSpotPOD const * data() const
Definition: BeamSpotCUDA.h:24
cms::cuda::device::unique_ptr< BeamSpotPOD > & ptr()
Definition: BeamSpotCUDA.h:26
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
BeamSpotPOD * data()
Definition: BeamSpotCUDA.h:23
BeamSpotCUDA(cudaStream_t stream)
Definition: BeamSpotCUDA.h:15
cms::cuda::device::unique_ptr< BeamSpotPOD > data_d_
Definition: BeamSpotCUDA.h:30
BeamSpotCUDA & operator=(BeamSpotCUDA const &)=delete
cms::cuda::device::unique_ptr< BeamSpotPOD > const & ptr() const
Definition: BeamSpotCUDA.h:27
BeamSpotCUDA()=default