FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
tutorials
cuda
PndCudaExampleTask.cxx
Go to the documentation of this file.
1
// -------------------------------------------------------------------------
2
// ----- PndCudaExampleTask source file -----
3
// -------------------------------------------------------------------------
4
// libc includes
5
#include <iostream>
6
7
// Root includes
8
#include "TROOT.h"
9
#include "TClonesArray.h"
10
11
// framework includes
12
#include "FairRootManager.h"
13
#include "FairRun.h"
14
#include "FairRuntimeDb.h"
15
#include "FairHit.h"
16
#include "FairMultiLinkedData.h"
17
#include "FairEventHeader.h"
18
#include "
PndCudaExampleTask.h
"
19
20
#include "
PndDetectorList.h
"
21
#include <iomanip>
22
23
// ----- Default constructor -------------------------------------------
24
PndCudaExampleTask::PndCudaExampleTask
()
25
: FairTask(
"Calls a CUDA function"
)
26
{
27
}
28
// -------------------------------------------------------------------------
29
30
// ----- Destructor ----------------------------------------------------
31
PndCudaExampleTask::~PndCudaExampleTask
()
32
{
33
}
34
35
// ----- Public method Init --------------------------------------------
36
InitStatus
PndCudaExampleTask::Init
()
37
{
38
FairRootManager* ioman = FairRootManager::Instance();
39
if
(!ioman) {
40
std::cout <<
"-E- PndCudaExampleTask::Init: "
41
<<
"RootManager not instantiated!"
<< std::endl;
42
return
kFATAL;
43
}
44
45
std::cout <<
"-I- PndCudaExampleTask::Init: Initialization successfull"
<< std::endl;
46
47
return
kSUCCESS;
48
}
49
50
// -------------------------------------------------------------------------
51
void
PndCudaExampleTask::SetParContainers
()
52
{
53
54
}
55
56
57
// ----- Public method Exec --------------------------------------------
58
void
PndCudaExampleTask::Exec
(Option_t*)
59
{
60
std::cout <<
"============= PndCudaExampleTask:: START DEVICE INFO: "
<< std::endl;
61
DeviceInfo_
();
62
std::cout <<
"============= PndCudaExampleTask:: END DEVICE INFO"
<< std::endl;
63
std::cout <<
"============= PndCudaExampleTask:: START CUDA KERNEL CALL: "
<< std::endl;
64
callGpuStuff
();
65
std::cout <<
"============= PndCudaExampleTask:: END CUDA KERNEL CALL"
<< std::endl;
66
std::cout <<
"============= End PndCudaExampleTask::Exec"
<< std::endl;
67
std::cout << std::endl;
68
}
69
70
void
PndCudaExampleTask::Finish
()
71
{
72
73
}
74
75
ClassImp
(
PndCudaExampleTask
);
PndCudaExampleTask.h
PndCudaExampleTask::Finish
virtual void Finish()
Definition:
PndCudaExampleTask.cxx:70
PndCudaExampleTask::callGpuStuff
void callGpuStuff()
Definition:
PndCudaExampleTask.h:46
PndDetectorList.h
PndCudaExampleTask::~PndCudaExampleTask
virtual ~PndCudaExampleTask()
Definition:
PndCudaExampleTask.cxx:31
PndCudaExampleTask
Definition:
PndCudaExampleTask.h:23
PndCudaExampleTask::PndCudaExampleTask
PndCudaExampleTask()
Definition:
PndCudaExampleTask.cxx:24
PndCudaExampleTask::DeviceInfo_
void DeviceInfo_()
Definition:
PndCudaExampleTask.h:47
ClassImp
ClassImp(PndAnaContFact)
PndCudaExampleTask::SetParContainers
virtual void SetParContainers()
Definition:
PndCudaExampleTask.cxx:51
PndCudaExampleTask::Exec
virtual void Exec(Option_t *opt)
Definition:
PndCudaExampleTask.cxx:58
PndCudaExampleTask::Init
virtual InitStatus Init()
Definition:
PndCudaExampleTask.cxx:36
Generated on Wed Apr 3 2019 10:02:49 for FairRoot/PandaRoot by
1.8.5