]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/cagpu/cuda/AliHLTTPCCAGPUTrackerNVCC.h
Adding the target_link_libraries
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / cagpu / cuda / AliHLTTPCCAGPUTrackerNVCC.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 // ************************************************************************
5 // This file is property of and copyright by the ALICE HLT Project        *
6 // ALICE Experiment at CERN, All rights reserved.                         *
7 // See cxx source for full Copyright notice                               *
8 //                                                                        *
9 //*************************************************************************
10
11 //  @file   AliHLTTPCCAGPUTrackerNVCC.h
12 //  @author David Rohr, Sergey Gorbunov
13 //  @date   
14 //  @brief  TPC CA Tracker for the NVIDIA GPU
15 //  @note 
16
17
18 #ifndef ALIHLTTPCCAGPUTRACKERNVCC_H
19 #define ALIHLTTPCCAGPUTRACKERNVCC_H
20
21 #include "AliHLTTPCCAGPUTrackerBase.h"
22
23 class AliHLTTPCCAGPUTrackerNVCC : public AliHLTTPCCAGPUTrackerBase
24 {
25 public:
26         AliHLTTPCCAGPUTrackerNVCC();
27         virtual ~AliHLTTPCCAGPUTrackerNVCC();
28
29         virtual int InitGPU_Runtime(int sliceCount = -1, int forceDeviceID = -1);
30         virtual int Reconstruct(AliHLTTPCCASliceOutput** pOutput, AliHLTTPCCAClusterData* pClusterData, int fFirstSlice, int fSliceCount = -1);
31         virtual int ReconstructPP(AliHLTTPCCASliceOutput** pOutput, AliHLTTPCCAClusterData* pClusterData, int fFirstSlice, int fSliceCount = -1);
32         virtual int ExitGPU_Runtime();
33         virtual int RefitMergedTracks(AliHLTTPCGMMerger* Merger);
34         virtual int GPUMergerAvailable();
35
36 protected:
37         virtual void ActivateThreadContext();
38         virtual void ReleaseThreadContext();
39         virtual void SynchronizeGPU();
40         virtual int GPUSync(char* state = "UNKNOWN", int stream = -1, int slice = 0);
41
42 private:
43         void DumpRowBlocks(AliHLTTPCCATracker* tracker, int iSlice, bool check = true);
44         void* fCudaContext; //Pointer to CUDA context
45         bool GPUFailedMsgA(cudaError_t error, const char* file, int line);
46
47         void* fpCudaStreams; //Pointer to array of CUDA Streams
48
49         // disable copy
50         AliHLTTPCCAGPUTrackerNVCC( const AliHLTTPCCAGPUTrackerNVCC& );
51         AliHLTTPCCAGPUTrackerNVCC &operator=( const AliHLTTPCCAGPUTrackerNVCC& );
52
53         ClassDef( AliHLTTPCCAGPUTrackerNVCC, 0 )
54 };
55
56 #ifdef R__WIN32
57 #define DLL_EXPORT __declspec(dllexport)
58 #else
59 #define DLL_EXPORT
60 #endif
61
62 extern "C" DLL_EXPORT AliHLTTPCCAGPUTracker* AliHLTTPCCAGPUTrackerNVCCCreate();
63 extern "C" DLL_EXPORT void AliHLTTPCCAGPUTrackerNVCCDestroy(AliHLTTPCCAGPUTracker* ptr);
64
65 #endif //ALIHLTTPCCAGPUTRACKER_H