MCBooster  1.0.1
Tool to generate MC phase space samples in parallel.
GFunctional.h
Go to the documentation of this file.
1 /*
2  * GFunctional.h
3  *
4  * Created on : Feb 25, 2016
5  * Author: Antonio Augusto Alves Junior
6  */
7 
8 /*
9  * This file is part of MCBooster.
10  *
11  * MCBooster is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * MCBooster is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with MCBooster. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
28 #ifndef GFUNCTIONAL_H_
29 #define GFUNCTIONAL_H_
30 
31 
32 #include <mcbooster/Config.h>
33 #include <mcbooster/GTypes.h>
34 #include <mcbooster/Vector3R.h>
35 #include <mcbooster/Vector4R.h>
36 
37 namespace MCBooster
38 {
42 template<typename RESULT>
43 struct IFunction
44 {
45 
46  __host__ __device__ virtual RESULT operator()(const GInt_t n,
47  Vector4R** particles)=0;
48 
49 };
50 
55 {
58  dim(0)
59  { }
60 
61  __host__ __device__ virtual void operator()(const GInt_t np,
62  Vector4R** particles, GReal_t* variables)=0;
63 
64 };
65 
66 }
67 
68 #endif /* GFUNCTIONAL_H_ */
IFunction is the base class for arbitrary functions return any type suported by the framwork...
Definition: GFunctional.h:43
__host__ virtual __device__ void operator()(const GInt_t np, Vector4R **particles, GReal_t *variables)=0
__host__ virtual __device__ RESULT operator()(const GInt_t n, Vector4R **particles)=0
double GReal_t
Double 8 bytes or float 4 bytes.
Definition: GTypes.h:52
int GInt_t
Signed integer 4 bytes (int)
Definition: GTypes.h:37