Project
Loading...
Searching...
No Matches
clusterFinderDefs.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef O2_GPU_CLUSTERFINDERDEFS_H
16#define O2_GPU_CLUSTERFINDERDEFS_H
17
18#include "GPUDef.h"
19
20/* #define CHARGEMAP_TIME_MAJOR_LAYOUT */
21#define CHARGEMAP_TILING_LAYOUT
22
23#define SCRATCH_PAD_SEARCH_N 8
24#define SCRATCH_PAD_COUNT_N 16
25#if defined(GPUCA_GPUCODE)
26#define SCRATCH_PAD_BUILD_N 8
27#define SCRATCH_PAD_NOISE_N 8
28#else
29// Double shared memory on cpu as we can't reuse the memory from other threads
30#define SCRATCH_PAD_BUILD_N 16
31#define SCRATCH_PAD_NOISE_N 16
32#endif
33
34// Padding of 2 and 3 respectively would be enough. But this ensures that
35// rows are always aligned along cache lines. Likewise for TPC_PADS_PER_ROW.
36#define GPUCF_PADDING_PAD 8
37#define GPUCF_PADDING_TIME 4
38#define TPC_PADS_PER_ROW 144
39
40#define TPC_ROWS_PER_CRU 18
41#define TPC_PADS_PER_ROW_PADDED (TPC_PADS_PER_ROW + GPUCF_PADDING_PAD)
42#define TPC_NUM_OF_PADS (GPUCA_ROW_COUNT * TPC_PADS_PER_ROW_PADDED + GPUCF_PADDING_PAD)
43#define TPC_PADS_IN_SECTOR 14560
44#define TPC_FEC_IDS_IN_SECTOR 23296
45#define TPC_MAX_FRAGMENT_LEN_GPU 4000
46#define TPC_MAX_FRAGMENT_LEN_HOST 1000
47#define TPC_MAX_FRAGMENT_LEN_PADDED(size) ((size) + 2 * GPUCF_PADDING_TIME)
48
49#ifdef GPUCA_GPUCODE
50#define CPU_ONLY(x)
51#define CPU_PTR(x) nullptr
52#else
53#define CPU_ONLY(x) x
54#define CPU_PTR(x) x
55#endif
56
58{
59
60using SizeT = size_t;
61using TPCTime = int32_t;
62using TPCFragmentTime = int16_t;
63using Pad = uint8_t;
64using GlobalPad = int16_t;
65using Row = uint8_t;
66using Cru = uint8_t;
67
68using Charge = float;
69
70using Delta = int16_t;
71using Delta2 = short2;
72
74
75} // namespace o2::gpu::tpccf
76
77#endif