1 #include <goofit/PDFs/basic/ExpGausPdf.h>
5 __device__ fptype device_ExpGaus(fptype *evt, fptype *p, unsigned int *indices) {
6 fptype x = evt[RO_CACHE(indices[2 + RO_CACHE(indices[0])])];
7 fptype mean = RO_CACHE(p[RO_CACHE(indices[1])]);
8 fptype sigma = RO_CACHE(p[RO_CACHE(indices[2])]);
9 fptype alpha = RO_CACHE(p[RO_CACHE(indices[3])]);
11 fptype ret = 0.5 * alpha;
12 fptype exparg = ret * (2 * mean + alpha * sigma * sigma - 2 * x);
13 fptype erfarg = (mean + alpha * sigma * sigma - x) / (sigma * 1.4142135623);
21 __device__ device_function_ptr ptr_to_ExpGaus = device_ExpGaus;
23 ExpGausPdf::ExpGausPdf(std::string n, Observable _x, Variable mean, Variable sigma, Variable tau)
25 std::vector<unsigned int> pindices;
26 pindices.push_back(registerParameter(mean));
27 pindices.push_back(registerParameter(sigma));
28 pindices.push_back(registerParameter(tau));
29 GET_FUNCTION_ADDR(ptr_to_ExpGaus);