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
30 #ifdef INTEL_RUNTIME
\r
31 #pragma warning(disable : 1786)
\r
32 #pragma warning(disable : 1478)
\r
33 #pragma warning(disable : 161)
\r
36 #ifdef VSNET_RUNTIME
\r
37 #pragma warning(disable : 4616)
\r
38 #pragma warning(disable : 4996)
\r
39 #pragma warning(disable : 1684)
\r
43 #if defined(HLTCA_STANDALONE) || defined(HLTCA_GPUCODE)
47 #define ClassDef(name,id)
48 #define ClassImp(name)
50 typedef unsigned char UChar_t; //Unsigned Character 1 byte (unsigned char)
51 #ifdef R__B64 // Note: Long_t and ULong_t are currently not portable types
52 typedef int Seek_t; //File pointer (int)
53 typedef long Long_t; //Signed long integer 8 bytes (long)
54 typedef unsigned long ULong_t; //Unsigned long integer 8 bytes (unsigned long)
56 typedef int Seek_t; //File pointer (int)
57 typedef long Long_t; //Signed long integer 4 bytes (long)
58 typedef unsigned long ULong_t; //Unsigned long integer 4 bytes (unsigned long)
60 typedef float Float16_t; //Float 4 bytes written with a truncated mantissa
61 typedef double Double32_t; //Double 8 bytes in memory, written as a 4 bytes float
62 typedef char Text_t; //General string (char)
63 typedef unsigned char Byte_t; //Byte (8 bits) (unsigned char)
64 typedef short Version_t; //Class version identifier (short)
65 typedef const char Option_t; //Option string (const char)
66 typedef int Ssiz_t; //String size (int)
67 typedef float Real_t; //TVector and TMatrix element type (float)
68 #if defined(R__WIN32) && !defined(__CINT__)
69 typedef __int64 Long64_t; //Portable signed long integer 8 bytes
70 typedef unsigned __int64 ULong64_t; //Portable unsigned long integer 8 bytes
72 typedef long long Long64_t; //Portable signed long integer 8 bytes
73 typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
75 typedef double Axis_t; //Axis values type (double)
76 typedef double Stat_t; //Statistics type (double)
77 typedef short Font_t; //Font number (short)
78 typedef short Style_t; //Style number (short)
79 typedef short Marker_t; //Marker number (short)
80 typedef short Width_t; //Line width (short)
81 typedef short Color_t; //Color number (short)
82 typedef short SCoord_t; //Screen coordinates (short)
83 typedef double Coord_t; //Pad world coordinates (double)
84 typedef float Angle_t; //Graphics angle (float)
85 typedef float Size_t; //Attribute size (float)
90 #include "AliHLTDataTypes.h"
92 namespace AliHLTTPCCADefinitions
94 extern const AliHLTComponentDataType fgkTrackletsDataType;
100 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP 5
101 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_FGRIDCONTENTUPDOWN 700
102 #define ALIHLTTPCCASTARTHITSFINDER_MAX_FROWSTARTHITS 3500
103 #define ALIHLTTPCCATRACKLET_CONSTRUCTOR_TEMP_MEM 650
105 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_NNEIGHUP 20
106 #define ALIHLTTPCCANEIGHBOURS_FINDER_MAX_FGRIDCONTENTUPDOWN 7000
107 #define ALIHLTTPCCASTARTHITSFINDER_MAX_FROWSTARTHITS 10000
108 #define ALIHLTTPCCATRACKLET_CONSTRUCTOR_TEMP_MEM 5000
113 #define GPUd() __device__
114 #define GPUhd() __host__ __device__
115 #define GPUh() __host__ inline
116 #define GPUg() __global__
118 #define GPUshared() __shared__
119 #define GPUsync() __syncthreads()
121 __constant__ float4 gAliHLTTPCCATracker[30000/sizeof( float4 )];
132 struct float2 { float x; float y; };
133 struct uchar2 { unsigned char x; unsigned char y; };
134 struct ushort2 { unsigned short x; unsigned short y; };
135 struct uint1 { unsigned int x; };
136 struct uint4 { unsigned int x, y, z, w; };
141 inline bool finite(float x)
143 return(x <= FLT_MAX);
150 * Helper for compile-time verification of correct API usage
154 template<bool> struct HLTTPCCA_STATIC_ASSERT_FAILURE;
155 template<> struct HLTTPCCA_STATIC_ASSERT_FAILURE<true> {};
158 #define HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b) a##b
159 #define HLTTPCCA_STATIC_ASSERT_CONCAT(a, b) HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b)
160 #define STATIC_ASSERT(cond, msg) \
161 typedef HLTTPCCA_STATIC_ASSERT_FAILURE<cond> HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__); \
162 HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__) Error_##msg; \
167 template<typename T1>
168 void UNUSED_PARAM1( const T1 & ) {}
169 template<typename T1, typename T2>
170 void UNUSED_PARAM2( const T1 &, const T2 & ) {}
171 template<typename T1, typename T2, typename T3>
172 void UNUSED_PARAM3( const T1 &, const T2 &, const T3 & ) {}
173 template<typename T1, typename T2, typename T3, typename T4>
174 void UNUSED_PARAM4( const T1 &, const T2 &, const T3 &, const T4 & ) {}
175 template<typename T1, typename T2, typename T3, typename T4, typename T5>
176 void UNUSED_PARAM5( const T1 &, const T2 &, const T3 &, const T4 &, const T5 & ) {}
177 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
178 void UNUSED_PARAM6( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 & ) {}
179 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
180 void UNUSED_PARAM7( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 & ) {}
181 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
182 void UNUSED_PARAM8( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 & ) {}
183 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
184 void UNUSED_PARAM9( const T1 &, const T2 &, const T3 &, const T4 &, const T5 &, const T6 &, const T7 &, const T8 &, const T9 & ) {}