]>
Commit | Line | Data |
---|---|---|
5ae765b4 | 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 | ||
d3821846 | 21 | #include "AliHLTTPCCAGPUTrackerBase.h" |
5ae765b4 | 22 | |
d3821846 | 23 | class AliHLTTPCCAGPUTrackerNVCC : public AliHLTTPCCAGPUTrackerBase |
5ae765b4 | 24 | { |
5ae765b4 | 25 | public: |
26 | AliHLTTPCCAGPUTrackerNVCC(); | |
27 | virtual ~AliHLTTPCCAGPUTrackerNVCC(); | |
28 | ||
d3821846 | 29 | virtual int InitGPU_Runtime(int sliceCount = -1, int forceDeviceID = -1); |
5ae765b4 | 30 | virtual int Reconstruct(AliHLTTPCCASliceOutput** pOutput, AliHLTTPCCAClusterData* pClusterData, int fFirstSlice, int fSliceCount = -1); |
d3821846 | 31 | virtual int ReconstructPP(AliHLTTPCCASliceOutput** pOutput, AliHLTTPCCAClusterData* pClusterData, int fFirstSlice, int fSliceCount = -1); |
32 | virtual int ExitGPU_Runtime(); | |
5ae765b4 | 33 | virtual int RefitMergedTracks(AliHLTTPCGMMerger* Merger); |
d3821846 | 34 | virtual int GPUMergerAvailable(); |
5ae765b4 | 35 | |
d3821846 | 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); | |
5ae765b4 | 41 | |
d3821846 | 42 | private: |
5ae765b4 | 43 | void DumpRowBlocks(AliHLTTPCCATracker* tracker, int iSlice, bool check = true); |
5ae765b4 | 44 | void* fCudaContext; //Pointer to CUDA context |
d3821846 | 45 | bool GPUFailedMsgA(cudaError_t error, const char* file, int line); |
5ae765b4 | 46 | |
d3821846 | 47 | void* fpCudaStreams; //Pointer to array of CUDA Streams |
5ae765b4 | 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 |