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 <limits>
5
6
namespace
cms::alpakatools
{
7
8
namespace
config
{
9
10
// bin growth factor (bin_growth in cub::CachingDeviceAllocator)
11
constexpr
unsigned
int
binGrowth
= 2;
12
13
// smallest bin, corresponds to binGrowth^minBin bytes (min_bin in cub::CachingDeviceAllocator
14
constexpr
unsigned
int
minBin
= 8;
// 256 bytes
15
16
// 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.
17
constexpr
unsigned
int
maxBin
= 30;
// 1 GB
18
19
// total storage for the allocator; 0 means no limit.
20
constexpr
size_t
maxCachedBytes
= 0;
21
22
// fraction of total device memory taken for the allocator; 0 means no limit.
23
constexpr
double
maxCachedFraction
= 0.8;
24
25
// if both maxCachedBytes and maxCachedFraction are non-zero, the smallest resulting value is used.
26
27
}
// namespace config
28
29
}
// namespace cms::alpakatools
30
31
#endif // HeterogeneousCore_AlpakaInterface_interface_AllocatorConfig_h
cms::alpakatools::config::minBin
constexpr unsigned int minBin
Definition:
AllocatorConfig.h:14
config
Definition:
config.py:1
cms::alpakatools::config::maxBin
constexpr unsigned int maxBin
Definition:
AllocatorConfig.h:17
cms::alpakatools
Definition:
PortableCollection.h:44
cms::alpakatools::config::maxCachedFraction
constexpr double maxCachedFraction
Definition:
AllocatorConfig.h:23
cms::alpakatools::config::maxCachedBytes
constexpr size_t maxCachedBytes
Definition:
AllocatorConfig.h:20
cms::alpakatools::config::binGrowth
constexpr unsigned int binGrowth
Definition:
AllocatorConfig.h:11
Generated for CMSSW Reference Manual by
1.8.14