CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
TestCUDAProducerGPUKernel Class Reference

#include <TestCUDAProducerGPUKernel.h>

Public Member Functions

cms::cuda::device::unique_ptr< float[]> runAlgo (const std::string &label, cudaStream_t stream) const
 
cms::cuda::device::unique_ptr< float[]> runAlgo (const std::string &label, const float *d_input, cudaStream_t stream) const
 
void runSimpleAlgo (float *d_data, cudaStream_t stream) const
 
 TestCUDAProducerGPUKernel ()=default
 
 ~TestCUDAProducerGPUKernel ()=default
 

Static Public Attributes

static constexpr int NUM_VALUES = 4000
 

Detailed Description

This class models the actual CUDA implementation of an algorithm.

Memory is allocated dynamically with the allocator in cms::cuda.

The algorithm is intended to waste time with large matrix operations so that the asynchronous nature of the CUDA integration becomes visible with debug prints.

Definition at line 19 of file TestCUDAProducerGPUKernel.h.

Constructor & Destructor Documentation

◆ TestCUDAProducerGPUKernel()

TestCUDAProducerGPUKernel::TestCUDAProducerGPUKernel ( )
default

◆ ~TestCUDAProducerGPUKernel()

TestCUDAProducerGPUKernel::~TestCUDAProducerGPUKernel ( )
default

Member Function Documentation

◆ runAlgo() [1/2]

cms::cuda::device::unique_ptr<float[]> TestCUDAProducerGPUKernel::runAlgo ( const std::string &  label,
cudaStream_t  stream 
) const
inline

Definition at line 27 of file TestCUDAProducerGPUKernel.h.

References label, and cms::cuda::stream.

Referenced by TestCUDAProducerGPUEW::acquire(), TestCUDAProducerGPUEWTask::acquire(), TestCUDAProducerGPUFirst::produce(), and TestCUDAProducerGPU::produce().

27  {
28  return runAlgo(label, nullptr, stream);
29  }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
char const * label
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const

◆ runAlgo() [2/2]

cms::cuda::device::unique_ptr<float[]> TestCUDAProducerGPUKernel::runAlgo ( const std::string &  label,
const float *  d_input,
cudaStream_t  stream 
) const

◆ runSimpleAlgo()

void TestCUDAProducerGPUKernel::runSimpleAlgo ( float *  d_data,
cudaStream_t  stream 
) const

Member Data Documentation

◆ NUM_VALUES

constexpr int TestCUDAProducerGPUKernel::NUM_VALUES = 4000
static