lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Drp::Gpu::NoOpReducer Class Reference

Reducer that copies the calibrated floats unchanged into the output buffer, using its own CUDA kernel. More...

#include <NoOpReducer.hh>

Inherits Drp::Gpu::ReducerAlgo.

Public Member Functions

 NoOpReducer (const Parameters &para, const MemPoolGpu &pool, Detector &det)
 If detType is epixuhrsim and the sim_l1_verify kwarg is non-zero, keep the detector's reference buffers (the check that uses them is commented out).
 
virtual ~NoOpReducer ()
 Free the device return-code word.
 
bool hasGraph () const override
 Return true, since NoOpReducer.cu defines HAS_GRAPH.
 
size_t payloadSize () const override
 Return the calibrated buffer size, since the output is a copy.
 
void recordGraph (cudaStream_t stream, unsigned *const state, unsigned *const index, float const *const calibBuffers, size_t const calibBufsCnt, uint8_t *const dataBuffers, size_t const dataBufsCnt) override
 Record one launch of the copy kernel.
 
void reduce (cudaGraphExec_t, cudaStream_t, unsigned index, size_t *dataSize, unsigned *retCode) override
 Launch graph on stream and queue asynchronous copies of the reduced size, stored just before data buffer index, and of the return code to *dataSize and *retCode.
 
int configure (const nlohmann::json &configureMsg, const nlohmann::json &connectMsg, size_t collectionId) override
 Log a message and return 0.
 
unsigned configure (XtcData::Xtc &, const void *bufEnd) override
 Add the names of the reduced data (algorithm noOp, one UINT8 array named noOp) under ReducerNamesIndex and register them in the detector's names lookup; returns 0.
 
void event (XtcData::Xtc &, const void *bufEnd, unsigned dataSize) override
 Set the shape of the noOp array to dataSize elements in the data description; the data itself stays on the GPU.
 
- Public Member Functions inherited from Drp::Gpu::ReducerAlgo
 ReducerAlgo (const Parameters &para, const MemPoolGpu &pool, Detector &det)
 Keep references to the parameters, the memory pool and the detector.
 
virtual ~ReducerAlgo ()
 Does nothing; empty virtual destructor.
 

Additional Inherited Members

- Protected Attributes inherited from Drp::Gpu::ReducerAlgo
const Parameters & m_para
 
const MemPoolGpu & m_pool
 
Detector & m_det
 

Detailed Description

Reducer that copies the calibrated floats unchanged into the output buffer, using its own CUDA kernel.

Constructor & Destructor Documentation

◆ NoOpReducer()

Drp::Gpu::NoOpReducer::NoOpReducer ( const Parameters &  para,
const MemPoolGpu &  pool,
Detector &  det 
)

If detType is epixuhrsim and the sim_l1_verify kwarg is non-zero, keep the detector's reference buffers (the check that uses them is commented out).

Allocate and zero a device return-code word.

◆ ~NoOpReducer()

virtual Drp::Gpu::NoOpReducer::~NoOpReducer ( )
virtual

Free the device return-code word.

Member Function Documentation

◆ configure() [1/2]

int Drp::Gpu::NoOpReducer::configure ( const nlohmann::json &  configureMsg,
const nlohmann::json &  connectMsg,
size_t  collectionId 
)
overridevirtual

Log a message and return 0.

Implements Drp::Gpu::ReducerAlgo.

◆ configure() [2/2]

unsigned Drp::Gpu::NoOpReducer::configure ( XtcData::Xtc &  ,
const void *  bufEnd 
)
overridevirtual

Add the names of the reduced data (algorithm noOp, one UINT8 array named noOp) under ReducerNamesIndex and register them in the detector's names lookup; returns 0.

Implements Drp::Gpu::ReducerAlgo.

◆ event()

void Drp::Gpu::NoOpReducer::event ( XtcData::Xtc &  ,
const void *  bufEnd,
unsigned  dataSize 
)
overridevirtual

Set the shape of the noOp array to dataSize elements in the data description; the data itself stays on the GPU.

Reimplemented from Drp::Gpu::ReducerAlgo.

◆ hasGraph()

bool Drp::Gpu::NoOpReducer::hasGraph ( ) const
overridevirtual

Return true, since NoOpReducer.cu defines HAS_GRAPH.

Implements Drp::Gpu::ReducerAlgo.

◆ payloadSize()

size_t Drp::Gpu::NoOpReducer::payloadSize ( ) const
inlineoverridevirtual

Return the calibrated buffer size, since the output is a copy.

Implements Drp::Gpu::ReducerAlgo.

◆ recordGraph()

void Drp::Gpu::NoOpReducer::recordGraph ( cudaStream_t  stream,
unsigned *const  state,
unsigned *const  index,
float const *const  calibBuffers,
size_t const  calibBufsCnt,
uint8_t *const  dataBuffers,
size_t const  dataBufsCnt 
)
overridevirtual

Record one launch of the copy kernel.

In builds without HOST_LAUNCHED_REDUCERS it acts when *state is 1: it copies calibrated buffer *index to its data buffer, then the last block stores the size in bytes just before the data, writes 0 to the return code and sets *state to 2. The grid size depends on the threads per multiprocessor (1536 or 2048; other values abort).

Implements Drp::Gpu::ReducerAlgo.

◆ reduce()

void Drp::Gpu::NoOpReducer::reduce ( cudaGraphExec_t  ,
cudaStream_t  ,
unsigned  index,
size_t *  dataSize,
unsigned *  retCode 
)
overridevirtual

Launch graph on stream and queue asynchronous copies of the reduced size, stored just before data buffer index, and of the return code to *dataSize and *retCode.

Implements Drp::Gpu::ReducerAlgo.


The documentation for this class was generated from the following file: