GooFit  v2.1.3
MetricTaker.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <thrust/functional.h>
4 
5 #include <goofit/PdfBase.h>
6 
7 namespace GooFit {
8 
9 // Notice that operators are distinguished by the order of the operands,
10 // and not otherwise! It's up to the user to make his tuples correctly.
11 class MetricTaker : public thrust::unary_function<thrust::tuple<int, fptype *, int>, fptype> {
12  public:
13  MetricTaker(PdfBase *dat, void *dev_functionPtr);
14  MetricTaker(int fIdx, int pIdx);
15 
20  __device__ fptype operator()(thrust::tuple<int, fptype *, int> t) const;
21 
26  __device__ fptype operator()(thrust::tuple<int, int, fptype *> t) const;
27 
28  private:
30  unsigned int metricIndex;
31 
33  unsigned int functionIdx;
34 
35  unsigned int parameters;
36 };
37 
38 } // namespace GooFit
double fptype
__device__ fptype operator()(thrust::tuple< int, fptype *, int > t) const
MetricTaker(PdfBase *dat, void *dev_functionPtr)