CMS 3D CMS Logo

TestCUDAAnalyzerGPUKernel.h
Go to the documentation of this file.
1 #ifndef HeterogeneousCore_CUDACore_TestCUDAAnalyzerGPUKernel_h
2 #define HeterogeneousCore_CUDACore_TestCUDAAnalyzerGPUKernel_h
3 
5 
6 #include <cuda_runtime.h>
7 
9 public:
10  static constexpr int NUM_VALUES = 4000;
11 
12  TestCUDAAnalyzerGPUKernel(cudaStream_t stream);
13  ~TestCUDAAnalyzerGPUKernel() = default;
14 
15  // thread safe
16  void analyzeAsync(const float* d_input, cudaStream_t stream);
17  float value(cudaStream_t stream) const;
18 
19 private:
20  cms::cuda::device::unique_ptr<float[]> sum_; // all writes are atomic in CUDA
21 };
22 
23 #endif
TestCUDAAnalyzerGPUKernel(cudaStream_t stream)
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
void analyzeAsync(const float *d_input, cudaStream_t stream)
~TestCUDAAnalyzerGPUKernel()=default
float value(cudaStream_t stream) const
cms::cuda::device::unique_ptr< float[]> sum_