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 *
7 //*************************************************************************
9 #ifndef ALIHLTTPCCANEIGHBOURSFINDER_H
10 #define ALIHLTTPCCANEIGHBOURSFINDER_H
13 #include "AliHLTTPCCADef.h"
14 #include "AliHLTTPCCARow.h"
15 #include "AliHLTTPCCAGPUConfig.h"
16 MEM_CLASS_PRE() class AliHLTTPCCATracker;
19 * @class AliHLTTPCCANeighboursFinder
22 class AliHLTTPCCANeighboursFinder
25 MEM_CLASS_PRE() class AliHLTTPCCASharedMemory
27 friend class AliHLTTPCCANeighboursFinder;
29 #if !defined(HLTCA_GPUCODE)
30 AliHLTTPCCASharedMemory()
31 : 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() {}
33 AliHLTTPCCASharedMemory( const AliHLTTPCCASharedMemory& /*dummy*/ )
34 : 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() {}
35 AliHLTTPCCASharedMemory& operator=( const AliHLTTPCCASharedMemory& /*dummy*/ ) { return *this; }
36 #endif //!HLTCA_GPUCODE
40 int fUpNHits; // n hits in the next row
41 int fDnNHits; // n hits in the prev row
42 float fUpDx; // x distance to the next row
43 float fDnDx; // x distance to the previous row
44 float fUpTx; // normalized x distance to the next row
45 float fDnTx; // normalized x distance to the previous row
46 int fIRow; // row number
47 int fIRowUp; // next row number
48 int fIRowDn;// previous row number
49 int fNRows; // number of rows
50 #if ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP > 0
51 float2 fA[HLTCA_GPU_THREAD_COUNT_FINDER][ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP]; // temp memory
52 unsigned short fB[HLTCA_GPU_THREAD_COUNT_FINDER][ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP]; // temp memory
53 #endif //ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP > 0
54 MEM_LG(AliHLTTPCCARow) fRow, fRowUp, fRowDown;
57 GPUd() static int NThreadSyncPoints() { return 2; }
59 GPUd() static void Thread( int nBlocks, int nThreads, int iBlock, int iThread, int iSync,
60 MEM_LOCAL(GPUsharedref() AliHLTTPCCASharedMemory) &smem, MEM_CONSTANT(GPUconstant() AliHLTTPCCATracker) &tracker );
65 #endif //ALIHLTTPCCANEIGHBOURSFINDER_H