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 #ifndef ALIHLTTPCCADEF_H
8 #define ALIHLTTPCCADEF_H
12 * Definitions needed for AliHLTTPCCATracker
16 //#define HLTCA_STANDALONE // compilation w/o root
17 #define HLTCA_INTERNAL_PERFORMANCE
31 #pragma warning(disable : 1786)
32 #pragma warning(disable : 1478)
33 #pragma warning(disable : 161)
34 #endif //INTEL_RUNTIME
37 #pragma warning(disable : 4616)
38 #pragma warning(disable : 4996)
39 #pragma warning(disable : 1684)
40 #endif //VSNET_RUNTIME
43 #ifdef HLTCA_STANDALONE
55 #define ClassDef(name,id)
56 #define ClassImp(name)
58 typedef unsigned char UChar_t; //Unsigned Character 1 byte (unsigned char)
59 #ifdef R__B64 // Note: Long_t and ULong_t are currently not portable types
60 typedef int Seek_t; //File pointer (int)
61 typedef long Long_t; //Signed long integer 8 bytes (long)
62 typedef unsigned long ULong_t; //Unsigned long integer 8 bytes (unsigned long)
64 typedef int Seek_t; //File pointer (int)
65 typedef long Long_t; //Signed long integer 4 bytes (long)
66 typedef unsigned long ULong_t; //Unsigned long integer 4 bytes (unsigned long)
68 typedef float Float16_t; //Float 4 bytes written with a truncated mantissa
69 typedef double Double32_t; //Double 8 bytes in memory, written as a 4 bytes float
70 typedef char Text_t; //General string (char)
71 typedef unsigned char Byte_t; //Byte (8 bits) (unsigned char)
72 typedef short Version_t; //Class version identifier (short)
73 typedef const char Option_t; //Option string (const char)
74 typedef int Ssiz_t; //String size (int)
75 typedef float Real_t; //TVector and TMatrix element type (float)
76 #if defined(R__WIN32) && !defined(__CINT__)
77 typedef __int64 Long64_t; //Portable signed long integer 8 bytes
78 typedef unsigned __int64 ULong64_t; //Portable unsigned long integer 8 bytes
80 typedef long long Long64_t; //Portable signed long integer 8 bytes
81 typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
82 #endif //R__WIN32 && !__CINT__
83 typedef double Axis_t; //Axis values type (double)
84 typedef double Stat_t; //Statistics type (double)
85 typedef short Font_t; //Font number (short)
86 typedef short Style_t; //Style number (short)
87 typedef short Marker_t; //Marker number (short)
88 typedef short Width_t; //Line width (short)
89 typedef short Color_t; //Color number (short)
90 typedef short SCoord_t; //Screen coordinates (short)
91 typedef double Coord_t; //Pad world coordinates (double)
92 typedef float Angle_t; //Graphics angle (float)
93 typedef float Size_t; //Attribute size (float)
98 #include "AliHLTDataTypes.h"
100 namespace AliHLTTPCCADefinitions
102 extern const AliHLTComponentDataType fgkTrackletsDataType;
103 extern const AliHLTComponentDataType fgkCompressedInputDataType;
106 #endif //HLTCA_STANDALONE
108 //#define EXTERN_ROW_HITS
109 #define TRACKLET_SELECTOR_MIN_HITS 10
110 #define REPRODUCIBLE_CLUSTER_SORTING
111 //#define FAST_NEIGHBOURS_FINDER
114 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP 6
115 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_FGRIDCONTENTUPDOWN 1000
116 #define ALIHLTTPCCASTARTHITSFINDER_MAX_FROWSTARTHITS 3500
117 #define ALIHLTTPCCATRACKLET_CONSTRUCTOR_TEMP_MEM 1536 //Max amount of hits in a row that can be stored in shared memory, make sure this is divisible by ROW ALIGNMENT
119 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP 20
120 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_FGRIDCONTENTUPDOWN 7000
121 #define ALIHLTTPCCASTARTHITSFINDER_MAX_FROWSTARTHITS 10000
122 #define ALIHLTTPCCATRACKLET_CONSTRUCTOR_TEMP_MEM 15000
123 #endif //HLTCA_GPUCODE
127 #define GPUd() __device__
128 #define GPUhd() __host__ __device__
129 #define GPUh() __host__ inline
130 #define GPUg() __global__
132 #define GPUshared() __shared__
133 #define GPUsync() __syncthreads()
144 struct float2 { float x; float y; };
145 struct uchar2 { unsigned char x, y; };
146 struct short2 { short x, y; };
147 struct ushort2 { unsigned short x, y; };
148 struct int2 { int x, y; };
149 struct int3 { int x, y, z; };
150 struct int4 { int x, y, z, w; };
151 struct uint1 { unsigned int x; };
152 struct uint2 { unsigned int x, y; };
153 struct uint3 { unsigned int x, y, z; };
154 struct uint4 { unsigned int x, y, z, w; };
159 inline bool finite(float x)
161 return(x <= FLT_MAX);
165 #endif //HLTCA_GPUCODE
168 * Helper for compile-time verification of correct API usage
171 #ifndef HLTCA_GPUCODE
174 template<bool> struct HLTTPCCA_STATIC_ASSERT_FAILURE;
175 template<> struct HLTTPCCA_STATIC_ASSERT_FAILURE<true> {};
178 #define HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b) a##b
179 #define HLTTPCCA_STATIC_ASSERT_CONCAT(a, b) HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b)
180 #define STATIC_ASSERT(cond, msg) \
181 typedef HLTTPCCA_STATIC_ASSERT_FAILURE<cond> HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__); \
182 HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__) Error_##msg; \
185 #define STATIC_ASSERT(a, b)
186 #endif //!HLTCA_GPUCODE
190 template<typename T1>
191 void UNUSED_PARAM1( const T1 & ) {}
192 template<typename T1, typename T2>
193 void UNUSED_PARAM2( const T1 &, const T2 & ) {}
194 template<typename T1, typename T2, typename T3>
195 void UNUSED_PARAM3( const T1 &, const T2 &, const T3 & ) {}
196 template<typename T1, typename T2, typename T3, typename T4>
197 void UNUSED_PARAM4( const T1 &, const T2 &, const T3 &, const T4 & ) {}
198 template<typename T1, typename T2, typename T3, typename T4, typename T5>
199 void UNUSED_PARAM5( const T1 &, const T2 &, const T3 &, const T4 &, const T5 & ) {}
200 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
201 void UNUSED_PARAM6( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 & ) {}
202 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
203 void UNUSED_PARAM7( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 & ) {}
204 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
205 void UNUSED_PARAM8( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 & ) {}
206 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
207 void UNUSED_PARAM9( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 &, const T9 & ) {}
210 #define UNROLL2(var, code) code;var++;code;var++;
211 #define UNROLL4(var, code) UNROLL2(var, code) UNROLL2(var, code)
212 #define UNROLL8(var, code) UNROLL4(var, code) UNROLL4(var, code)
213 #define UNROLL16(var, code) UNROLL8(var, code) UNROLL8(var, code)
214 #define UNROLL32(var, code) UNROLL16(var, code) UNROLL16(var, code)
216 #endif //ALIHLTTPCCADEF_H