]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCADef.h
4a82e6e8702ee9791c1803b470ebde86f70ff1f0
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCADef.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 #ifndef ALIHLTTPCCADEF_H
8 #define ALIHLTTPCCADEF_H
9
10  
11 /**
12  * Definitions needed for AliHLTTPCCATracker
13  *
14  */  
15  
16 //#define HLTCA_STANDALONE // compilation w/o root
17
18 #ifdef __CUDACC__
19
20 #define HLTCA_GPUCODE
21
22 #endif
23
24 #if defined(HLTCA_STANDALONE) || defined(HLTCA_GPUCODE)
25
26 class TObject{};
27
28 #define ClassDef(name,id)
29 #define ClassImp(name)
30
31 typedef char           Char_t;      //Signed Character 1 byte (char)
32 typedef unsigned char  UChar_t;     //Unsigned Character 1 byte (unsigned char)
33 typedef short          Short_t;     //Signed Short integer 2 bytes (short)
34 typedef unsigned short UShort_t;    //Unsigned Short integer 2 bytes (unsigned short)
35 #ifdef R__INT16
36 typedef long           Int_t;       //Signed integer 4 bytes
37 typedef unsigned long  UInt_t;      //Unsigned integer 4 bytes
38 #else
39 typedef int            Int_t;       //Signed integer 4 bytes (int)
40 typedef unsigned int   UInt_t;      //Unsigned integer 4 bytes (unsigned int)
41 #endif
42 #ifdef R__B64    // Note: Long_t and ULong_t are currently not portable types
43 typedef int            Seek_t;      //File pointer (int)
44 typedef long           Long_t;      //Signed long integer 8 bytes (long)
45 typedef unsigned long  ULong_t;     //Unsigned long integer 8 bytes (unsigned long)
46 #else
47 typedef int            Seek_t;      //File pointer (int)
48 typedef long           Long_t;      //Signed long integer 4 bytes (long)
49 typedef unsigned long  ULong_t;     //Unsigned long integer 4 bytes (unsigned long)
50 #endif
51 typedef float          Float_t;     //Float 4 bytes (float)
52 typedef float          Float16_t;   //Float 4 bytes written with a truncated mantissa
53 typedef double         Double_t;    //Double 8 bytes
54 typedef double         Double32_t;  //Double 8 bytes in memory, written as a 4 bytes float
55 typedef char           Text_t;      //General string (char)
56 typedef bool           Bool_t;      //Boolean (0=false, 1=true) (bool)
57 typedef unsigned char  Byte_t;      //Byte (8 bits) (unsigned char)
58 typedef short          Version_t;   //Class version identifier (short)
59 typedef const char     Option_t;    //Option string (const char)
60 typedef int            Ssiz_t;      //String size (int)
61 typedef float          Real_t;      //TVector and TMatrix element type (float)
62 #if defined(R__WIN32) && !defined(__CINT__)
63 typedef __int64          Long64_t;  //Portable signed long integer 8 bytes
64 typedef unsigned __int64 ULong64_t; //Portable unsigned long integer 8 bytes
65 #else
66 typedef long long          Long64_t; //Portable signed long integer 8 bytes
67 typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
68 #endif
69 typedef double         Axis_t;      //Axis values type (double)
70 typedef double         Stat_t;      //Statistics type (double)
71 typedef short          Font_t;      //Font number (short)
72 typedef short          Style_t;     //Style number (short)
73 typedef short          Marker_t;    //Marker number (short)
74 typedef short          Width_t;     //Line width (short)
75 typedef short          Color_t;     //Color number (short)
76 typedef short          SCoord_t;    //Screen coordinates (short)
77 typedef double         Coord_t;     //Pad world coordinates (double)
78 typedef float          Angle_t;     //Graphics angle (float)
79 typedef float          Size_t;      //Attribute size (float)
80
81 #else 
82
83 #include "Rtypes.h"
84 #include "TObject.h"
85
86 #endif
87
88
89
90 #ifdef HLTCA_GPUCODE
91
92 #define GPUd() __device__ 
93 #define GPUhd() __host__ __device__ 
94 #define GPUh() __host__ inline 
95 #define GPUg() __global__ 
96
97 #define GPUshared() __shared__ 
98 #define GPUsync() __syncthreads()
99
100 __constant__ float4 cTracker[30000/sizeof(float4)];
101
102 #else
103
104 #define GPUd() 
105 #define GPUhd()
106 #define GPUg()
107 #define GPUh() 
108 #define GPUshared() 
109 #define GPUsync() 
110
111 struct float2{ float x; float y; };
112 struct uchar2{ unsigned char x; unsigned char y; };
113 struct ushort2{ unsigned short x; unsigned short y; };
114 struct uint1{ unsigned int x; };
115 struct uint4{ unsigned int x,y,z,w; };
116
117 float2 inline make_float2(float x, float y ){
118   float2 ret = {x,y};
119   return ret;
120 }
121
122 #endif
123
124
125 #endif