1 #include <goofit/PDFs/basic/StepPdf.h>
5 __device__ fptype device_Step(fptype *evt, fptype *p, unsigned int *indices) {
6 fptype x = evt[indices[2 + indices[0]]];
7 fptype x0 = p[indices[1]];
8 return (x > x0 ? 1 : 0);
11 __device__ device_function_ptr ptr_to_Step = device_Step;
12 device_function_ptr hptr_to_Step = device_Step;
14 __host__ StepPdf::StepPdf(std::string n, Observable _x, Variable x0)
16 std::vector<unsigned int> pindices;
17 pindices.push_back(registerParameter(x0));
18 GET_FUNCTION_ADDR(ptr_to_Step);
22 __host__ fptype StepPdf::integrate(fptype lo, fptype hi) const {
23 unsigned int *indices = host_indices + parameters;
24 fptype x0 = host_params[indices[1]];