Project
Loading...
Searching...
No Matches
GPUDefParametersConstants.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// This file contains compile-time constants, independent from the backend
16
17#ifndef GPUDEFPARAMETERSCONSTANTS_H
18#define GPUDEFPARAMETERSCONSTANTS_H
19
20#include "GPUCommonDef.h"
22#ifndef GPUCA_GPUCODE_DEVICE
23#include <cstddef>
24#endif
25
26// clang-format off
27
28#if defined(__CUDACC__) || defined(__HIPCC__)
29 #define GPUCA_SPECIALIZE_THRUST_SORTS // Not compiled with RTC, so must be compile-time constant
30#endif
31
32namespace o2::gpu::constants
33{
34static constexpr size_t GPU_MAX_THREADS = 1024;
35static constexpr size_t GPU_MAX_STREAMS = o2::tpc::constants::MAXSECTOR;
36
37static constexpr size_t GPU_ROWALIGNMENT = 16; // Align of Row Hits and Grid
38static constexpr size_t GPU_BUFFER_ALIGNMENT = 64; // Alignment of buffers obtained from SetPointers
39static constexpr size_t GPU_MEMALIGN = (64 * 1024); // Alignment of allocated memory blocks
40
41//; Default maximum numbers
42static constexpr size_t GPU_MEM_MAX_TPC_CLUSTERS = 1024 * 1024 * 1024ull; // Maximum number of TPC clusters
43static constexpr size_t GPU_MEM_MAX_TRD_TRACKLETS = 128 * 1024ull; // Maximum number of TRD tracklets
44static constexpr size_t GPU_DEFAULT_MEMORY_SIZE = 6 * 1024 * 1024 * 1024ull; // Size of memory allocated on Device
45static constexpr size_t GPU_DEFAULT_HOST_MEMORY_SIZE = 1 * 1024 * 1024 * 1024ull; // Size of memory allocated on Host
46static constexpr size_t GPU_STACK_SIZE = 8 * 1024ull; // Stack size per GPU thread
47static constexpr size_t GPU_HEAP_SIZE = 16 * 1025 * 1024ull; // Stack size per GPU thread
48} // namespace o2::gpu::constants
49
50// clang-format on
51#endif // GPUDEFPARAMETERSCONSTANTS_H
constexpr int MAXSECTOR
Definition Constants.h:28