]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCANeighboursFinder.h
Update of the GPU tracker from David Rohr
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCANeighboursFinder.h
1 //-*- Mode: C++ -*-
2 // ************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project        *
4 // ALICE Experiment at CERN, All rights reserved.                         *
5 // See cxx source for full Copyright notice                               *
6 //                                                                        *
7 //*************************************************************************
8
9 #ifndef ALIHLTTPCCANEIGHBOURSFINDER_H
10 #define ALIHLTTPCCANEIGHBOURSFINDER_H
11
12
13 #include "AliHLTTPCCADef.h"
14 #include "AliHLTTPCCARow.h"
15 class AliHLTTPCCATracker;
16
17 /**
18  * @class AliHLTTPCCANeighboursFinder
19  *
20  */
21 class AliHLTTPCCANeighboursFinder
22 {
23   public:
24     class AliHLTTPCCASharedMemory
25     {
26         friend class AliHLTTPCCANeighboursFinder;
27       public:
28 #if !defined(HLTCA_GPUCODE)
29         AliHLTTPCCASharedMemory()
30             : fNHits( 0 ), fUpNHits( 0 ), fDnNHits( 0 ), fUpDx( 0 ), fDnDx( 0 ), fUpTx( 0 ), fDnTx( 0 ), fIRow( 0 ), fIRowUp( 0 ), fIRowDn( 0 ), fNRows( 0 ), fRow(), fRowUp(), fRowDown() {}
31
32         AliHLTTPCCASharedMemory( const AliHLTTPCCASharedMemory& /*dummy*/ )
33             : fNHits( 0 ), fUpNHits( 0 ), fDnNHits( 0 ), fUpDx( 0 ), fDnDx( 0 ), fUpTx( 0 ), fDnTx( 0 ), fIRow( 0 ), fIRowUp( 0 ), fIRowDn( 0 ), fNRows( 0 ), fRow(), fRowUp(), fRowDown() {}
34         AliHLTTPCCASharedMemory& operator=( const AliHLTTPCCASharedMemory& /*dummy*/ ) { return *this; }
35 #endif
36
37       protected:
38         int fNHits; // n hits
39         int fUpNHits; // n hits in the next row
40         int fDnNHits; // n hits in the prev row
41         float fUpDx; // x distance to the next row
42         float fDnDx; // x distance to the previous row
43         float fUpTx; // normalized x distance to the next row
44         float fDnTx; // normalized x distance to the previous row
45         int fIRow; // row number
46         int fIRowUp; // next row number
47         int fIRowDn;// previous row number
48         int fNRows; // number of rows
49         float2 fA[256][ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP]; // temp memory
50         unsigned short fB[256][ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP]; // temp memory
51                 AliHLTTPCCARow fRow, fRowUp, fRowDown;
52     };
53
54     GPUd() static int NThreadSyncPoints() { return 2; }
55
56     GPUd() static void Thread( int nBlocks, int nThreads, int iBlock, int iThread, int iSync,
57                                AliHLTTPCCASharedMemory &smem, AliHLTTPCCATracker &tracker );
58
59 };
60
61
62 #endif