src
HeterogeneousCore
AlpakaInterface
interface
AllocatorConfig.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_AlpakaInterface_interface_AllocatorConfig_h
2
#define HeterogeneousCore_AlpakaInterface_interface_AllocatorConfig_h
3
4
#include <cstddef>
5
#include <limits>
6
7
namespace
cms::alpakatools
{
8
9
namespace
config
{
10
11
// bin growth factor (bin_growth in cub::CachingDeviceAllocator)
12
constexpr
unsigned
int
binGrowth
= 2;
13
14
// smallest bin, corresponds to binGrowth^minBin bytes (min_bin in cub::CachingDeviceAllocator
15
constexpr
unsigned
int
minBin
= 8;
// 256 bytes
16
17
// largest bin, corresponds to binGrowth^maxBin bytes (max_bin in cub::CachingDeviceAllocator). Note that unlike in cub, allocations larger than binGrowth^maxBin are set to fail.
18
constexpr
unsigned
int
maxBin
= 30;
// 1 GB
19
20
// total storage for the allocator; 0 means no limit.
21
constexpr
size_t
maxCachedBytes
= 0;
22
23
// fraction of total device memory taken for the allocator; 0 means no limit.
24
constexpr
double
maxCachedFraction
= 0.8;
25
26
// if both maxCachedBytes and maxCachedFraction are non-zero, the smallest resulting value is used.
27
28
}
// namespace config
29
30
}
// namespace cms::alpakatools
31
32
#endif // HeterogeneousCore_AlpakaInterface_interface_AllocatorConfig_h
cms::alpakatools::config::minBin
constexpr unsigned int minBin
Definition:
AllocatorConfig.h:15
config
Definition:
config.py:1
cms::alpakatools::config::maxBin
constexpr unsigned int maxBin
Definition:
AllocatorConfig.h:18
ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr
if constexpr(n > 3)
Definition:
BrokenLine.h:164
cms::alpakatools
Definition:
PortableCollection.h:48
cms::alpakatools::config::maxCachedFraction
constexpr double maxCachedFraction
Definition:
AllocatorConfig.h:24
cms::alpakatools::config::maxCachedBytes
constexpr size_t maxCachedBytes
Definition:
AllocatorConfig.h:21
cms::alpakatools::config::binGrowth
constexpr unsigned int binGrowth
Definition:
AllocatorConfig.h:12
Generated for CMSSW Reference Manual by
1.8.14