1 #include <goofit/PDFs/basic/BWPdf.h>
5 __device__ fptype device_BW(fptype *evt, fptype *p, unsigned int *indices) {
6 fptype x = evt[indices[2 + indices[0]]];
7 fptype mean = p[indices[1]];
8 fptype gamma = p[indices[2]];
9 fptype rootPi = -2. * atan2(-1.0, 0.0);
10 fptype ret = (gamma / ((x - mean) * (x - mean) + gamma * gamma / 4)) / (2 * rootPi);
14 __device__ device_function_ptr ptr_to_BW = device_BW;
16 __host__ BWPdf::BWPdf(std::string n, Observable _x, Variable mean, Variable width)
18 std::vector<unsigned int> pindices;
19 pindices.push_back(registerParameter(mean));
20 pindices.push_back(registerParameter(width));
21 GET_FUNCTION_ADDR(ptr_to_BW);