|
DDASToys for NSCLDAQ
6.2-000
|
CUDA-aware fit engine for analytic single pulse fits. More...
#include <jacobian_analytic.h>


Public Member Functions | |
| CudaFitEngine1 (std::vector< std::pair< uint16_t, uint16_t >> &data) | |
| Constructor. More... | |
| ~CudaFitEngine1 () | |
| Destructor. More... | |
| virtual void | jacobian (const gsl_vector *p, gsl_matrix *J) |
| Invoke the kernal to do the pointwise parallel Jacobian computation. More... | |
| virtual void | residuals (const gsl_vector *p, gsl_vector *r) |
| Triggers a pointwise parallel residual kernel in the device and impedance matches that with GSL's requirements. More... | |
Public Member Functions inherited from ddastoys::CFitEngine | |
| CFitEngine (std::vector< std::pair< uint16_t, uint16_t >> &data) | |
| Constructor. More... | |
| virtual | ~CFitEngine () |
| Destructor. | |
Additional Inherited Members | |
Protected Attributes inherited from ddastoys::CFitEngine | |
| std::vector< uint16_t > | x |
| Trace x coordinate vector. | |
| std::vector< uint16_t > | y |
| Trace y coordinate vector. | |
CUDA-aware fit engine for analytic single pulse fits.
The concept is that each GSL lmfitter can supply a pair of methods: One that computes a vector of residuals and one that computes a Jacobian matrix of partial derivatives. At the implementation level we have two types of fits we need done: Single pulse fits and double pulse fits (the engines with names ending in 1 or 2). For each fit type we have two fit engines: 1) Serial computation (the engines with names starting with Serial) 2) GPU accelerated (the engines with names starting with Cuda).
Finally a fit factory can generate the appropriate fit engine as desired by the actual fit.
| ddastoys::analyticfit::CudaFitEngine1::CudaFitEngine1 | ( | std::vector< std::pair< uint16_t, uint16_t >> & | data | ) |
Constructor.
Allocate the device vectors/matrices. Push the trace x/y points into the GPU where they stay until we're destroyed.
| ddastoys::analyticfit::CudaFitEngine1::~CudaFitEngine1 | ( | ) |
Destructor.
Just deallocate the GPU resources.
|
virtual |
Invoke the kernal to do the pointwise parallel Jacobian computation.
| p | Parameter vector. |
| J | Jacobian matrix. |
We use a Y size of 32 and x size of npts+31/32. That is one warp wide.
Implements ddastoys::CFitEngine.
|
virtual |
Triggers a pointwise parallel residual kernel in the device and impedance matches that with GSL's requirements.
| p | Parameter vector. |
| r | Residual vector. |
Implements ddastoys::CFitEngine.