|
ngscopeclient v0.2.2
|
Helper for GPU accelerated waveform averaging. More...
#include <Averager.h>

Public Member Functions | |
| template<class T > | |
| __attribute__ ((noinline)) float Average(T *wfm | |
| cmdBuf | begin ({}) |
| m_temporaryResults | resize (numThreads) |
| m_computePipeline | BindBufferNonblocking (0, m_temporaryResults, cmdBuf, true) |
| m_computePipeline | BindBufferNonblocking (1, wfm->m_samples, cmdBuf) |
| m_computePipeline | Dispatch (cmdBuf, push, numThreads, 1) |
| m_temporaryResults | MarkModifiedFromGpu () |
| cmdBuf | end () |
| queue | SubmitAndBlock (cmdBuf) |
| m_temporaryResults | PrepareForCpuAccess () |
| for (uint64_t i=0;i< numThreads;i++) final Sum+ | |
Public Attributes | |
| vk::raii::CommandBuffer & | cmdBuf |
| vk::raii::CommandBuffer std::shared_ptr< QueueHandle > | queue |
| const uint64_t | numThreads = 16384 |
| size_t | depth = wfm->size() |
| ReductionSumPushConstants | push |
| push | numSamples = depth |
| push | numThreads = numThreads |
| push | samplesPerThread = (depth + numThreads) / numThreads |
| float | finalSum = 0 |
| return finalSum | depth |
Protected Attributes | |
| std::unique_ptr< ComputePipeline > | m_computePipeline |
| AcceleratorBuffer< float > | m_temporaryResults |
Helper for GPU accelerated waveform averaging.
| vk::raii::CommandBuffer std::shared_ptr<QueueHandle> Averager::queue |