|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Reducer that compresses each calibrated buffer with cuSZ (Lorenzo predictor, relative error bound 1.2e-4, Huffman coding). More...
#include <CuSzReducer.hh>
Inherits Drp::Gpu::ReducerAlgo.
Public Member Functions | |
| CuSzReducer (const Parameters ¶, const MemPoolGpu &pool, Detector &det) | |
| Select the Lorenzo predictor, relative mode and error bound 1.2e-4; the cuSZ resource manager is created by the first reduce(). | |
| virtual | ~CuSzReducer () |
| Release the cuSZ resource manager if one was created. | |
| bool | hasGraph () const override |
| Return false: compression runs through reduce(), not a CUDA graph. | |
| size_t | payloadSize () const override |
| Return the calibrated buffer size. | |
| 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 |
| Not implemented: logs a critical message and aborts. | |
| void | reduce (cudaGraphExec_t, cudaStream_t, unsigned index, size_t *dataSize, unsigned *retCode) override |
| Compress calibrated buffer index with cuSZ (creating the resource manager on first use) and copy the result into data buffer index with a blocking cudaMemcpy. | |
| int | configure (const nlohmann::json &configureMsg, const nlohmann::json &connectMsg, size_t collectionId) override |
| Return 0; nothing is configured. | |
| unsigned | configure (XtcData::Xtc &, const void *bufEnd) override |
| Add the names of the reduced data (algorithm cuSZ, one UINT8 array named cuSZ) 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 cuSZ 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 ¶, 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 |
Reducer that compresses each calibrated buffer with cuSZ (Lorenzo predictor, relative error bound 1.2e-4, Huffman coding).
It runs through reduce(), not a graph; its library targets are commented out in CMakeLists.txt and meson.build.
| Drp::Gpu::CuSzReducer::CuSzReducer | ( | const Parameters & | para, |
| const MemPoolGpu & | pool, | ||
| Detector & | det | ||
| ) |
Select the Lorenzo predictor, relative mode and error bound 1.2e-4; the cuSZ resource manager is created by the first reduce().
|
virtual |
Release the cuSZ resource manager if one was created.
|
inlineoverridevirtual |
Return 0; nothing is configured.
Implements Drp::Gpu::ReducerAlgo.
|
overridevirtual |
Add the names of the reduced data (algorithm cuSZ, one UINT8 array named cuSZ) under ReducerNamesIndex and register them in the detector's names lookup; returns 0.
Implements Drp::Gpu::ReducerAlgo.
|
overridevirtual |
Set the shape of the cuSZ array to dataSize elements in the data description; the data itself stays on the GPU.
Reimplemented from Drp::Gpu::ReducerAlgo.
|
inlineoverridevirtual |
Return false: compression runs through reduce(), not a CUDA graph.
Implements Drp::Gpu::ReducerAlgo.
|
inlineoverridevirtual |
Return the calibrated buffer size.
Implements Drp::Gpu::ReducerAlgo.
|
overridevirtual |
Not implemented: logs a critical message and aborts.
Implements Drp::Gpu::ReducerAlgo.
|
overridevirtual |
Compress calibrated buffer index with cuSZ (creating the resource manager on first use) and copy the result into data buffer index with a blocking cudaMemcpy.
Sets *dataSize to the compressed length and *retCode to 0; the graph argument is not used.
Implements Drp::Gpu::ReducerAlgo.