CMS 3D CMS Logo

SiPixelDigiErrorsCUDA.h
Go to the documentation of this file.
1 #ifndef CUDADataFormats_SiPixelDigi_interface_SiPixelDigiErrorsCUDA_h
2 #define CUDADataFormats_SiPixelDigi_interface_SiPixelDigiErrorsCUDA_h
3 
4 #include <cuda_runtime.h>
5 
11 
13 public:
15 
16  SiPixelDigiErrorsCUDA() = default;
17  explicit SiPixelDigiErrorsCUDA(size_t maxFedWords, SiPixelFormatterErrors errors, cudaStream_t stream);
18  ~SiPixelDigiErrorsCUDA() = default;
19 
24 
26 
28  SiPixelErrorCompactVector const* error() const { return error_d.get(); }
29 
30  using HostDataError = std::pair<SiPixelErrorCompactVector, cms::cuda::host::unique_ptr<SiPixelErrorCompact[]>>;
31  HostDataError dataErrorToHostAsync(cudaStream_t stream) const;
32 
33  void copyErrorToHostAsync(cudaStream_t stream);
34  int nErrorWords() const { return nErrorWords_; }
35 
36 private:
41  int nErrorWords_ = 0;
42 };
43 
44 #endif // CUDADataFormats_SiPixelDigi_interface_SiPixelDigiErrorsCUDA_h
cms::cuda::host::unique_ptr< SiPixelErrorCompactVector > error_h
std::pair< SiPixelErrorCompactVector, cms::cuda::host::unique_ptr< SiPixelErrorCompact[]> > HostDataError
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
SiPixelDigiErrorsCUDA & operator=(const SiPixelDigiErrorsCUDA &)=delete
cms::cuda::device::unique_ptr< SiPixelErrorCompact[]> data_d
const SiPixelFormatterErrors & formatterErrors() const
cms::cuda::device::unique_ptr< SiPixelErrorCompactVector > error_d
~SiPixelDigiErrorsCUDA()=default
SiPixelFormatterErrors formatterErrors_h
SiPixelErrorCompactVector * error()
std::unique_ptr< T, impl::HostDeleter > unique_ptr
Definition: errors.py:1
void copyErrorToHostAsync(cudaStream_t stream)
SiPixelErrorCompactVector const * error() const
std::map< cms_uint32_t, std::vector< SiPixelRawDataError > > SiPixelFormatterErrors
SiPixelDigiErrorsCUDA()=default
HostDataError dataErrorToHostAsync(cudaStream_t stream) const