HeterogeneousCore
CUDATest
plugins
TestCUDAAnalyzerGPUKernel.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_CUDACore_TestCUDAAnalyzerGPUKernel_h
2
#define HeterogeneousCore_CUDACore_TestCUDAAnalyzerGPUKernel_h
3
4
#include "
HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h
"
5
6
#include <cuda_runtime.h>
7
8
class
TestCUDAAnalyzerGPUKernel
{
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::NUM_VALUES
static constexpr int NUM_VALUES
Definition:
TestCUDAAnalyzerGPUKernel.h:10
cms::cuda::stream
cudaStream_t stream
Definition:
HistoContainer.h:57
device_unique_ptr.h
TestCUDAAnalyzerGPUKernel::analyzeAsync
void analyzeAsync(const float *d_input, cudaStream_t stream)
TestCUDAAnalyzerGPUKernel::~TestCUDAAnalyzerGPUKernel
~TestCUDAAnalyzerGPUKernel()=default
TestCUDAAnalyzerGPUKernel::value
float value(cudaStream_t stream) const
TestCUDAAnalyzerGPUKernel::TestCUDAAnalyzerGPUKernel
TestCUDAAnalyzerGPUKernel(cudaStream_t stream)
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition:
device_unique_ptr.h:33
TestCUDAAnalyzerGPUKernel
Definition:
TestCUDAAnalyzerGPUKernel.h:8
TestCUDAAnalyzerGPUKernel::sum_
cms::cuda::device::unique_ptr< float[]> sum_
Definition:
TestCUDAAnalyzerGPUKernel.h:20
Generated for CMSSW Reference Manual by
1.8.16