PandaRoot
PndCudaExampleTask.h
Go to the documentation of this file.
1 /*
2 
3  Test Task to try out some cuda in FairRoot
4  Andreas Herten, June 2013
5 
6  */
7 #ifndef PNDCUDAEXAMPLETASK_H_
8 #define PNDCUDAEXAMPLETASK_H_
9 
10 // framework includes
11 #include "FairTask.h"
12 #include "PndDetectorList.h"
13 
14 #include <vector>
15 #include <map>
16 
17 // Actual GPU device-using function have to be declared as extern
18 extern "C" void DeviceInfo();
19 extern "C" void someOperation();
20 
21 class TClonesArray;
22 
23 class PndCudaExampleTask : public FairTask {
24  public:
27 
29  virtual ~PndCudaExampleTask();
30 
32  virtual void SetParContainers();
33  virtual InitStatus Init();
34 
36  virtual void Exec(Option_t *opt);
37 
38  virtual void Finish();
39 
40  protected:
41  // For both external functions local representatives have to exist
42  void callGpuStuff() { someOperation(); };
43  void DeviceInfo_() { return DeviceInfo(); }
44 
45  private:
46  void Register();
47 
48  void Reset();
49 
50  void ProduceHits();
51 
52  ClassDef(PndCudaExampleTask, 1);
53 };
54 
55 #endif
virtual InitStatus Init()
void someOperation()
virtual void Finish()
void DeviceInfo()
virtual void Exec(Option_t *opt)
virtual ~PndCudaExampleTask()
virtual void SetParContainers()