forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclusterFinderDefs.h
More file actions
90 lines (73 loc) · 2.41 KB
/
Copy pathclusterFinderDefs.h
File metadata and controls
90 lines (73 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file clusterFinderDefs.h
/// \author David Rohr
#ifndef O2_GPU_CLUSTERFINDERDEFS_H
#define O2_GPU_CLUSTERFINDERDEFS_H
#include "GPUDef.h"
#ifndef __OPENCL__
using uchar = unsigned char;
#endif
#ifdef __APPLE__
using ulong = unsigned long;
#endif
/* #define CHARGEMAP_TIME_MAJOR_LAYOUT */
#define CHARGEMAP_TILING_LAYOUT
#define SCRATCH_PAD_SEARCH_N 8
#define SCRATCH_PAD_COUNT_N 16
#if defined(GPUCA_GPUCODE)
#define SCRATCH_PAD_BUILD_N 8
#define SCRATCH_PAD_NOISE_N 8
#else
// Double shared memory on cpu as we can't reuse the memory from other threads
#define SCRATCH_PAD_BUILD_N 16
#define SCRATCH_PAD_NOISE_N 16
#endif
// Padding of 2 and 3 respectively would be enough. But this ensures that
// rows are always aligned along cache lines. Likewise for TPC_PADS_PER_ROW.
#define GPUCF_PADDING_PAD 8
#define GPUCF_PADDING_TIME 4
#define TPC_PADS_PER_ROW 144
#define TPC_ROWS_PER_CRU 18
#define TPC_PADS_PER_ROW_PADDED (TPC_PADS_PER_ROW + GPUCF_PADDING_PAD)
#define TPC_NUM_OF_PADS (GPUCA_ROW_COUNT * TPC_PADS_PER_ROW_PADDED + GPUCF_PADDING_PAD)
#define TPC_PADS_IN_SECTOR 14560
#define TPC_FEC_IDS_IN_SECTOR 23296
#define TPC_MAX_FRAGMENT_LEN_GPU 4000
#define TPC_MAX_FRAGMENT_LEN_HOST 1000
#define TPC_MAX_FRAGMENT_LEN_PADDED(size) ((size) + 2 * GPUCF_PADDING_TIME)
#if 0
#define DBG_PRINT(msg, ...) printf(msg "\n", __VA_ARGS__)
#else
#define DBG_PRINT(msg, ...) static_cast<void>(0)
#endif
#ifdef GPUCA_GPUCODE
#define CPU_ONLY(x) static_cast<void>(0)
#define CPU_PTR(x) nullptr
#else
#define CPU_ONLY(x) x
#define CPU_PTR(x) x
#endif
namespace GPUCA_NAMESPACE::gpu::tpccf
{
using SizeT = size_t;
using TPCTime = int;
using TPCFragmentTime = short;
using Pad = unsigned char;
using GlobalPad = short;
using Row = unsigned char;
using Cru = unsigned char;
using Charge = float;
using Delta = short;
using Delta2 = short2;
using local_id = short2;
} // namespace GPUCA_NAMESPACE::gpu::tpccf
#endif